1

I build torchvision from source and during install phase I get compilation errors and to resolve that, I need to add

add_definitions(-D__CUDA_NO_HALF_CONVERSIONS__)
add_definitions(-D__CUDA_NO_BFLOAT16_CONVERSIONS__)
add_definitions(-D__CUDA_NO_HALF2_OPERATORS__)

lines to CMakeLists.txt. I don't want to edit CMakeLists.txt to automate the building process and I just want to add definitions using command line. I searched it but got no luck.

I tried adding

-D__CUDA_NO_HALF_CONVERSIONS__=ON \
-D__CUDA_NO_BFLOAT16_CONVERSIONS__=ON |
-D__CUDA_NO_HALF2_OPERATORS__=ON

but it didn't work.

0 Answers0