Skip to content

Conversation

@bratpiorka
Copy link
Contributor

Summary

This change updates clang-linker-wrapper to invoke NVIDIA fatbinary using the --image3=... image specification format (kind + SM + file) instead of the legacy --image=profile=... format, which is no longer supported in CUDA Toolkit version 13 and later.
Since newer CUDA toolkits have removed the legacy --image option, clang-linker-wrapper must use --image3 to maintain compatibility.

Changes

  • Refactored NVPTX fatbin construction to generate fatbinary arguments in the following form:
--image3=kind=ptx,sm=<N>,file=<ptx>
--image3=kind=elf,sm=<N>,file=<cubin>
  • Updated the fatbinary helper to consume OffloadingImage objects directly.
  • Adjusted driver tests to accept both legacy and --image3 formats where applicable.

@bratpiorka bratpiorka changed the title [CUDA] refactor fatbinary to use -image3 [CUDA] refactor fatbinary to use --image3 Jan 5, 2026
@bratpiorka bratpiorka force-pushed the rrudnick_cuda_fatbinary branch from 93f960e to 4ad6a4d Compare January 5, 2026 13:54
@bratpiorka bratpiorka force-pushed the rrudnick_cuda_fatbinary branch from 4ad6a4d to 118d33c Compare January 5, 2026 14:01
@bratpiorka bratpiorka marked this pull request as ready for review January 7, 2026 07:54
@bratpiorka bratpiorka requested review from a team as code owners January 7, 2026 07:54
@bratpiorka
Copy link
Contributor Author

@dpcpp-tools-reviewers @intel/dpcpp-clang-driver-reviewers the failures on Intel Arc in CI are unrelated, as the changes affect only CUDA code

@bratpiorka bratpiorka marked this pull request as draft January 7, 2026 08:19
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