I’m trying to build some code involving half-precision floating point types, so I’m including cuda_fp16.hpp. Since CUDA 12.0, that file seems to include nv/target - a rather weird file that doesn’t seem very related to half-precision floats.
What’s the deal with this file, and why is its inclusion required?
I do not know if there is some official document about it but nvidia libraries on github are in the progess of incorporating it for quite a while. for example,
In your case, it is used to switch between host implementation and device implementation, for example in __double2half
But the thing is, it doesn’t seem like cuda_fp16.hpp is really dependent on stuff from nv/target. So this is again somewhat mysterious.
On a semi-related note:
Add libcu++ dependency; initial round of NV_IF_TARGET ports.
That seems rather misguided. libcu++ is supposed to be a complete alternative C++ standard library. I would not want to drag all of it in just to use some kernel from CUB.