We are using these flags to use the internal PyTorch half operations instead of the one from the CUDA libraries.
This dates quite a while back, so I might miss some things but If I remember it correctly, CUDA9 added half operators in its half header, while Torch (Torch7 at this time) already shipped with its own.
The flags are used to keep the half definitions from the CUDA header, while not compiling the operators.
What kind of issues are you seeing in your custom CUDA extension?
EDIT: follow-up question seems to be in this post.