Skip to content

Avoid absolute generated source paths in cuda.core builds - #2720

Draft
rwgk wants to merge 1 commit into
NVIDIA:mainfrom
rwgk:avoid_absolute_cython_build_paths
Draft

Avoid absolute generated source paths in cuda.core builds#2720
rwgk wants to merge 1 commit into
NVIDIA:mainfrom
rwgk:avoid_absolute_cython_build_paths

Conversation

@rwgk

@rwgk rwgk commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Description

Follow-up to #2472.

PR #2472 correctly placed Cython-generated sources in a CUDA-major-keyed directory anchored to the checkout. Cython then returns those generated C++ source paths as absolute paths. When setuptools maps an absolute source into build/temp, it reproduces the checkout path beneath that directory; sufficiently deep Windows worktrees can therefore exceed the linker path limit.

This change converts absolute extension source paths to paths relative to the project root after cythonize() returns. It preserves the anchored, CUDA-major-keyed generated-source cache from #2472, while preventing setuptools from embedding the full checkout path in its temporary object and linker output paths. Existing relative C++ source paths remain unchanged.

Verification

  • SKIP=lychee pre-commit run --all-files
  • TestVenv/bin/python -m pytest cuda_core/tests/test_build_hooks.py -v --noconftest (24 passed)
  • qa/runbook/qa_bindings_linux_build.sh 13.3

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@rwgk rwgk added this to the cuda.core 1.2.0 milestone Aug 28, 2026
@rwgk rwgk added CI/CD CI/CD infrastructure packaging Anything related to wheels or Conda packages cuda.core Everything related to the cuda.core module labels Aug 28, 2026
@rwgk rwgk self-assigned this Aug 28, 2026
@copy-pr-bot

copy-pr-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@rwgk

rwgk commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 0ba000b

@github-actions

Copy link
Copy Markdown

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 packaging Anything related to wheels or Conda packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant