Fix FeedSim aarch64 install: prevent cmake from finding stale conda CUDA cmake configs (#600)#600
Open
marziehlenjaniMeta wants to merge 1 commit intofacebookresearch:v2-betafrom
Conversation
|
@marziehlenjaniMeta has exported this pull request. If you are a Meta employee, you can view the originating Diff in D102990925. |
1637533 to
3805fc3
Compare
…UDA cmake configs (facebookresearch#600) Summary: D102920058 switched FeedSim's aarch64 libtorch installation from conda to pip to get a CPU-only build (the conda package ships CUDA-enabled cmake configs that fail on CPU-only ARM servers ). However, two issues remained: 1. The script created symlinks from `miniconda3/share/cmake/` to the pip torch `miniconda3/` path, it computed `_IMPORT_PREFIX` as `miniconda3/` and looked for `libc10.so` there — but the actual libraries live in the pip torch directory. Fix: replace the symlinks with `rm -rf` to clean up any leftover conda cmake files. 2. `CMAKE_PREFIX_PATH` included `miniconda3`, causing cmake to search that prefix for packages. This could find stale conda cmake files from previous installs. Fix: remove `miniconda3` from `CMAKE_PREFIX_PATH`. With these fixes, cmake only finds Caffe2/Torch through the `libtorch/share/cmake/` symlinks, where `_IMPORT_PREFIX` correctly resolves to `libtorch/` and the library symlinks point to the actual pip torch `.so` files. Reviewed By: YifanYuan3, excelle08 Differential Revision: D102990925
3805fc3 to
82e067b
Compare
meta-codesync Bot
pushed a commit
that referenced
this pull request
Apr 29, 2026
…UDA cmake configs (#600) Summary: Pull Request resolved: #600 D102920058 switched FeedSim's aarch64 libtorch installation from conda to pip to get a CPU-only build (the conda package ships CUDA-enabled cmake configs that fail on CPU-only ARM servers ). However, two issues remained: 1. The script created symlinks from `miniconda3/share/cmake/` to the pip torch `miniconda3/` path, it computed `_IMPORT_PREFIX` as `miniconda3/` and looked for `libc10.so` there — but the actual libraries live in the pip torch directory. Fix: replace the symlinks with `rm -rf` to clean up any leftover conda cmake files. 2. `CMAKE_PREFIX_PATH` included `miniconda3`, causing cmake to search that prefix for packages. This could find stale conda cmake files from previous installs. Fix: remove `miniconda3` from `CMAKE_PREFIX_PATH`. With these fixes, cmake only finds Caffe2/Torch through the `libtorch/share/cmake/` symlinks, where `_IMPORT_PREFIX` correctly resolves to `libtorch/` and the library symlinks point to the actual pip torch `.so` files. Reviewed By: YifanYuan3, excelle08 Differential Revision: D102990925 fbshipit-source-id: f28a97dfa6ebb00c07305517c75076338d68b69b
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
D102920058 switched FeedSim's aarch64 libtorch installation from conda to pip to get a CPU-only build (the conda package ships CUDA-enabled cmake
configs
that fail on CPU-only ARM servers ).
However, two issues remained:
The script created symlinks from
miniconda3/share/cmake/to the piptorch
miniconda3/path, it computed_IMPORT_PREFIXasminiconda3/andlooked
for
libc10.sothere — but the actual libraries live in the pip torchdirectory. Fix: replace the symlinks with
rm -rfto clean up anyleftover
conda cmake files.
CMAKE_PREFIX_PATHincludedminiconda3, causing cmake to search thatprefix for packages. This could find stale conda cmake files from
previous
installs. Fix: remove
miniconda3fromCMAKE_PREFIX_PATH.With these fixes, cmake only finds Caffe2/Torch through the
libtorch/share/cmake/symlinks, where
_IMPORT_PREFIXcorrectly resolves tolibtorch/and thelibrary symlinks point to the actual pip torch
.sofiles.Reviewed By: YifanYuan3, excelle08
Differential Revision: D102990925