mirror of https://github.com/llvm/torch-mlir
Revert to using local PyTorch binaries (#1024)
Temporarily revert to using PyTorch binaries until source builds are ready to land. TORCH_MLIR_USE_INSTALLED_PYTORCH can be turned to OFF if you want to link against libtorch and/or source builds.pull/1013/head snapshot-20220708.527
parent
3d1a160101
commit
f202ae0012
|
@ -5,9 +5,20 @@
|
|||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
|
||||
include(TorchMLIRPyTorch)
|
||||
set(Torch_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../libtorch/share/cmake/Torch")
|
||||
|
||||
option(TORCH_MLIR_USE_INSTALLED_PYTORCH "Build from local PyTorch in environment" ON)
|
||||
|
||||
if(TORCH_MLIR_USE_INSTALLED_PYTORCH)
|
||||
TorchMLIRProbeForPyTorchInstall()
|
||||
endif()
|
||||
|
||||
find_package(Torch 1.11 REQUIRED)
|
||||
|
||||
if(TORCH_MLIR_USE_INSTALLED_PYTORCH)
|
||||
TorchMLIRConfigurePyTorch()
|
||||
else()
|
||||
TorchMLIRConfigureLibTorch()
|
||||
endif()
|
||||
|
||||
message(STATUS "libtorch_python CXXFLAGS is ...${TORCH_CXXFLAGS}")
|
||||
#-------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue