@@ -2341,10 +2341,12 @@ def print_macros(self):
23412341 emit ('_SRC_CU_CMD' , cmd )
23422342 emit ('_SRC_CU_PEERDIR' , ' ' .join (sorted (self .peerdirs )))
23432343
2344+ # This method is only used to set HAVE_CUDA=no automatically during ymake initialization
2345+ # (i.e. is used only in `auto_have_cuda` invocation)
23442346 def have_cuda_in_arcadia (self ):
23452347 host , target = self .build .host_target
23462348
2347- if not any ((host .is_linux_x86_64 , host .is_macos_x86_64 , host . is_windows_x86_64 , host . is_linux_powerpc )):
2349+ if not any ((host .is_linux_x86_64 , host .is_windows_x86_64 )):
23482350 return False
23492351
23502352 if host != target :
@@ -2366,9 +2368,6 @@ def auto_have_cuda(self):
23662368 return False
23672369 if self .build .is_sanitized :
23682370 return False
2369- if self .build .host_target [1 ].is_macos_x86_64 or self .build .host_target [1 ].is_macos_arm64 :
2370- # DEVTOOLSSUPPORT-19178 CUDA is rarely needed on Mac. Disable it by default but allow explicit builds with CUDA.
2371- return False
23722371 return self .cuda_root .from_user or self .use_arcadia_cuda .value and self .have_cuda_in_arcadia ()
23732372
23742373 def auto_cuda_version (self ):
@@ -2441,8 +2440,6 @@ def auto_cuda_host_compiler(self):
24412440 return select ((
24422441 (host .is_linux_x86_64 and target .is_linux_x86_64 , '$CUDA_HOST_TOOLCHAIN_RESOURCE_GLOBAL/bin/clang' ),
24432442 (host .is_linux_x86_64 and target .is_linux_armv8 , '$CUDA_HOST_TOOLCHAIN_RESOURCE_GLOBAL/bin/clang' ),
2444- (host .is_linux_powerpc and target .is_linux_powerpc , '$CUDA_HOST_TOOLCHAIN_RESOURCE_GLOBAL/bin/clang' ),
2445- (host .is_macos_x86_64 and target .is_macos_x86_64 , '$CUDA_HOST_TOOLCHAIN_RESOURCE_GLOBAL/usr/bin/clang' ),
24462443 ))
24472444
24482445 def cuda_windows_host_compiler (self ):
0 commit comments