在CUDA 中如果不指明是 单精度, CUDA会调用双精度实现。 (血泪呀!!!)
如果要使用单精度,要指明, 即使用 形如__fmul_rn(x,y)的函数。
详见链接!!
http://stackoverflow.com/questions/14406364/different-results-for-cuda-addition-on-host-and-on-gpu?rq=1
时间: 2024-12-06 10:36:33
在CUDA 中如果不指明是 单精度, CUDA会调用双精度实现。 (血泪呀!!!)
如果要使用单精度,要指明, 即使用 形如__fmul_rn(x,y)的函数。
详见链接!!
http://stackoverflow.com/questions/14406364/different-results-for-cuda-addition-on-host-and-on-gpu?rq=1