Skip to content

feat(python): package CUDA as an optional extension#8510

Merged
0ax1 merged 3 commits into
developfrom
ad/pyvortex-cudf
Jun 24, 2026
Merged

feat(python): package CUDA as an optional extension#8510
0ax1 merged 3 commits into
developfrom
ad/pyvortex-cudf

Conversation

@0ax1

@0ax1 0ax1 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Keeps the base vortex-data wheel CPU-only and model CUDA support as a separate vortex-data-cuda extension package imported as vortex_cuda. The base package exposes vortex.cuda_extension_installed() to check whether the extension is importable, while vortex_cuda.cuda_available() performs the runtime CUDA probe.

Wires vortex-data[cuda] to depend on the exact matching vortex-data-cuda version, and have the CUDA package depend on the exact matching vortex-data version. Release automation updates those pins with the workspace version, but this change intentionally does not add CUDA wheel publishing jobs yet.

Keeps vortex-python-cuda out of the uv workspace so uv --all-packages on non-GPU CI does not build the CUDA crate chain. Add explicit CUDA Python checks to the GPU workflow instead, including the uv setup needed to run them.

Embeds generated PTX into vortex-cuda when available so installed wheels do not depend on build-machine kernel file paths at runtime.

@0ax1 0ax1 added feature A feature request changelog/feature A new feature and removed feature A feature request labels Jun 19, 2026
@0ax1 0ax1 requested review from gatesn and robert3005 June 19, 2026 15:14
@0ax1

0ax1 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

@robert3005 & @gatesn Lemme know if this directionally makes sense.

@0ax1 0ax1 force-pushed the ad/pyvortex-cudf branch from a5e293d to ff0ad18 Compare June 19, 2026 15:20
@codspeed-hq

codspeed-hq Bot commented Jun 19, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 11.93%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚡ 1 improved benchmark
✅ 1584 untouched benchmarks
⏩ 4 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation bitwise_not_vortex_buffer_mut[128] 273.6 ns 244.4 ns +11.93%

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing ad/pyvortex-cudf (c8ecde6) with develop (d0d400c)

Open in CodSpeed

Footnotes

  1. 4 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@0ax1 0ax1 force-pushed the ad/pyvortex-cudf branch 2 times, most recently from 671cae2 to c750545 Compare June 22, 2026 12:40
@0ax1 0ax1 changed the title feat(python): add cuda_enabled and vortex-data-cuda feat(python): package CUDA as an optional extension Jun 22, 2026
@0ax1 0ax1 force-pushed the ad/pyvortex-cudf branch 6 times, most recently from bb250db to 5df00e3 Compare June 22, 2026 16:43
@0ax1 0ax1 marked this pull request as ready for review June 22, 2026 17:57
@0ax1 0ax1 requested a review from a team June 22, 2026 17:58
@robert3005

Copy link
Copy Markdown
Contributor

@claude have a look. Is there a better way of setting version in pyproject.toml?

@github-actions

Copy link
Copy Markdown
Contributor

Claude review automation is disabled for pull requests that modify .github/ files.

Why:

  • workflow and action files are part of the automation policy
  • this review workflow refuses to evaluate automation changes from the same PR

Ask a human reviewer to inspect workflow changes directly.

@robert3005 robert3005 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.

Only the version rewrite is a nit

Comment thread .github/workflows/package.yml Outdated
0ax1 added 2 commits June 24, 2026 14:37
Keep the base vortex-data wheel CPU-only and model CUDA support as a
separate vortex-data-cuda extension package imported as vortex_cuda. The
base package exposes vortex.cuda_extension_installed() to check whether
the optional extension is importable, while vortex_cuda.cuda_available()
performs the runtime CUDA driver/device probe.

Wire vortex-data[cuda] to depend on the exact matching vortex-data-cuda
version, and have the CUDA package depend on the exact matching
vortex-data version. Release automation updates those pins with the
workspace version, but this change intentionally does not add CUDA wheel
publishing jobs yet.

Keep vortex-python-cuda out of the uv workspace so uv --all-packages on
non-GPU CI does not build the CUDA crate chain. Exercise it through the
GPU CUDA workflow instead, and exclude the thin PyO3 shim from broad
workspace doc/doctest/instrumented jobs where it has no Rust tests or
doctests.

Embed generated PTX into vortex-cuda when nvcc is available so installed
wheels do not depend on build-machine kernel file paths at runtime.
Runtime kernel loading is embedded-only; the old VORTEX_CUDA_KERNELS_DIR
path override and Codspeed kernel staging were removed.

Make cuda_available() resilient on driverless hosts by probing libcuda
with cudarc before creating a CUDA context, so CPU-only machines return
false instead of panickingq

Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
@0ax1 0ax1 force-pushed the ad/pyvortex-cudf branch from 5df00e3 to 4c7eb01 Compare June 24, 2026 12:41
@0ax1 0ax1 enabled auto-merge (squash) June 24, 2026 12:42
Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
@0ax1 0ax1 merged commit d300645 into develop Jun 24, 2026
71 checks passed
@0ax1 0ax1 deleted the ad/pyvortex-cudf branch June 24, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants