@@ -531,7 +531,10 @@ def lib_name(base_name, cpu_value, version = None, static = False):
531
531
return "lib%s.a" % base_name
532
532
return "lib%s.so%s" % (base_name , version )
533
533
elif cpu_value == "Windows" :
534
- return "%s.lib" % base_name
534
+ if base_name == "nvToolsExt" :
535
+ return "lib/x64/nvToolsExt64_1.lib"
536
+ else :
537
+ return "%s.lib" % base_name
535
538
elif cpu_value == "Darwin" :
536
539
if static :
537
540
return "lib%s.a" % base_name
@@ -669,7 +672,7 @@ def _find_libs(repository_ctx, cuda_config):
669
672
"nvToolsExt" ,
670
673
repository_ctx ,
671
674
cpu_value ,
672
- cuda_config .config [ "cuda_library_dir" ] ,
675
+ cuda_config .nvToolsExt_path ,
673
676
"1" ,
674
677
),
675
678
"cupti" : _find_cuda_lib (
@@ -762,6 +765,11 @@ def _get_cuda_config(repository_ctx):
762
765
cufft_version = cuda_version
763
766
cusparse_version = cuda_version
764
767
768
+ if cpu_value == "Windows" :
769
+ nvToolsExt_path = repository_ctx .os .environ .get ("NVTOOLSEXT_PATH" , "C:/Program Files/NVIDIA Corporation/NvToolsExt/" )
770
+ else :
771
+ nvToolsExt_path = toolkit_path
772
+
765
773
return struct (
766
774
cuda_toolkit_path = toolkit_path ,
767
775
cuda_version = cuda_version ,
@@ -775,6 +783,7 @@ def _get_cuda_config(repository_ctx):
775
783
compute_capabilities = compute_capabilities (repository_ctx ),
776
784
cpu_value = cpu_value ,
777
785
config = config ,
786
+ nvToolsExt_path = nvToolsExt_path ,
778
787
)
779
788
780
789
def _tpl (repository_ctx , tpl , substitutions = {}, out = None ):
0 commit comments