Repository navigation
update test_libtorch - #62797
update test_libtorch#62797tktrungna wants to merge 11 commits into
Conversation
[ghstack-poisoned]
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit 9f00d2a (more details on the Dr. CI page):
🕵️ 1 new failure recognized by patternsThe following CI failures do not appear to be due to upstream breakages:
|
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
|
@tktrungna has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Fixes #62380 * update test functions to call wheel install folder {sitepackages}/torch instead of build/ folder * add symbolic link for shared libraries which are called by the tests (this is a bit hacky and should be fixed the rpath before compiling -- similar to https://github.com/pytorch/pytorch/blob/master/.jenkins/pytorch/test.sh#L204-L208). ### Test plan check if all ci workflows pass Differential Revision: [D30193140](https://our.internmc.facebook.com/intern/diff/D30193140) [ghstack-poisoned]
Fixes #62380 * update test functions to call wheel install folder {sitepackages}/torch instead of build/ folder * add symbolic link for shared libraries which are called by the tests (this is a bit hacky and should be fixed the rpath before compiling -- similar to https://github.com/pytorch/pytorch/blob/master/.jenkins/pytorch/test.sh#L204-L208). ### Test plan check if all ci workflows pass Differential Revision: [D30193140](https://our.internmc.facebook.com/intern/diff/D30193140) [ghstack-poisoned]
|
@tktrungna has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Fixes #62380 * update test functions to call wheel install folder {sitepackages}/torch instead of build/ folder * add symbolic link for shared libraries which are called by the tests (this is a bit hacky and should be fixed the rpath before compiling -- similar to https://github.com/pytorch/pytorch/blob/master/.jenkins/pytorch/test.sh#L204-L208). ### Test plan check if all ci workflows pass Differential Revision: [D30193140](https://our.internmc.facebook.com/intern/diff/D30193140) [ghstack-poisoned]
Fixes #62380 * update test functions to call wheel install folder {sitepackages}/torch instead of build/ folder * add symbolic link for shared libraries which are called by the tests (this is a bit hacky and should be fixed the rpath before compiling -- similar to https://github.com/pytorch/pytorch/blob/master/.jenkins/pytorch/test.sh#L204-L208). ### Test plan check if all ci workflows pass Differential Revision: [D30193140](https://our.internmc.facebook.com/intern/diff/D30193140) [ghstack-poisoned]
|
@tktrungna has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Fixes #62380 * update test functions to call wheel install folder {sitepackages}/torch instead of build/ folder * add symbolic link for shared libraries which are called by the tests (this is a bit hacky and should be fixed the rpath before compiling -- similar to https://github.com/pytorch/pytorch/blob/master/.jenkins/pytorch/test.sh#L204-L208). ### Test plan check if all ci workflows pass Differential Revision: [D30193140](https://our.internmc.facebook.com/intern/diff/D30193140) [ghstack-poisoned]
|
@tktrungna has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
|
@tktrungna merged this pull request in af6ed08. |
Summary: Pull Request resolved: #62797 Fixes #62380 * update test functions to call wheel install folder {sitepackages}/torch instead of build/ folder * add symbolic link for shared libraries which are called by the tests (this is a bit hacky and should be fixed the rpath before compiling -- similar to https://github.com/pytorch/pytorch/blob/master/.jenkins/pytorch/test.sh#L204-L208). ### Test plan check if all ci workflows pass Test Plan: Imported from OSS Reviewed By: walterddr Differential Revision: D30193140 Pulled By: tktrungna fbshipit-source-id: d8e54c403f42abbbbe4556abf40c22a7955df737
On ROCm, test_api, test_jit and test_cpp_rpc fail `--help` with "libaotriton_v2.so.0.14.1: cannot open shared object file". test.sh symlinks libtorch* into torch/bin, so the test binary loads libtorch_hip.so through that symlink, glibc sets its $ORIGIN to torch/bin, and its own dependencies in torch/lib (AOTriton, and before that libcaffe2_nvrtc.so, which pytorch#106712 patched with one more symlink) are not found. The symlinks were added in pytorch#62797 because the installed test binaries had no RUNPATH; pytorch#136627 gave them $ORIGIN/../lib, so they are no longer needed. This removes them for test_libtorch, the distributed C++ tests and test_rpc. test_aot_compilation and test_vulkan keep theirs: test_mobile_nnc, aot_model_compiler_test and the vulkan tests never got that RUNPATH. Test Plan: With the torch/bin and torch/lib from this PR's mi350 wheel and CI's LD_LIBRARY_PATH: with the symlinks, `test_api --help` exits 127 with the CI error; without them, test_api, test_jit, test_lazy, test_cpp_rpc and the c10d store and process-group tests start, pytest-cpp collects 1024 and 588 tests from test_api and test_jit, and FunctionalTest.Conv1d (the libcaffe2_nvrtc.so case) passes on gfx950: ``` torch/bin/test_api --gtest_filter='FunctionalTest.Conv1d*' python -m pytest torch/bin/test_api --collect-only -q ``` This change was developed with the assistance of an AI assistant (Claude).
Fixes #62380
Test plan
check if all ci workflows pass
Stack from ghstack:
Differential Revision: D30193140