Skip to content

[ROCm] Enable/fix unit tests test_stream_args and test_event_args#82346

Closed
alugorey wants to merge 1 commit intopytorch:masterfrom
alugorey:upstream_jit_stream_event_fix
Closed

[ROCm] Enable/fix unit tests test_stream_args and test_event_args#82346
alugorey wants to merge 1 commit intopytorch:masterfrom
alugorey:upstream_jit_stream_event_fix

Conversation

@alugorey
Copy link
Contributor

@alugorey alugorey commented Jul 27, 2022

Description

Removed some stubbed out code that was necessary for ROCm builds to support JIT compilation of Event and Stream classes. Original motivation for the code to be stubbed out in the ROCm case was likely due to this pull request:
#48020
In this PR, the include statement at the at the top of cuda.h was incorrectly pointed to aten/src/ATen/cuda/CUDAEvent.h when it should have been set to ATen/cuda/CUDAEvent.h. This error caused the hipification process of build_amd.py to not hipify this include statement correctly, causing errors. The include statement in question was subsequently fixed in the following commit:
acd0729

This PR re-introduces the stubbed out code to the ROCm build and "unskips" the associated unit tests.

Testing

Note: bullets prepended by ROCm were tested on systems with AMD GPUs while the others were tested with NVIDIA GPUs.

  • apply commit
  • (ROCm)python tools/amd_build/build_amd.py
  • python setup.py develop
  • (ROCm)PYTORCH_TEST_WITH_ROCM=1 python test/test_jit.py TestCUDA.test_event_args
  • (ROCm)PYTORCH_TEST_WITH_ROCM=1 python test/test_jit.py TestCUDA.test_stream_args
  • python test/test_jit.py TestCUDA.test_event_args
  • python test/test_jit.py TestCUDA.test_stream_args
  • Confirm tests pass in all scenarios

@facebook-github-bot
Copy link
Contributor

Hi @alugorey!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Jul 27, 2022

🔗 Helpful links

✅ No Failures (0 Pending)

As of commit 38fab50 (more details on the Dr. CI page):

Expand to see more

💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@facebook-github-bot facebook-github-bot added the oncall: jit Add this issue/PR to JIT oncall triage queue label Jul 27, 2022
@jeffdaily jeffdaily changed the title Enable/fix unit tests test_stream_args and test_event_args [ROCm] Enable/fix unit tests test_stream_args and test_event_args Jul 27, 2022
@pytorch-bot pytorch-bot bot added the module: rocm AMD GPU support for Pytorch label Jul 27, 2022
@jeffdaily jeffdaily added the ciflow/trunk Trigger trunk jobs on your pull request label Jul 27, 2022
@alugorey alugorey force-pushed the upstream_jit_stream_event_fix branch from 2dcbf1d to a564ca4 Compare July 27, 2022 20:28
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@alugorey alugorey force-pushed the upstream_jit_stream_event_fix branch from a564ca4 to 38fab50 Compare July 28, 2022 15:58
@jithunnair-amd
Copy link
Collaborator

@malfet Please review

@malfet
Copy link
Contributor

malfet commented Aug 1, 2022

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a merge job. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Merge failed due to This PR is too stale; the last push date was more than 3 days ago. Please rebase and try again.
Raised by https://github.com/pytorch/pytorch/actions/runs/2778386168

@malfet
Copy link
Contributor

malfet commented Aug 1, 2022

@malfet Please review

Hmm, shouldn't those be guarded on a particular ROCM runtime version?
Something tells me it's going to break users on rocm-4, wouldn't it?

@malfet
Copy link
Contributor

malfet commented Aug 1, 2022

@pytorchbot merge -f "[OTHER] This code doesn't change that often"

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a merge job. Check the current status here

@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2022

Hey @alugorey.
You've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.
For changes that are 'topic: not user facing' there is no need for a release notes label.

facebook-github-bot pushed a commit that referenced this pull request Aug 3, 2022
…2346) (#82346)

Summary:
### Description
Removed some stubbed out code that was necessary for ROCm builds to support JIT compilation of Event and Stream classes. Original motivation for the code to be stubbed out in the ROCm case was likely due to this pull request:
#48020
In this PR, the include statement at the at the top of cuda.h was incorrectly pointed to aten/src/ATen/cuda/CUDAEvent.h when it should have been set to ATen/cuda/CUDAEvent.h. This error caused the hipification process of build_amd.py to not hipify this include statement correctly, causing errors. The include statement in question was subsequently fixed in the following commit:
acd0729

This PR re-introduces the stubbed out code to the ROCm build and "unskips" the associated unit tests.

### Testing
Note: bullets prepended by ROCm were tested on systems with AMD GPUs while the others were tested with NVIDIA GPUs.
- apply commit
- (ROCm)`python tools/amd_build/build_amd.py`
- `python setup.py develop`
- (ROCm)`PYTORCH_TEST_WITH_ROCM=1 python test/test_jit.py TestCUDA.test_event_args`
- (ROCm)`PYTORCH_TEST_WITH_ROCM=1 python test/test_jit.py TestCUDA.test_stream_args`
- `python test/test_jit.py TestCUDA.test_event_args`
- `python test/test_jit.py TestCUDA.test_stream_args`
- Confirm tests pass in all scenarios

Pull Request resolved: #82346
Approved by: https://github.com/malfet

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/f1a135690731e04cc69795bd0efc2ab76e00a25d

Reviewed By: kit1980

Differential Revision: D38359360

fbshipit-source-id: a32ba48dde3d9cc7a1a18deb94a4140933ab99e2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request cla signed Merged module: rocm AMD GPU support for Pytorch oncall: jit Add this issue/PR to JIT oncall triage queue open source

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants