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

AttributeError: module 'torch.compiler' has no attribute 'is_compiling' #1857

Open
LukeLIN-web opened this issue Nov 15, 2024 · 5 comments
Open
Labels
bug Something isn't working

Comments

@LukeLIN-web
Copy link

Describe the Bug

Minimal Steps/Code to Reproduce the Bug

.conda/envs/opensora/lib/python3.9/site-packages/apex/normalization/fused_layer_norm.py", line 412, in forward
if torch.jit.is_tracing() or torch.jit.is_scripting() or torch.compiler.is_compiling() or not input.is_cuda:
AttributeError: module 'torch.compiler' has no attribute 'is_compiling'

pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" git+https://github.com/NVIDIA/apex.git I installed
torch 2.2.2

Environment

apex 0.1
Versions of relevant libraries:
[pip3] galore-torch==1.0
[pip3] numpy==1.26.4
[pip3] rotary-embedding-torch==0.5.3
[pip3] torch==2.2.2
[pip3] torchvision==0.17.2
[pip3] triton==2.2.0
[conda] galore-torch 1.0 pypi_0 pypi
[conda] numpy 1.26.4 pypi_0 pypi
[conda] rotary-embedding-torch 0.5.3 pypi_0 pypi
[conda] torch 2.2.2 pypi_0 pypi
[conda] torchvision 0.17.2 pypi_0 pypi
[conda] triton 2.2.0 pypi_0 pypi

@LukeLIN-web LukeLIN-web added the bug Something isn't working label Nov 15, 2024
@venom8898
Copy link

I am also running in to this. I also had to had to upgrade diffusers to 0.31.0 to even get the models to download. But now when I try their multigpu example I run in to the "AttributeError: module 'torch.compiler' has no attribute 'is_compiling'" error

@kkahatapitiya
Copy link

kkahatapitiya commented Nov 20, 2024

Instead of using the master, checking-out a previous tag (https://github.com/NVIDIA/apex/tree/24.04.01) before building, solved this for me.

@zyang6
Copy link

zyang6 commented Nov 20, 2024

Instead of using the master, checking-out a previous tag (https://github.com/NVIDIA/apex/tree/24.04.01) before building, solved this for me.
Have you solved this? Are you compiling apex packages before 24.01.01?

@kkahatapitiya
Copy link

Yes, using the version with tag 24.01.01 (git checkout tags/24.01.01), and building from source solved this issue for me.

@zyang6
Copy link

zyang6 commented Nov 20, 2024

Yes, using the version with tag 24.01.01 (git checkout tags/24.01.01), and building from source solved this issue for me.

Thank you !I'll give it a try

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants