Skip to content

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
marziehlenjaniMeta:export-D102990925-to-v2-beta
Open

Fix FeedSim aarch64 install: prevent cmake from finding stale conda CUDA cmake configs (#600)#600
marziehlenjaniMeta wants to merge 1 commit intofacebookresearch:v2-betafrom
marziehlenjaniMeta:export-D102990925-to-v2-beta

Conversation

@marziehlenjaniMeta
Copy link
Copy Markdown

@marziehlenjaniMeta marziehlenjaniMeta commented Apr 29, 2026

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

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 29, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Apr 29, 2026

@marziehlenjaniMeta has exported this pull request. If you are a Meta employee, you can view the originating Diff in D102990925.

@meta-codesync meta-codesync Bot changed the title Fix Feedsim install Fix FeedSim aarch64 install: prevent cmake from finding stale conda CUDA cmake configs Apr 29, 2026
@marziehlenjaniMeta marziehlenjaniMeta force-pushed the export-D102990925-to-v2-beta branch from 1637533 to 3805fc3 Compare April 29, 2026 17:21
…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
@meta-codesync meta-codesync Bot changed the title Fix FeedSim aarch64 install: prevent cmake from finding stale conda CUDA cmake configs Fix FeedSim aarch64 install: prevent cmake from finding stale conda CUDA cmake configs (#600) Apr 29, 2026
@marziehlenjaniMeta marziehlenjaniMeta force-pushed the export-D102990925-to-v2-beta branch from 3805fc3 to 82e067b Compare April 29, 2026 18:08
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant