Skip to content

onnxruntime: Fix cuda-toolkit version range - #11

Open
danimtb wants to merge 1 commit into
mainfrom
danimtb/onnx-fix
Open

onnxruntime: Fix cuda-toolkit version range#11
danimtb wants to merge 1 commit into
mainfrom
danimtb/onnx-fix

Conversation

@danimtb

@danimtb danimtb commented Aug 12, 2026

Copy link
Copy Markdown
Member

Summary

  • Version range in onnxruntime CUDA requirement from cuda-toolkit/[>=12 <14] to cuda-toolkit/[>=12 <13.3] so the sample no longer resolves to cuda-toolkit/13.3.1.
  • Workaround for an nvcc 13.3 host-parser regression that breaks the CUDA EP build when compiling moe_kernel.cu against Abseil container headers.
  • Unrelated to other sample/recipe branches; regressions started after cuda-toolkit/13.3.1 landed (Add cuda-toolkit/13.3.1 #8, ~2026-08-04). Earlier green runs used cuda-toolkit/13.2.x with the same abseil/20260107.1.

Root cause

With with_cuda=True, Conan resolves cuda-toolkit/[>=12 <14] to 13.3.1. Building ONNX Runtime’s MoE CUDA kernel fails in nvcc’s EDG/cudafe++ host path with errors like:

error: a using-declaration may not have the 'typename' keyword
... using template type parameter 'absl::...::IfRRef<...>::AddPtr<K>' after 'typename'

See failure at https://github.com/conan-io/cuda-conan/actions/runs/31498690863/job/94037761221

Seen in Abseil headers such as:

  • absl/container/internal/raw_hash_map.h
  • absl/container/internal/btree_container.h

Same Abseil + recipe combination builds with CUDA 13.2.x, so this is treated as an nvcc 13.3 incompatibility rather than an Abseil/recipe bug.

Fix

In samples/onnxruntime/all/conanfile.py:

  • self.requires("cuda-toolkit/[>=12 <13.3]")
  • Short comment documenting the nvcc 13.3 / Abseil macro issue

tool_requires("cuda-toolkit/<host_version>") stays unchanged and follows the host requirement (resolves to 13.2.2 today).

Test plan

  • Samples CI: onnxruntime with CUDA builds successfully (resolves cuda-toolkit/13.2.2)
  • Confirm graph does not select cuda-toolkit/13.3.1

See https://github.com/conan-io/cuda-conan/actions/runs/31582068953

TODO

  • Revisit this when NVIDIA/Abseil fix the nvcc 13.3 parse issue (or pin a known-good Abseil/CUDA pair)

@danimtb
danimtb requested a review from jcar87 August 12, 2026 10:41
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