Skip to content

Use cuda.pathfinder to locate nvcc for object-code fixture - #2284

Merged
rwgk merged 2 commits into
NVIDIA:mainfrom
rwgk:use-pathfinder-nvcc-for-object-code-test-fixture
Jul 1, 2026
Merged

Use cuda.pathfinder to locate nvcc for object-code fixture#2284
rwgk merged 2 commits into
NVIDIA:mainfrom
rwgk:use-pathfinder-nvcc-for-object-code-test-fixture

Conversation

@rwgk

@rwgkrwgk commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Description

This fixes the cuda.core object-code test fixture in environments where nvcc is available through cuda.pathfinder, but is not directly on PATH.

Previously, get_saxpy_object() checked whether cuda.pathfinder could locate nvcc, but then invoked build_test_binaries.sh without passing that resolved path through. The shell script still called bare nvcc, so the fallback build failed when nvcc was discoverable but not on PATH.

This PR:

  • resolves nvcc once with find_nvidia_binary_utility("nvcc");
  • passes the resolved path to build_test_binaries.sh through NVCC;
  • keeps the shell script usable by hand by defaulting NVCC to nvcc.

@rwgkrwgk added this to the cuda.core next milestone Jul 1, 2026
@rwgkrwgk self-assigned this Jul 1, 2026
@rwgkrwgk added bug Something isn't working P0 High priority - Must do! cuda.core Everything related to the cuda.core module labels Jul 1, 2026
@copy-pr-bot

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 Jul 1, 2026

Copy link
Copy Markdown
ContributorAuthor

/ok to test

@github-actions

This comment has been minimized.

Comment on lines +198 to +199
env = os.environ.copy()
env["NVCC"] = nvcc_path

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@rwgkrwgk changed the title Use pathfinder nvcc for object-code test fixtureUse cuda.pathfinder to locate nvcc for object-code fixtureJul 1, 2026
@rwgk

rwgk commented Jul 1, 2026

Copy link
Copy Markdown
ContributorAuthor

/ok to test

@rwgk
rwgk marked this pull request as ready for review July 1, 2026 18:15

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

Good catch. Passing the pathfinder-resolved nvcc through NVCC closes the gap with the shell script's bare nvcc call.

@rwgk
rwgk enabled auto-merge (squash) July 1, 2026 18:40
@rwgk
rwgk merged commit 2780efd into NVIDIA:mainJul 1, 2026
108 checks passed
@github-actions

Copy link
Copy Markdown
Doc Preview CI
Preview removed because the pull request was closed or merged.

@rwgk
rwgk deleted the use-pathfinder-nvcc-for-object-code-test-fixture branch July 1, 2026 22:05
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugSomething isn't workingcuda.coreEverything related to the cuda.core moduleP0High priority - Must do!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@rwgk@lijinf2@leofang