Skip to content

[Inductor Cutlass backend] Set INDUCTOR_TEST_DISABLE_FRESH_CACHE in test setup - #124574

Closed
kadeng wants to merge 3 commits into
gh/kadeng/53/basefrom
gh/kadeng/53/head
Closed

kadeng wants to merge 3 commits into
gh/kadeng/53/basefrom
gh/kadeng/53/head

Conversation

@kadeng

@kadeng kadeng commented Apr 21, 2024 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

The diff #122661 introduces a new automatic cache refresh mechanism during all inductor-derived test cases.

But this refresh mechanism seems not to work properly across process boundaries, specifically when using autotune_in_subproc, which many tests in test_cutlass_backend.py rely on.

Solution: Set the env var INDUCTOR_TEST_DISABLE_FRESH_CACHE=1
early during test setup within test_cutlass_backend.py

Test Plan:
This is a change to unit tests only.

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @muchulee8 @ColinPeppler @amjames @desertfire @chauhang

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Apr 21, 2024 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ You can merge normally! (3 Unrelated Failures)

As of commit 69dcc1d with merge base failed to retrieve merge base, please contact dev infra:

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

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

Comment thread test/inductor/test_cutlass_backend.py Outdated
# interacts badly with persistent subprocesses during
# autotuning. So we need to disable automatic cache refresh
# before calling setUp() on the parent class.
os.environ["INDUCTOR_TEST_DISABLE_FRESH_CACHE"] = "1"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we revert this after the call to super().setUp()? Otherwise, the env var will stick around and may affect other tests running in the same process in CI?

@kadeng kadeng Apr 22, 2024 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes makes sense.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

kadeng added 2 commits April 22, 2024 11:30
[ghstack-poisoned]
[ghstack-poisoned]
@kadeng

kadeng commented Apr 23, 2024

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge

@pytorch-bot pytorch-bot Bot added the ciflow/trunk Trigger trunk jobs on your pull request label Apr 23, 2024
@pytorchmergebot

Copy link
Copy Markdown
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
Copy Markdown
Collaborator

Merge failed

Reason: 3 mandatory check(s) failed. The first few are:

Dig deeper by viewing the failures on hud

Details for Dev Infra team Raised by workflow job

Failing merge rule: Core Maintainers

@kadeng

kadeng commented Apr 24, 2024

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge -f "Failing profiler tests are known to be broken"

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

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 pushed a commit that referenced this pull request Apr 24, 2024
…emm_choices (#124575)

Clean up CUTLASSGemmTemplate.add_cutlass_gemm_choices, removing code that became unneccessary by removing EVT-based epilogue fusion.

Test Plan:
Already covered by test_cutlass_backend.py

Pull Request resolved: #124575
Approved by: https://github.com/jansel
ghstack dependencies: #121497, #123930, #123932, #121734, #124107, #124574
petrex pushed a commit to petrex/pytorch that referenced this pull request May 3, 2024
…est setup (pytorch#124574)

The diff pytorch#122661 introduces a new automatic cache refresh mechanism during all inductor-derived test cases.

But this refresh mechanism seems not to work properly across process boundaries, specifically when using  autotune_in_subproc, which many tests in test_cutlass_backend.py rely on.

Solution: Set the env var INDUCTOR_TEST_DISABLE_FRESH_CACHE=1
early during test setup within test_cutlass_backend.py

Test Plan:
This is a change to unit tests only.

Pull Request resolved: pytorch#124574
Approved by: https://github.com/aakhundov
ghstack dependencies: pytorch#121497, pytorch#123930, pytorch#123932, pytorch#121734, pytorch#124107
petrex pushed a commit to petrex/pytorch that referenced this pull request May 3, 2024
…emm_choices (pytorch#124575)

Clean up CUTLASSGemmTemplate.add_cutlass_gemm_choices, removing code that became unneccessary by removing EVT-based epilogue fusion.

Test Plan:
Already covered by test_cutlass_backend.py

Pull Request resolved: pytorch#124575
Approved by: https://github.com/jansel
ghstack dependencies: pytorch#121497, pytorch#123930, pytorch#123932, pytorch#121734, pytorch#124107, pytorch#124574
@github-actions
github-actions Bot deleted the gh/kadeng/53/head branch June 2, 2024 02:01
@Flamefire

Copy link
Copy Markdown
Collaborator

@kadeng I see similar failures caused by explicit use of fresh_cache() in test_cutlass_backend.py: It creates a temporary directory and later crashes due to failing to find a file inside it.

I assume CI doesn't catch it due to the rerun-mechanism.

Is it possible to avoid this issue at the root, i.e. shutting down the subprocesses at the end of the test?

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants