Skip to content

feat(cuda-oxide): opt-in 64-bit pointers (CUDA_OXIDE_NO_SHORT_PTR) via ExportTarget - #1820

Open
ssoj13 wants to merge 1 commit into
NVIDIA:mainfrom
ssoj13:feat/optix-wide-pointers
Open

ssoj13 wants to merge 1 commit into
NVIDIA:mainfrom
ssoj13:feat/optix-wide-pointers

Conversation

@ssoj13

@ssoj13 ssoj13 commented Nov 15, 2026

Copy link
Copy Markdown

Adds an opt-in \short-pointers = false\ / \CUDA_OXIDE_NO_SHORT_PTR\ mode selecting \ExportTarget::Ptx(PtxPointerWidth::Wide), running \llc\ without --nvptx-short-ptr\ and emitting the matching LLVM data layout without \p3:32.

OptiX programs fault on 32-bit short pointers in \shared/\constant/\local\ address spaces. Default behaviour is unchanged, and \ExportTarget\ makes invalid wide-pointer NVVM exports unrepresentable.

…a ExportTarget

llc always ran with --nvptx-short-ptr, so shared, constant and local
pointers were 32-bit and .local depots were addressed through
cvt.u32.u64 %r, %SPL. OptiX programs fault on that addressing; nvcc
never emits short pointers for OptiX code.

CUDA_OXIDE_NO_SHORT_PTR (short-pointers = false in .cargo/cuda-oxide.toml)
selects ExportTarget::Ptx(PtxPointerWidth::Wide): llc runs without
--nvptx-short-ptr and the exported module declares the matching data
layout (PtxWideExportConfig: no p3:32 entry), while making an NVVM
export with wide pointers unrepresentable in the type system. Default
behaviour is unchanged.

Co-authored-by: Gemini 4 Hydrogen <noreply@google.com>
Signed-off-by: Alex Khalyavin <joss13@gmail.com>
@ssoj13
ssoj13 requested a review from nihalpasham as a code owner November 15, 2026 03:03
@copy-pr-bot

copy-pr-bot Bot commented Nov 15, 2026

Copy link
Copy Markdown

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.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant