Skip to content

test(cuda.core): exercise the Windows Cython test wrapper in wheel CI - #3513

Open
rwgk wants to merge 3 commits into
mainfrom
rwgk/core-windows-cython-batch
Open

rwgk wants to merge 3 commits into
mainfrom
rwgk/core-windows-cython-batch

Conversation

@rwgk

@rwgk rwgk commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

— codex on behalf of Ralf —

Description

Add a native batch wrapper for building the cuda.core Cython tests. It supplies the Core and CUDA toolkit header directories to MSVC and delegates to the existing Python builder. The Windows Pixi task already points to this wrapper.

Run the batch wrapper in the Windows wheel build for both the current and maintenance CUDA variants. The wheel jobs upload the resulting extensions for the existing GPU test jobs. Linux builds continue through the shell wrapper.

xref: ctk-next 885

Checklist

  • I have read the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@copy-pr-bot

copy-pr-bot Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added CI/CD CI/CD infrastructure cuda.core Everything related to the cuda.core module labels Nov 20, 2026
@rwgk rwgk added the test Improvements or additions to tests label Nov 20, 2026
@rwgk rwgk self-assigned this Nov 20, 2026
@rwgk rwgk added this to the cuda.core 1.4.0 milestone Nov 20, 2026
@rwgk
rwgk marked this pull request as ready for review November 20, 2026 01:48
@rwgk

rwgk commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test adeb29a

@coderabbitai

coderabbitai Bot commented Nov 20, 2026

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Tests
    • Automated Cython test-extension builds now run in separate Linux and Windows steps for current and maintenance CUDA environments.
    • Maintenance CUDA test setup now clears generated build artifacts and removes existing CUDA packages before installing the required wheels.

The wheel workflow now separates Cython test preparation from OS-specific build steps for current and maintenance CUDA variants. Linux uses build_tests.sh; Windows uses a new batch wrapper that runs build_tests.py and returns its exit code.

Changes: CUDA Core Cython test builds

Layer / File(s) Summary
OS-specific build dispatch
.github/workflows/build-wheel.yml, cuda_core/tests/cython/build_tests.bat
The workflow routes current and maintenance variant builds to Linux or Windows steps based on runner OS. The new Windows wrapper sets INCLUDE, runs build_tests.py, and returns its exit code.

Suggested reviewers: juenglin, leofang

Change: Other

Merge Risk: Minimal · up to adeb2

This change adds a Windows build path for CUDA Core Cython tests in CI. It affects only the test-build workflow, and no concrete problem was found. It is low risk to merge.

Architecture risk: Low · up to adeb2

The change affects 1 system.

Changed systems: cuda_core

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — cuda_core (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in cuda_core/tests/cython/build_tests.bat: Adds a batch wrapper that configures INCLUDE, invokes build_tests.py, captures its exit code, and returns that code after ending the local environment.
  • observed — Modified behavior in .github/workflows/build-wheel.yml: The current-variant Cython test step is renamed from “Build” to “Prepare”; its condition and setup commands remain.
  • observed — Modified behavior in .github/workflows/build-wheel.yml: The former in-step Linux build command is replaced by OS-specific build steps: Linux runs build_tests.sh from cuda_core/tests/cython, while Windows runs build_tests.bat using cmd. Both are gated on current-variant core testing and their matching runner OS.
  • observed — Modified behavior in .github/workflows/build-wheel.yml: The maintenance-variant Cython test step is renamed from “Build” to “Prepare”; its condition and preparation commands remain.
- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between faeb2e2 and adeb29a.

Files selected for processing: 2

  • .github/workflows/build-wheel.yml
  • cuda_core/tests/cython/build_tests.bat

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

@github-actions

Copy link
Copy Markdown
Contributor

@rwgk
rwgk requested a review from juenglin November 20, 2026 03:47

@juenglin juenglin left a comment

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.

Approving to keep this aligned with NVIDIA-dev/cuda-python-private#885 and off the critical path. Could we track a follow-up that replaces the per-platform Cython test wrappers in all three roots (cuda_core, cuda_bindings_12, cuda_bindings_13) with a single cross-platform step?

The wrappers exist only to pass include directories to the compiler (CPLUS_INCLUDE_PATH on Linux, CL or INCLUDE on Windows). Each root's build_tests.py already loads _build_shared.py, so it can add the directories itself:

cuda_include_dir = Path(build_shared._get_cuda_path()) / "include"
for extension in ext_modules:
    extension.include_dirs += [str(core_include_dir), str(cuda_include_dir)]  # bindings: cuda_include_dir only
    extension.extra_compile_args.append("/std:c++17" if os.name == "nt" else "-std=c++17")

_get_cuda_path() resolves CUDA_PATH or CUDA_HOME the same way the package build does and raises if neither is set.

Then:

  • build-wheel.yml: replace the platform-specific steps for Core and bindings, both variants, with one step each: working-directory: <root>/tests/cython, run: python build_tests.py.
  • Each pixi.toml: merge the linux and win-64 build-cython-tests tasks into one task running python $PIXI_PROJECT_ROOT/tests/cython/build_tests.py.
  • Wrappers: delete build_tests.sh and build_tests.bat in all three roots, or reduce them to pass-throughs. Update the AGENTS.md and README references.
  • Behavior change to decide: on Linux, CPLUS_INCLUDE_PATH currently gives these headers system-header warning suppression, and include_dirs (-I) does not. Either accept the extra warnings or pass these directories as -isystem.

This branch has not been deployed

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

Labels

CI/CD CI/CD infrastructure cuda.core Everything related to the cuda.core module test Improvements or additions to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants