CUDA offers the kernel author two functions, __builtin_assume()
and __assume()
. Their signatures are the same:
void __builtin_assume(bool exp);
void __assume(bool exp);
and so is their one-line documentation. Are they the same? Is one of them deprecated?
The difference is mentioned in a blog post: https://developer.nvidia.com/blog/boosting-productivity-and-performance-with-the-nvidia-cuda-11-2-c-compiler/
NVCC also supports a similar built-in function, __assume(bool), when using cl.exe as a host compiler.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With