Skip to content

[Functionalization] Move nan_to_num_ and _amp_foreach_non_finite_check_and_unscale_ op tests to python#4687

Merged
wonjoo-wj merged 2 commits intofunctionalizationfrom
functionalization-meta-tensor
Feb 24, 2023
Merged

[Functionalization] Move nan_to_num_ and _amp_foreach_non_finite_check_and_unscale_ op tests to python#4687
wonjoo-wj merged 2 commits intofunctionalizationfrom
functionalization-meta-tensor

Conversation

@wonjoo-wj
Copy link
Copy Markdown
Collaborator

@wonjoo-wj wonjoo-wj commented Feb 23, 2023

Move nan_to_num_ and _amp_foreach_non_finite_check_and_unscale_ op tests to python


Even after pytorch/pytorch#94633, we were still seeing failures complaining about meta tensor support. However, these ops were succeeding during manual tests in Python. My guess would be that somewhere during the decomposition in the C++ world is causing some problems. However, for now, moving these op tests to Python.

Locally, I can see they succeed:

(base) jenkins@26d7adccbc26:/workspace/pytorch/xla$ python test/test_operations.py
----------------------------------------------------------------------
Ran 1 test in 0.224s

OK
(base) jenkins@26d7adccbc26:/workspace/pytorch/xla$ python test/test_operations.py
----------------------------------------------------------------------
Ran 1 test in 0.242s

OK
(base) jenkins@26d7adccbc26:/workspace/pytorch/xla$ 

@wonjoo-wj wonjoo-wj force-pushed the functionalization-meta-tensor branch from e287a9b to bd0bc8e Compare February 23, 2023 22:36
@wonjoo-wj wonjoo-wj self-assigned this Feb 23, 2023
Comment thread test/test_operations.py
Comment thread test/test_operations.py
Copy link
Copy Markdown
Collaborator

@alanwaketan alanwaketan left a comment

Choose a reason for hiding this comment

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

Please improve the test case as suggested. Otherwise, LGTM.

Comment thread test/test_operations.py
@wonjoo-wj wonjoo-wj force-pushed the functionalization-meta-tensor branch from 63f3026 to 71b68f8 Compare February 24, 2023 02:45
@alanwaketan
Copy link
Copy Markdown
Collaborator

You will need to rebase to resolve the new test failure.

@wonjoo-wj wonjoo-wj force-pushed the functionalization-meta-tensor branch from 71b68f8 to 9299fc8 Compare February 24, 2023 09:53
@wonjoo-wj
Copy link
Copy Markdown
Collaborator Author

Merging this as CIs are all green.

@wonjoo-wj wonjoo-wj merged commit 20bcbe5 into functionalization Feb 24, 2023
alanwaketan pushed a commit that referenced this pull request Mar 1, 2023
…k_and_unscale_ op tests to python (#4687)

* Move nan_to_num_ and _amp_foreach_non_finite_check_and_unscale_ op tests to python

* Update test call to runAtenTest
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

Successfully merging this pull request may close these issues.

2 participants