-
Notifications
You must be signed in to change notification settings - Fork 444
[cuda.compute]: Add ci matrix entry for minimal ft testing on windows #9887
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
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
6f44234
add pytest run parallel
NaderAlAwar ec4557e
address review
NaderAlAwar d866731
Add minimal testing to windows
NaderAlAwar 9c64ab6
Add missing windows script
NaderAlAwar c1ec0d8
Merge branch 'main' into add-windows-minimal-ft
NaderAlAwar fe9526b
Address comments and update docs
NaderAlAwar 8a8344c
Merge branch 'add-windows-minimal-ft' of github.com:NaderAlAwar/cccl …
NaderAlAwar 3cda278
Merge branch 'main' into add-windows-minimal-ft
NaderAlAwar 87f129b
Merge branch 'main' into add-windows-minimal-ft
NaderAlAwar bc2166c
Merge branch 'add-windows-minimal-ft' of github.com:NaderAlAwar/cccl …
NaderAlAwar cb39ee8
Merge branch 'main' into add-windows-minimal-ft
NaderAlAwar de85a70
Merge branch 'main' into add-windows-minimal-ft
NaderAlAwar b9ce5ee
Pin to container
NaderAlAwar f86d95b
Move error checking code into common function
NaderAlAwar bf971dc
address review
NaderAlAwar 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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| Param( | ||
| [Parameter(Mandatory = $true)] | ||
| [Alias("py-version")] | ||
| [ValidatePattern("^\d+\.\d+t?$")] | ||
| [string]$PyVersion | ||
| ) | ||
|
|
||
| $ErrorActionPreference = "Stop" | ||
|
|
||
| # Import shared helpers | ||
| Import-Module "$PSScriptRoot/build_common.psm1" | ||
| Import-Module "$PSScriptRoot/build_common_python.psm1" | ||
|
|
||
| $python = Get-Python -Version $PyVersion | ||
| $cudaMajor = Get-CudaMajor | ||
|
|
||
| # Pin cuda-toolkit to the container's CTK minor (CCCL_PYTHON_TEST_LATEST_CTK=1 | ||
| # opts out). See build_common_python.psm1. | ||
| Set-CtkPin | ||
|
|
||
| $repoRoot = Get-RepoRoot | ||
|
|
||
| $wheelPath = Get-CudaCcclWheel | ||
|
|
||
| # Install cuda_cccl with the minimal CUDA extra. This intentionally avoids the | ||
| # full cu* extras because those pull in numba/numba-cuda. | ||
| Invoke-Checked { & $python -m pip install -U pip pytest pytest-xdist } "Failed to install pytest / pytest-xdist" | ||
| Invoke-Checked { & $python -m pip install "$wheelPath[minimal-cu$cudaMajor]" } "Failed to install cuda_cccl minimal extra" | ||
|
|
||
| Push-Location (Join-Path $repoRoot "python/cuda_cccl/tests") | ||
| try { | ||
| Invoke-Checked { & $python -m pytest -n 6 -v compute/test_no_numba.py } "test_no_numba.py failed" | ||
|
|
||
| if ($PyVersion -eq "3.14t") { | ||
| # Select only tests that support the minimal extra so pytest does not | ||
| # collect tests that import numba-cuda and re-enable the GIL. These tests | ||
| # provide their own worker threads, so keep pytest itself in a single | ||
| # process. The serialization node-ids are module-skipped on the v2 | ||
| # backend today and will start running there automatically once v2 gains | ||
| # serialization support. | ||
| Invoke-Checked { | ||
| & $python -m pytest -n 0 -v ` | ||
| compute/test_free_threading_stress.py ` | ||
| compute/test_multi_cc_serialization.py::test_aot_build_result_load_failure_is_shared_and_retryable ` | ||
| compute/test_multi_cc_serialization.py::test_aot_serialization_waits_for_canonical_first_load | ||
| } "free-threading stress / serialization tests failed" | ||
|
|
||
| # Broad thread-safety sweep (pytest-run-parallel): re-run the numba-free | ||
| # functional suite with each test executed concurrently across threads | ||
| # (barrier-synchronized start), stressing the process-wide build cache, | ||
| # single-flight coordination, and the Cython bindings from many threads at | ||
| # once. Complements test_free_threading_stress.py above, which targets | ||
| # specific shared-object scenarios by hand. -n 0 so the threads share one | ||
| # interpreter. | ||
| # | ||
| # --parallel-threads=2 matches CuPy's free-threading CI (the closest GPU | ||
| # precedent); a small fixed count bounds GPU-memory pressure from | ||
| # concurrent kernels and stays reproducible across runners, unlike =auto | ||
| # (the runner's logical-core count). | ||
| # | ||
| # pytest-run-parallel is only used by this sweep, so install it on the | ||
| # 3.14t path rather than for every minimal (e.g. non-free-threaded 3.14) | ||
| # run. | ||
| Invoke-Checked { & $python -m pip install pytest-run-parallel } "Failed to install pytest-run-parallel" | ||
|
|
||
| # Fail fast if the interpreter is not actually GIL-free (wrong build / | ||
| # PYTHON_GIL=1): pytest-run-parallel does NOT catch a GIL that is enabled | ||
| # from the start -- it would run threads GIL-serialized and pass | ||
| # vacuously. (A GIL *re-enabled mid-run* by a non-free-threaded import IS | ||
| # caught by the plugin, which is why we do not pass --ignore-gil-enabled.) | ||
| Invoke-Checked { & $python -c "import sys; assert not sys._is_gil_enabled(), 'GIL is enabled; parallel sweep has no signal'" } "interpreter is not GIL-free; parallel sweep has no signal" | ||
| Invoke-Checked { & $python -m pytest -n 0 -v --parallel-threads=2 compute/test_no_numba.py } "parallel-threads sweep failed" | ||
| } | ||
| } | ||
| finally { Pop-Location } |
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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.