Possible compiler bug?

Compiling my source code, I have no errors, but during the execution I obtain the following message:

OptiX Error: Parse error (Details: Function “_rtProgramCreateFromPTXFile” caught exception: (string): error: Cannot parse input PTX string
./debug/pinhole_camera.cu.ptx, line 8265; : error : Arguments mismatch for instruction ‘mov’
./debug/pinhole_camera.cu.ptx, line 8267; : error : Arguments mismatch for instruction ‘and’
[4849850])

Looking at the ptx, I have:

...
8262 mul.ftz.f32 	%f1037, %f2572, %f1034;
8263 mov.b32 	 %r377, %f1037;
8264 .loc 2 87 1
8265 mov.u32 	%rd316, 0;
8266 .loc 2 88 1
8267 and.b32  	%r379, %rd316, -2147483648;
8268 selp.b32 	%r380, 1073741825, 1, %p3;
8269 or.b32  	%r381, %r380, %r379;
...

My system:

  • Optix 3.0.1;
  • Cuda 5.0;
  • VS 2010 SP1;

Flags:

-O3 -use_fast_math.

Same error if I remove the “-use_fast_math” and/or the “-O3”.
I use compute capability and sm 2.0.

It’s a compiler bug?

Might be nvcc bug. Do you have the latest release version of Cuda 5.0 toolkit? Could you send the source C++ file, exact nvcc cmd line and ptx output to OptiX-Help@NVIDIA.com?

Yes, I use Cuda 5.0.35.3 that’s the latest available version. The source code is quite complex (a bidirectional path-tracer). I can try to reproduce the error, but it could be hard. There are plans to support Cuda 5.5?