Skip to content

Conversation

cz2h
Copy link
Contributor

@cz2h cz2h commented May 20, 2025

Fixes #148950.

During the construction of graph and running the node of add under interpreter, the functional argument of conj complex tensor gets cloned. This result in always having .is_conj() evaluted to false in decomposition function.

Propose a fix of calling resolve_conj() in the decomposition of complex tensor add.

Test as below
python test/dynamo/test_repros.py ReproTests.test_add_complex_conj

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov

Copy link

pytorch-bot bot commented May 20, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/153945

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 416d3fc with merge base db01f10 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@cz2h
Copy link
Contributor Author

cz2h commented May 20, 2025

@pytorchbot label "topic: open source"
@pytorchbot label "topic: not user facing"

Copy link

pytorch-bot bot commented May 20, 2025

Didn't find following labels among repository labels: topic: opensurce

@cz2h
Copy link
Contributor Author

cz2h commented May 20, 2025

@pytorchbot label "topic: not user facing"

@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label May 20, 2025
@HDCharles HDCharles requested review from eellison and jansel May 20, 2025 17:53
@HDCharles HDCharles added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label May 20, 2025
Copy link
Contributor

@jansel jansel left a comment

Choose a reason for hiding this comment

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

Can we add a test for what this is fixing?

@cz2h cz2h requested a review from jansel May 21, 2025 02:17
@jansel
Copy link
Contributor

jansel commented May 21, 2025

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label May 21, 2025
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 1 jobs have failed, first few of them are: Apply lint suggestions

Details for Dev Infra team Raised by workflow job

@eellison
Copy link
Contributor

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Successfully rebased resolve-conj-during-add onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout resolve-conj-during-add && git pull --rebase)

@pytorchmergebot pytorchmergebot force-pushed the resolve-conj-during-add branch from 190790c to 4fcd300 Compare May 22, 2025 15:43
@pytorch-bot pytorch-bot bot removed the ciflow/trunk Trigger trunk jobs on your pull request label May 22, 2025
Copy link
Contributor

@eellison eellison left a comment

Choose a reason for hiding this comment

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

test failures?

@cz2h
Copy link
Contributor Author

cz2h commented Jun 4, 2025

test failures?

Looks like resolving conj at decomp is losing track of the original memory address. I am thinking if we can apply fix of resoloving args and creating alias after tracing before decomp.

Do we have any previous fix/docs I can refer to? Thanks!

@cz2h cz2h requested review from eellison and jansel June 12, 2025 21:36
@cz2h
Copy link
Contributor Author

cz2h commented Jun 12, 2025

Hi @eellison , @jansel . Could you take a look at this quick fix? It should be able to pass all complex related tests now. Thanks in advanced!

@jansel jansel added ciflow/trunk Trigger trunk jobs on your pull request ciflow/inductor labels Jun 13, 2025
@jansel
Copy link
Contributor

jansel commented Jun 13, 2025

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

The merge job was canceled or timed out. This most often happen if two merge requests were issued for the same PR, or if merge job was waiting for more than 6 hours for tests to finish. In later case, please do not hesitate to reissue the merge command
For more information see pytorch-bot wiki.

@cz2h
Copy link
Contributor Author

cz2h commented Jun 13, 2025

Thanks so much for the quick response @jansel , the tests have passed, could you help me merge the change? Thanks a lot!

@jansel
Copy link
Contributor

jansel commented Jun 14, 2025

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/inductor ciflow/trunk Trigger trunk jobs on your pull request Merged module: dynamo module: inductor open source topic: not user facing topic category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[inductor] [fake tensor] torch.conj crashes when add original complex tensor

6 participants