Open bheisler opened 6 years ago
Looks like it's more or less intended. But I'm not sure whether we should enable "unsafe FP math" by default.
I see. I'd assumed that the sin/cos instructions were compatible, but I guess not. Is it possible to give a clearer error message in this case?
Unfortunately, Rust doesn't seem to provide any reasonable way to pass -ffast-math
. That means that users who do want the "unsafe" FP math equivalents cannot do so without resorting to inline assembly.
I added a call to
core::intrinsics::fsin32
to the chapter 1 example, and used asyncthreads
to ensure that it couldn't be optimized away. The linker produces this error when compiling the modified kernel:The PTX instruction set does define sin32 and cos32 instructions, so I would expect those to be selected, or at least a better error message to be provided.