Skip to content

Conversation

davidchencsl
Copy link
Contributor

@davidchencsl davidchencsl commented Jul 7, 2022

Stack from ghstack (oldest at bottom):

Differential Revision: D37725266

Summary: This commit added a pattern in the pattern matcher to detect if for loop & indexing is used that can be vectorized.

Test Plan: Added a test in test_profiler.py that creates a bootstrap example.

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Jul 7, 2022

🔗 Helpful links

✅ No Failures (0 Pending)

As of commit 7294b01 (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.

@davidchencsl davidchencsl requested review from robieta and removed request for albanD and soulitzer July 7, 2022 19:55
davidchencsl added a commit that referenced this pull request Jul 8, 2022
ghstack-source-id: 9f1357e
Pull Request resolved: #81056
@davidchencsl
Copy link
Contributor Author

@davidchencsl has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Differential Revision: [D37725266](https://our.internmc.facebook.com/intern/diff/D37725266)

Summary: This commit added a pattern in the pattern matcher to detect if for loop & indexing is used that can be vectorized.

Test Plan: Added a test in test_profiler.py that creates a bootstrap example.

[ghstack-poisoned]
@davidchencsl
Copy link
Contributor Author

@davidchencsl has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link

@robieta robieta left a comment

Choose a reason for hiding this comment

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

A couple minor nits, but otherwise looks good.

Differential Revision: [D37725266](https://our.internmc.facebook.com/intern/diff/D37725266)

Summary: This commit added a pattern in the pattern matcher to detect if for loop & indexing is used that can be vectorized.

Test Plan: Added a test in test_profiler.py that creates a bootstrap example.

[ghstack-poisoned]
Differential Revision: [D37725266](https://our.internmc.facebook.com/intern/diff/D37725266)

Summary: This commit added a pattern in the pattern matcher to detect if for loop & indexing is used that can be vectorized.

Test Plan: Added a test in test_profiler.py that creates a bootstrap example.

[ghstack-poisoned]
@davidchencsl
Copy link
Contributor Author

@davidchencsl has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Differential Revision: [D37725266](https://our.internmc.facebook.com/intern/diff/D37725266)

Summary: This commit added a pattern in the pattern matcher to detect if for loop & indexing is used that can be vectorized.

Test Plan: Added a test in test_profiler.py that creates a bootstrap example.

[ghstack-poisoned]
@davidchencsl
Copy link
Contributor Author

@davidchencsl has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@davidchencsl
Copy link
Contributor Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

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

@github-actions
Copy link
Contributor

Hey @davidchencsl.
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.

@janeyx99
Copy link
Contributor

@pytorchbot revert -m "broke 10.2 test_forward_ad_nn_functional_conv_transpose3d_cuda_float32 test on trunk https://hud.pytorch.org/pytorch/pytorch/commit/6e621d028766808f3c0bc8c45f776af3bf9cf22f" -c nosignal

======================================================================
2022-07-20T20:45:44.3845308Z FAIL [2.091s]: test_forward_ad_nn_functional_conv_transpose3d_cuda_float32 (__main__.TestCompositeComplianceCUDA)
2022-07-20T20:45:44.3848588Z ----------------------------------------------------------------------
2022-07-20T20:45:44.3849171Z Traceback (most recent call last):
2022-07-20T20:45:44.3849722Z   File "/opt/conda/lib/python3.9/site-packages/torch/testing/_internal/common_utils.py", line 1883, in wrapper
2022-07-20T20:45:44.3850102Z     method(*args, **kwargs)
2022-07-20T20:45:44.3850583Z   File "/opt/conda/lib/python3.9/site-packages/torch/testing/_internal/common_utils.py", line 1883, in wrapper
2022-07-20T20:45:44.3850953Z     method(*args, **kwargs)
2022-07-20T20:45:44.3853385Z   File "/opt/conda/lib/python3.9/site-packages/torch/testing/_internal/common_device_type.py", line 377, in instantiated_test
2022-07-20T20:45:44.3853810Z     result = test(self, **param_kwargs)
2022-07-20T20:45:44.3854428Z   File "/opt/conda/lib/python3.9/site-packages/torch/testing/_internal/common_device_type.py", line 813, in test_wrapper
2022-07-20T20:45:44.3867042Z     return test(*args, **kwargs)
2022-07-20T20:45:44.3867447Z   File "/var/lib/jenkins/workspace/test/test_ops.py", line 1258, in test_forward_ad
2022-07-20T20:45:44.3867861Z     composite_compliance.check_forward_ad_formula(
2022-07-20T20:45:44.3868483Z   File "/opt/conda/lib/python3.9/site-packages/torch/testing/_internal/composite_compliance.py", line 567, in check_forward_ad_formula
2022-07-20T20:45:44.3868974Z     assert_equal_fn(actual_primals, expected_primals, equal_nan=True)
2022-07-20T20:45:44.3869572Z   File "/opt/conda/lib/python3.9/site-packages/torch/testing/_internal/common_utils.py", line 2335, in assertEqual
2022-07-20T20:45:44.3869951Z     assert_equal(
2022-07-20T20:45:44.3870410Z   File "/opt/conda/lib/python3.9/site-packages/torch/testing/_comparison.py", line 1093, in assert_equal
2022-07-20T20:45:44.3870801Z     raise error_metas[0].to_error(msg)
2022-07-20T20:45:44.3871179Z AssertionError: Tensor-likes are not close!
2022-07-20T20:45:44.3871391Z 
2022-07-20T20:45:44.3871526Z Mismatched elements: 1 / 2744 (0.0%)
2022-07-20T20:45:44.3871974Z Greatest absolute difference: 4.57763671875e-05 at index (2, 3, 4, 4) (up to 2e-05 allowed)
2022-07-20T20:45:44.3872504Z Greatest relative difference: 5.68618647611624e-05 at index (2, 3, 4, 4) (up to 2e-05 allowed)
2022-07-20T20:45:44.3872743Z 
2022-07-20T20:45:44.3873013Z ----------------------------------------------------------------------

@pytorchmergebot
Copy link
Collaborator

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

@pytorchmergebot
Copy link
Collaborator

Reverting PR 81056 failed due to Command git -C /home/runner/actions-runner/_work/pytorch/pytorch revert --no-edit 6e621d028766808f3c0bc8c45f776af3bf9cf22f returned non-zero exit code 1

Auto-merging test/test_profiler.py
CONFLICT (content): Merge conflict in test/test_profiler.py
Auto-merging torch/_C/_autograd.pyi
CONFLICT (content): Merge conflict in torch/_C/_autograd.pyi
Auto-merging torch/csrc/autograd/init.cpp
CONFLICT (content): Merge conflict in torch/csrc/autograd/init.cpp
Auto-merging torch/profiler/_pattern_matcher.py
CONFLICT (content): Merge conflict in torch/profiler/_pattern_matcher.py
error: could not revert 6e621d0287... Add pattern to detect for loop indexing into tensor (#81056)
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git revert --continue".
hint: You can instead skip this commit with "git revert --skip".
hint: To abort and get back to the state before "git revert",
hint: run "git revert --abort".

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

@janeyx99
Copy link
Contributor

LOL nice the revert didn't go through because it was going to be a false revert--the job was green again after, so I suppose it was a flaky error of some sort. Sorry about the extra noise!

@davidchencsl
Copy link
Contributor Author

Oh my, looks like it does broke a test outside of CI: #81812

facebook-github-bot pushed a commit that referenced this pull request Jul 21, 2022
Summary:
This commit added a pattern in the pattern matcher to detect if for loop & indexing is used that can be vectorized.

Pull Request resolved: #81056
Approved by: https://github.com/robieta

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

Test plan from GitHub:
Added a test in test_profiler.py that creates a bootstrap example.

Original Phabricator Test Plan:
Imported from OSS

Reviewed By: jeanschmidt

Differential Revision: D37725266

Pulled By: davidchencsl

fbshipit-source-id: 896b31d06bee7fa1daf3b32ee6b8340e921086bd
@facebook-github-bot facebook-github-bot deleted the gh/davidchencsl/19/head branch July 24, 2022 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants