[PATCH] D123812: [CUDA] Add wrapper code generation for registering CUDA images

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 20 12:01:03 PDT 2022


yaxunl added inline comments.


================
Comment at: clang/test/Driver/linker-wrapper-image.c:32
+// RUN: %clang -cc1 %s -emit-obj -o %t.o \
+// RUN:   -fembed-offload-object=%S/Inputs/dummy-elf.o,cuda,nvptx64-nvida-cuda,sm_70
+// RUN: clang-linker-wrapper --print-wrapped-module --dry-run -linker-path /usr/bin/ld \
----------------
what happens if there are multiple binaries for different GPUs? will the linker-wrapper generates one fatbinary containing both elfs and embed the fatbinary as one image?


================
Comment at: clang/test/Driver/linker-wrapper.c:46
+// RUN:   -fembed-offload-object=%S/Inputs/dummy-elf.o,cuda,nvptx64-nvida-cuda,sm_70 \
+// RUN:   -fembed-offload-object=%S/Inputs/dummy-elf.o,cuda,nvptx64-nvida-cuda,sm_70
+// RUN: clang-linker-wrapper --dry-run -linker-path /usr/bin/ld -- %t.o -o a.out \
----------------
This option is the same as the preceding option. Is this intentional? Can we have a test that embeds multiple binaries for different GPUs?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123812/new/

https://reviews.llvm.org/D123812



More information about the cfe-commits mailing list