diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index 464458638a1..5b2605ea2b1 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -515,3 +515,29 @@ jobs: build-environment: linux-focal-cuda12.1-py3.10-gcc9-experimental-split-build docker-image: ${{ needs.linux-focal-cuda12_1-py3_10-gcc9-experimental-split-build.outputs.docker-image }} test-matrix: ${{ needs.linux-focal-cuda12_1-py3_10-gcc9-experimental-split-build.outputs.test-matrix }} + + linux-focal-py3_12-clang10-experimental-split-build: + name: linux-focal-py3.12-clang10-experimental-split-build + uses: ./.github/workflows/_linux-build-label.yml + with: + use_split_build: True + build-environment: linux-focal-py3.12-clang10 + docker-image-name: pytorch-linux-focal-py3.12-clang10 + test-matrix: | + { include: [ + { config: "default", shard: 1, num_shards: 3, runner: "linux.2xlarge" }, + { config: "default", shard: 2, num_shards: 3, runner: "linux.2xlarge" }, + { config: "default", shard: 3, num_shards: 3, runner: "linux.2xlarge" }, + { config: "dynamo", shard: 1, num_shards: 3, runner: "linux.2xlarge" }, + { config: "dynamo", shard: 2, num_shards: 3, runner: "linux.2xlarge" }, + { config: "dynamo", shard: 3, num_shards: 3, runner: "linux.2xlarge" }, + ]} + linux-focal-py3_12-clang10-experimental-split-build-test: + name: linux-focal-py3.12-clang10-experimental-split-build + uses: ./.github/workflows/_linux-test.yml + needs: linux-focal-py3_12-clang10-experimental-split-build + with: + build-environment: linux-focal-py3.12-clang10-experimental-split-build + docker-image: ${{ needs.linux-focal-py3_12-clang10-experimental-split-build.outputs.docker-image }} + test-matrix: ${{ needs.linux-focal-py3_12-clang10-experimental-split-build.outputs.test-matrix }} + timeout-minutes: 600 diff --git a/torch/CMakeLists.txt b/torch/CMakeLists.txt index 080e977044d..c949937d179 100644 --- a/torch/CMakeLists.txt +++ b/torch/CMakeLists.txt @@ -298,6 +298,16 @@ endif() add_library(torch_python SHARED ${TORCH_PYTHON_SRCS}) + +if(CAFFE2_USE_MKL AND BUILD_LIBTORCHLESS) + + # Use the RPATH of the linked libraries + set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + # we need to explicitly link caffe2::mkl in order to have the + # correct RPATH in torch_python for the split build + target_link_libraries(torch_python PRIVATE caffe2::mkl) +endif() + add_dependencies(torch_python onnx_proto) # Avoid numpy for the DEPLOY build if(USE_NUMPY)