Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot import when using torch<2.5 on arm cpu #3275

Open
Lix1993 opened this issue Oct 24, 2024 · 3 comments
Open

cannot import when using torch<2.5 on arm cpu #3275

Lix1993 opened this issue Oct 24, 2024 · 3 comments

Comments

@Lix1993
Copy link

Lix1993 commented Oct 24, 2024

when using torch 2.5, I can import fbgemm_gpu , install command:

pip3 install torch==2.5 fbgemm_gpu  --index-url https://download.pytorch.org/whl/cpu

when torch<2.5, it fails

site-packages/fbgemm_gpu/fbgemm_gpu_py.so: undefined symbol: _ZN3c1015SmallVectorBaseIjE8grow_podEPvmm
AttributeError: '_OpNamespace' 'fbgemm' object has no attribute 'jagged_2d_to_dense'
@q10
Copy link
Contributor

q10 commented Oct 24, 2024

Hi @Lix1993 With the latest fbgemm_gpu, there is a requirement to use torch 2.5. If you would like to use torch 2.4, you will have to use a lower version of fbgemm_gpu:

pip3 install torch==2.5 fbgemm_gpu=0.8.0  --index-url https://download.pytorch.org/whl/cpu

@Lix1993
Copy link
Author

Lix1993 commented Oct 25, 2024

thx
,I can use fbgemm_gpu==0.5.0 with torch 2.1 installed by pip,
but when I use torch build by myself, it failed.

Should I build torch with USE_FBGEMM=ON?

@q10
Copy link
Contributor

q10 commented Oct 25, 2024

Hi @Lix1993 if you are referring to building the torch library, we will defer you to the PyTorch team for the question since we are not the subject-matter experts. However, a quick browse of the torch codebase suggests that USE_FBGEMM=ON should be used, since it will compile fbgemm kernels, some of which fbgemm_gpu uses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants