Skip to content

Fix compile error for torch_cmpile for llama#662

Merged
regisss merged 1 commit into
mainfrom
torchcompileerror
Jan 25, 2024
Merged

Fix compile error for torch_cmpile for llama#662
regisss merged 1 commit into
mainfrom
torchcompileerror

Conversation

@jiminha
Copy link
Copy Markdown
Contributor

@jiminha jiminha commented Jan 24, 2024

What does this PR do?

Fixing compile error seen with torch-compile option.

File "/usr/local/lib/python3.10/dist-packages/torch/_dynamo/variables/base.py", line 225, in as_python_constant
raise NotImplementedError(f"{self} is not a constant")
torch._dynamo.exc.InternalTorchDynamoError: SymNodeVariable() is not a constant

524381 [2024-01-24T07:03:06.868Z] from user code:
524382 [2024-01-24T07:03:06.868Z] File "/root/optimum-habana/optimum/habana/transformers/models/llama/modeling_llama.py", line 294, in
524383 [2024-01-24T07:03:06.868Z] if attn_weights.size() not in [

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

@jiminha jiminha requested a review from a user January 24, 2024 23:40
@libinta libinta added run-test Run CI for PRs from external contributors synapse1.14 labels Jan 24, 2024
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Copy Markdown
Collaborator

@regisss regisss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@regisss regisss merged commit 2f4fe81 into main Jan 25, 2024
@regisss regisss deleted the torchcompileerror branch January 25, 2024 16:34
jychen21 pushed a commit to jychen21/optimum-habana that referenced this pull request Feb 27, 2024
gplutop7 pushed a commit to HabanaAI/optimum-habana-fork that referenced this pull request Oct 15, 2025
Co-authored-by: Adam Stachowicz <105052242+astachowiczhabana@users.noreply.github.com>
Co-authored-by: Adam Stachowicz <astachow@habana.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-test Run CI for PRs from external contributors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants