Skip to content

Conversation

@amathewc
Copy link
Contributor

@amathewc amathewc commented Nov 8, 2024

MOTIVATION

We recently integrated support for Intel Gaudi devices (identified as 'hpu') into the common_device_type framework via the pull request at #126970. This integration allows tests to be automatically instantiated for Gaudi devices upon loading the relevant library. Building on this development, the current pull request extends the utility of these hooks by adapting selected CUDA tests to operate on Gaudi devices. Additionally, we have confirmed that these modifications do not interfere with the existing tests on CUDA devices

CHANGES

  • Create a separate class for test functions running on CUDA devices
  • Extend the functionality of these tests to include HPUs
  • Use instantiate_device_type_tests with targeted attributes to generate device-specific test instances within the new classes
  • Apply skipIfHPU decorator to bypass tests that are not yet compatible with HPU devices

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

@pytorch-bot
Copy link

pytorch-bot bot commented Nov 8, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit f109f95 with merge base 993b2f0 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@colesbury colesbury requested a review from eellison November 8, 2024 16:51
@colesbury colesbury added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Nov 8, 2024
@ankurneog
Copy link

@anijain2305 : could you please help with the review and approval , this is inlines of these changes : #130714

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.

This pr deletes test files and tests in existing files.. update and re-request review plz

@amathewc
Copy link
Contributor Author

amathewc commented Dec 3, 2024

@eellison : Resolved merge conflicts and incorporated your changes. Could you re-review ?

@amathewc
Copy link
Contributor Author

@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

Rebase failed due to Command git -C /home/runner/work/pytorch/pytorch rebase refs/remotes/origin/viable/strict pull/140131/head returned non-zero exit code 1

Rebasing (1/4)
Auto-merging test/dynamo/test_repros.py
CONFLICT (content): Merge conflict in test/dynamo/test_repros.py
Auto-merging test/dynamo/test_subclasses.py
CONFLICT (content): Merge conflict in test/dynamo/test_subclasses.py
Auto-merging test/dynamo/test_unspec.py
CONFLICT (content): Merge conflict in test/dynamo/test_unspec.py
error: could not apply 20b959e5a6d... Adapt Dynamo tests to HPUs using instantiate_device_type_tests
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Could not apply 20b959e5a6d... Adapt Dynamo tests to HPUs using instantiate_device_type_tests

Raised by https://github.com/pytorch/pytorch/actions/runs/12294342984

@amathewc
Copy link
Contributor Author

@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

Rebase failed due to Command git -C /home/runner/work/pytorch/pytorch rebase refs/remotes/origin/viable/strict pull/140131/head returned non-zero exit code 1

Rebasing (1/17)
Auto-merging test/dynamo/test_debug_utils.py
Auto-merging test/dynamo/test_repros.py
CONFLICT (content): Merge conflict in test/dynamo/test_repros.py
Auto-merging test/dynamo/test_subclasses.py
CONFLICT (content): Merge conflict in test/dynamo/test_subclasses.py
Auto-merging test/dynamo/test_unspec.py
CONFLICT (content): Merge conflict in test/dynamo/test_unspec.py
error: could not apply 20b959e5a6d... Adapt Dynamo tests to HPUs using instantiate_device_type_tests
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Could not apply 20b959e5a6d... Adapt Dynamo tests to HPUs using instantiate_device_type_tests

Raised by https://github.com/pytorch/pytorch/actions/runs/12390693002

@amathewc
Copy link
Contributor Author

amathewc commented Jan 8, 2025

Closing this PR due merge conflicts. will be creating a new PR

@amathewc amathewc closed this Jan 8, 2025
@amathewc amathewc deleted the dynamo_adaptations branch January 8, 2025 10:26
pytorchmergebot pushed a commit that referenced this pull request Jan 23, 2025
**MOTIVATION**

We recently integrated support for Intel Gaudi devices (identified as 'hpu') into the common_device_type framework via the pull request at #126970. This integration allows tests to be automatically instantiated for Gaudi devices upon loading the relevant library. Building on this development, the current pull request extends the utility of these hooks by adapting selected CUDA tests to operate on Gaudi devices. Additionally, we have confirmed that these modifications do not interfere with the existing tests on CUDA devices.

Other accelerators can also extend the functionality by adding the device in the devices list. ( For eg: xpu )

**CHANGES**

Create a separate class for test functions running on CUDA devices
Extend the functionality of these tests to include HPUs
Use instantiate_device_type_tests with targeted attributes to generate device-specific test instances within the new classes
Apply skipIfHPU decorator to bypass tests that are not yet compatible with HPU devices

Previously we had submitted some changes in #140131 . However, deleted that PR due to merge conflicts and other issues.

Pull Request resolved: #144387
Approved by: https://github.com/ankurneog, https://github.com/EikanWang, https://github.com/yanboliang, https://github.com/guangyey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: dynamo 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.

6 participants