Hey guys, I’m new here but first I just want to say I’ve learned a lot about openCL from reading the forums

My issue is that I’m writing a C++ application using openCL and one of my devices (a Nvidia GeForce GT 650m 1024 MB GPU) keeps giving me this weird ptxas application error saying "Arguments mismatch for instruction ‘mov’ when I try to build a cl_program on that device. It’s the only one of my 3 devices that gives me this error. My CPU and other GPU (Intel HD 4000) do not give me this error at all.

I’m not sure if it’s relevant, but I am running on a mid 2013 15" macbook pro OSX 10.9.5 (Mavericks) with Xcode 6.0.1 openCL 1.2

Here’s an example of a function that (sometimes) causes this error to happen. It’s a helper function I use inside one of my kernels:

```
//Calculate the dot product of two vectors
float Dot(Vector v1, Vector v2)
{
return (v1.x*v2.x + v1.y*v2.y + v1.z*v2.z);
}
```

First I tried splitting up the work into something like this:

```
//Calculate the dot product of two vectors)
float Dot(Vector v1, Vector v2)
{
float a = v1.x*v2.x;
float b = v1.y*v2.y;
float c = v1.z*v2.z;
float result = a + b + c;
return result;
}
```

But that also gives me the same error. Interestingly enough, if I simply set result = 5.0f and return that it magically compiles and runs:

```
//THIS WILL COMPILE AND RUN
float Dot(Vector v1, Vector v2)
{
float a = v1.x*v2.x;
float b = v1.y*v2.y;
float c = v1.z*v2.z;
float result = 5.0f; //IGNORE THE CALCULATION. JUST MAKE IT 5
return result;
}
```

So I have no idea what’s going on. My ‘Dot’ function isn’t the only function that’s affected but one of several. Is my Nvidia card defective?

Here is the log I get from clGetProgramBuildInfo after the build fails:

ptxas application ptx input, line 703; error : Arguments mismatch for instruction ‘mov’

ptxas application ptx input, line 703; error : Unknown symbol ‘LIntersection_2E_n’

ptxas application ptx input, line 703; error : Label expected for forward reference of ‘LIntersection_2E_n’

ptxas fatal : Ptx assembly aborted due to errors

Although there are more errors printed than just the ‘mov’ one I described, they all go away when I make the above change of result = 5.0f;