-
Notifications
You must be signed in to change notification settings - Fork 277
[no-ci] coverage: fix Linux git ownership and add Windows stack wrapper #1829
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+71
−34
Merged
Changes from 9 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
b73a09a
coverage: add git safe.directory for linux builds
rluo8 326a960
coverage: run coverage for linux without root
rluo8 8bdbff0
Merge branch 'main' into main
rluo8 f440fa9
Merge branch 'NVIDIA:main' into main
rluo8 ecf269f
coverage: change github workspace owner for Linux coverage
rluo8 ed96375
coverage: run cuda core tests in coverage using 8M thread
rluo8 c0d8861
Merge branch 'NVIDIA:main' into main
rluo8 7291fcb
Merge branch 'NVIDIA:main' into main
rluo8 2137fed
Merge branch 'main' into main
rwgk d9ac8c6
Add coverage test helper to run pytest using larger stack
rluo8 66c2fd2
Merge branch 'main' into main
rwgk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generated by Cursor GPT-5.4 Extra High Fast with a couple prompts (it's a suggestion to make this DRY):
One cleanup idea: the new
cuda.coreblock looks like it is only changing the execution model from"$GITHUB_WORKSPACE/.venv/Scripts/pytest" ...to "run the same pytest args on a freshly-created Python thread after
threading.stack_size(8 * 1024 * 1024)".I do not think there is a native one-line
pytest/ Actions knob for "run this with an 8 MB stack", so the wrapper approach makes sense. That said, would you consider factoring the duplicatedbindings/coreheredoc into a small helper, or at least using a shorter inline wrapper? The current ~30-line block seems to be mostly plumbing rather than behavior change.For example, the inline version could be reduced to something like:
Even better might be a tiny checked-in helper that both steps call, so the workflow stays readable and the "8 MB stack thread" workaround only lives in one place.
Agent notes / clues
.github/workflows/coverage.yml.cuda.corestep is the same workaround already used forcuda.bindings: runpytest.main(...)on a newly-created thread afterthreading.stack_size(8 * 1024 * 1024).os.chdir(...)in the Python snippet is probably redundant because the shell step already doescd "${{ steps.install-root.outputs.INSTALL_ROOT }}", but keeping it is harmless.pytest/ CPython to say "run this test invocation with an 8 MB stack"; some Python wrapper is required becausethreading.stack_size(...)only affects threads created after the call.ci/tools/run_pytest_with_stack.pythreading.stack_size(...), spawn one thread, runpytest.main(args), exit with its codeThreadPoolExecutor(max_workers=1)is a compact replacement for the manualresultdict plusThread.start()/join().There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot to mention before: I think one of these is redundant:
If you add the suggested helper, I'd drop the
cdand passsteps.install-root.outputs.INSTALL_ROOTto the helper; I believe that'll be most readable.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Ralf. It's reasonable to add a helper to make the workflow cleaner. I'll update that.