Strange error while reading a PTX file

Hmm, using fast_math doesn’t do the trick for me. That’s probably because I’m using the cos function for double precision variables inside my hit functions. If I change those calls to cosf, everything works just fine. Am I right that there is no fast math implementation for double precision cosine ?
What’s really weird about this is the fact that my code worked fine with OptiX 2.5. Even withou fast_math. Did anything happen since then that would prevent the use of double precision trigonometric functions?

Thanks for any help

thank you it works

I have the same problem . but adding manually the --use_fast_math directive DID NOT do the trick…

Any ideas?

MORE DETAILS: windows 7 , x64 project ,vs2012, optix 3.6.2, cuda 6.0

i have tried with several sm_XX but [20,21,30] but it still outputs the same message at runtime

this is my nvcc command:

“$(CudaToolkitNvccPath)” -c -O -ptx -o $(SolutionDir)bin64\path_tracer.ptx --cl-version 2012 -arch=sm_30 --use_fast_math -m64 -I “$(SolutionDir)3rdparty\include” $(ProjectDir)path_tracer.cu

Hi conkal,

Are you using simple precision or double precision trigonometric functions?

If you’re using the double precision ones, this post should help you : double precision trigonometric functions - OptiX - NVIDIA Developer Forums

i have converted everything to be in single precision . (the f variant.) but i get the runtime error again. any thoughts?

Have you tried using __cosf or __sinf instead of the usual ones?
I think that’s what --use_fast_math is supposed to do, but I guess that’s worth a try.

ok i will try it . and i will tell you what happened