Skip to content

Commit

Permalink
chore: Fixed use system libs
Browse files Browse the repository at this point in the history
  • Loading branch information
joda01 committed Jan 26, 2025
1 parent 07a1449 commit b0802e8
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions recipes/libtorch/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,25 @@ def source(self):
def generate(self):
tc = CMakeToolchain(self)
tc.variables["CMAKE_PROJECT_Torch_INCLUDE"] = "conan_deps.cmake"
tc.variables["USE_SYSTEM_LIBS"] = True
#tc.variables["USE_SYSTEM_LIBS"] = True
tc.variables["USE_SYSTEM_CPUINFO"] = True
tc.variables["USE_SYSTEM_SLEEF"] = True
tc.variables["USE_SYSTEM_GLOO"] = True
tc.variables["BUILD_CUSTOM_PROTOBUF"] = False
tc.variables["USE_SYSTEM_EIGEN_INSTALL"] = True
tc.variables["USE_SYSTEM_FP16"] = True
tc.variables["USE_SYSTEM_PTHREADPOOL"] = True
tc.variables["USE_SYSTEM_PSIMD"] = True
tc.variables["USE_SYSTEM_BENCHMARK"] = True
tc.variables["USE_SYSTEM_ONNX"] = True
if self.options.get_safe("with_xnnpack", False) == False:
tc.variables["USE_SYSTEM_XNNPACK"] = False
else:
tc.variables["USE_SYSTEM_XNNPACK"] = True
tc.variables["USE_SYSTEM_PYBIND11"] = True
if self.options.get_safe("with_nccl", False) == True:
tc.variables["USE_SYSTEM_NCCL"] = True

tc.variables["BUILD_TEST"] = False
tc.variables["ATEN_NO_TEST"] = True
tc.variables["BUILD_BINARY"] = self.options.utilities
Expand Down Expand Up @@ -436,8 +454,6 @@ def generate(self):
tc.variables["USE_VULKAN_FP16_INFERENCE"] = self.options.get_safe("vulkan_fp16_inference", False)
tc.variables["USE_VULKAN_RELAXED_PRECISION"] = self.options.get_safe("vulkan_relaxed_precision", False)
tc.variables["USE_XNNPACK"] = self.options.get_safe("with_xnnpack", False)
if self.options.get_safe("with_xnnpack", False) == False:
tc.variables["USE_SYSTEM_XNNPACK"] = False
tc.variables["USE_ITT"] = self.options.with_itt
tc.variables["USE_MKLDNN"] = self.options.get_safe("with_mkldnn", False)
tc.variables["USE_MKLDNN_CBLAS"] = False # This option is useless for libtorch
Expand Down

0 comments on commit b0802e8

Please sign in to comment.