mirror of https://github.com/llvm/torch-mlir
Export LTC Headers (#1108)
parent
70395de197
commit
368963243e
|
@ -82,11 +82,30 @@ target_link_libraries(torch_mlir_ltc_backend
|
||||||
|
|
||||||
message(STATUS "TORCH_CXXFLAGS=${TORCH_CXXFLAGS} -Wno-pedantic")
|
message(STATUS "TORCH_CXXFLAGS=${TORCH_CXXFLAGS} -Wno-pedantic")
|
||||||
set_target_properties(torch_mlir_ltc_backend PROPERTIES
|
set_target_properties(torch_mlir_ltc_backend PROPERTIES
|
||||||
LIBRARY_OUTPUT_DIRECTORY "${TORCH_MLIR_PYTHON_PACKAGES_DIR}/torch_mlir/"
|
LIBRARY_OUTPUT_DIRECTORY "${TORCH_MLIR_PYTHON_PACKAGES_DIR}/torch_mlir/torch_mlir/base_lazy_backend"
|
||||||
OUTPUT_NAME lib_mlir_ltc
|
OUTPUT_NAME lib_torch_mlir_ltc
|
||||||
PREFIX ""
|
PREFIX ""
|
||||||
SUFFIX ".so"
|
SUFFIX ".so"
|
||||||
CXX_VISIBILITY_PRESET "hidden"
|
CXX_VISIBILITY_PRESET "hidden"
|
||||||
COMPILE_FLAGS "${TORCH_CXXFLAGS} -Wno-pedantic"
|
COMPILE_FLAGS "${TORCH_CXXFLAGS} -Wno-pedantic"
|
||||||
LINK_FLAGS "-rdynamic"
|
LINK_FLAGS "-rdynamic"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Copy header files into python package
|
||||||
|
|
||||||
|
add_custom_command(
|
||||||
|
TARGET torch_mlir_ltc_backend POST_BUILD
|
||||||
|
COMMAND mkdir -p
|
||||||
|
${TORCH_MLIR_PYTHON_PACKAGES_DIR}/torch_mlir/torch_mlir/base_lazy_backend/generated/)
|
||||||
|
|
||||||
|
add_custom_command(
|
||||||
|
TARGET torch_mlir_ltc_backend POST_BUILD
|
||||||
|
COMMAND cp
|
||||||
|
${PROJECT_SOURCE_DIR}/python/torch_mlir/csrc/base_lazy_backend/*.h
|
||||||
|
${TORCH_MLIR_PYTHON_PACKAGES_DIR}/torch_mlir/torch_mlir/base_lazy_backend/)
|
||||||
|
|
||||||
|
add_custom_command(
|
||||||
|
TARGET torch_mlir_ltc_backend POST_BUILD
|
||||||
|
COMMAND cp
|
||||||
|
${PROJECT_SOURCE_DIR}/python/torch_mlir/csrc/base_lazy_backend/generated/*.h
|
||||||
|
${TORCH_MLIR_PYTHON_PACKAGES_DIR}/torch_mlir/torch_mlir/base_lazy_backend/generated/)
|
||||||
|
|
Loading…
Reference in New Issue