Skip to content

[NVVM]Extend 12 ProgramOptions - #3289

Open
abhilash1910 wants to merge 1 commit into
NVIDIA:mainfrom
abhilash1910:fast_compile_nvvm
Open

abhilash1910 wants to merge 1 commit into
NVIDIA:mainfrom
abhilash1910:fast_compile_nvvm

Conversation

@abhilash1910

Copy link
Copy Markdown
Contributor

Description

Solves Issue #2954

_prepare_nvvm_options_impl raises CUDAError for ProgramOptions fields that
libNVVM cannot use, but its rejection list stopped at minimal. Twelve fields
that the NVRTC path emits were neither emitted nor rejected on NVVM, so setting
one of them for code_type="nvvm" had no effect and produced no error or
warning:
no_cache, fdevice_time_trace, device_float128, frandom_seed,
ofast_compile, pch, create_pch, use_pch, pch_dir, pch_verbose,
pch_messages, instantiate_templates_in_pch
libNVVM 12.9 and 13.4 return NVVM_ERROR_INVALID_OPTION for these flags (see
the issue thread), so none of them was ever doing anything on NVVM.

@leofang @Andy-Jost @rwgk for a look.

@copy-pr-bot

copy-pr-bot Bot commented Oct 29, 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 the cuda.core Everything related to the cuda.core module label Oct 29, 2026
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • NVVM compilation now reports a clear error when unsupported options are supplied, including cache, device timing, random seed, fast compilation, float128, and precompiled-header settings.
    • This makes these option conflicts visible at compilation time instead of allowing them to pass through without an explicit unsupported-option error.

NVVM option preparation now rejects additional unsupported settings and reports them through the existing CUDAError path. The unsupported-option test includes cases for these settings and checks that each option name appears in the error.

Changes: NVVM option rejection

Layer / File(s) Summary
Unsupported-option validation
cuda_core/cuda/core/_program.pyx, cuda_core/tests/test_program.py
Option preparation adds enabled no_cache, device_float128, and pch settings, plus non-None time-trace, random-seed, fast-compilation, and PCH configuration settings, to the unsupported-options list. Tests check that each option is rejected and named in the error.

Possibly related issues

  • Issue 2954: The change adds explicit rejection for the options identified in the issue, addressing the reported silent-ignore behavior.
  • Issue 3206: The change rejects ofast_compile; it does not implement the issue’s future pass-through behavior.

Suggested labels: bug, cuda.core

Suggested reviewers: andy-jost, rluo8

Priority: Normal

Change: Bug fix

Merge Risk: Minimal · up to 746fa

The change is ready to merge; unsupported NVVM options are rejected consistently without affecting omitted defaults.

Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@leofang leofang added this to the cuda.core 1.3.0 milestone Oct 29, 2026
@leofang leofang added the enhancement Any code-related improvements label Oct 29, 2026
@leofang

leofang commented Oct 29, 2026

Copy link
Copy Markdown
Member

/ok to test 746fa2c

@github-actions

Copy link
Copy Markdown
Contributor

@leofang

leofang commented Oct 30, 2026

Copy link
Copy Markdown
Member

Why didn't the pre-commit checks run... 🤔

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

cuda.core Everything related to the cuda.core module enhancement Any code-related improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants