This revision was automatically updated to reflect the committed changes.
Closed by commit rC330425: [CUDA] Register relocatable GPU binaries (authored
by Hahnfeld, committed by ).
Repository:
rC Clang
https://reviews.llvm.org/D42922
Files:
lib/CodeGen/CGCUDANV.cpp
test/CodeGenCUDA/device
Hahnfeld updated this revision to Diff 143145.
Hahnfeld marked an inline comment as done.
Hahnfeld added a comment.
Move module ID to corresponding `else` branch.
https://reviews.llvm.org/D42922
Files:
lib/CodeGen/CGCUDANV.cpp
test/CodeGenCUDA/device-stub.cu
Index: test/CodeGenCUDA/device-
tra added inline comments.
Comment at: lib/CodeGen/CGCUDANV.cpp:364-377
+ llvm::Constant *NVModuleIDConstant;
+ SmallString<64> NVModuleID;
+ if (RelocatableDeviceCode) {
+// Generate a unique module ID.
+llvm::raw_svector_ostream OS(NVModuleID);
+OS << "__nv_" <<
Hahnfeld added inline comments.
Comment at: lib/CodeGen/CGCUDANV.cpp:283-285
+ llvm::FunctionType *RegisterGlobalsFnTy;
+ llvm::FunctionType *RegisterLinkedBinaryFnTy;
+ llvm::Function *DummyCallback;
tra wrote:
> Instead of tracking these through the conditio
Hahnfeld updated this revision to Diff 143136.
Hahnfeld marked 2 inline comments as done.
Hahnfeld added a comment.
Move `FunctionType`s to methods and change test prefixes.
https://reviews.llvm.org/D42922
Files:
lib/CodeGen/CGCUDANV.cpp
test/CodeGenCUDA/device-stub.cu
Index: test/CodeGenC
tra added inline comments.
Comment at: lib/CodeGen/CGCUDANV.cpp:283-285
+ llvm::FunctionType *RegisterGlobalsFnTy;
+ llvm::FunctionType *RegisterLinkedBinaryFnTy;
+ llvm::Function *DummyCallback;
Instead of tracking these through the conditionals of pretty lon
Hahnfeld added a comment.
Ping
https://reviews.llvm.org/D42922
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Hahnfeld updated this revision to Diff 141698.
Hahnfeld added a comment.
Correct test check prefix.
https://reviews.llvm.org/D42922
Files:
lib/CodeGen/CGCUDANV.cpp
test/CodeGenCUDA/device-stub.cu
Index: test/CodeGenCUDA/device-stub.cu
===
Hahnfeld updated this revision to Diff 141685.
Hahnfeld added a comment.
Sorry for the long delay. This update rebases the patch against current trunk
and adapts the regression test.
https://reviews.llvm.org/D42922
Files:
lib/CodeGen/CGCUDANV.cpp
test/CodeGenCUDA/device-stub.cu
Index: tes
Hahnfeld marked an inline comment as done.
Hahnfeld added inline comments.
Comment at: lib/CodeGen/CGCUDANV.cpp:330-331
// the GPU side.
for (const std::string &GpuBinaryFileName :
CGM.getCodeGenOpts().CudaGpuBinaryFileNames) {
llvm::ErrorOr> GpuBinaryOrErr =
-
tra added inline comments.
Comment at: lib/CodeGen/CGCUDANV.cpp:330-331
// the GPU side.
for (const std::string &GpuBinaryFileName :
CGM.getCodeGenOpts().CudaGpuBinaryFileNames) {
llvm::ErrorOr> GpuBinaryOrErr =
Hahnfeld wrote:
> tra wrote:
> >
Hahnfeld added inline comments.
Comment at: lib/CodeGen/CGCUDANV.cpp:330-331
// the GPU side.
for (const std::string &GpuBinaryFileName :
CGM.getCodeGenOpts().CudaGpuBinaryFileNames) {
llvm::ErrorOr> GpuBinaryOrErr =
tra wrote:
> Hahnfeld wrote
tra added inline comments.
Comment at: lib/CodeGen/CGCUDANV.cpp:330-331
// the GPU side.
for (const std::string &GpuBinaryFileName :
CGM.getCodeGenOpts().CudaGpuBinaryFileNames) {
llvm::ErrorOr> GpuBinaryOrErr =
Hahnfeld wrote:
> Can we actuall
Hahnfeld planned changes to this revision.
Hahnfeld added a comment.
Still no regression tests.
I did some functional tests though (https://reviews.llvm.org/F5822023): With
this patch Clang can generate valid object files with relocatable device code.
For linking I still defer to `nvcc` and I'm
Hahnfeld updated this revision to Diff 133831.
Hahnfeld added a comment.
Rebase and fix `Debug` build.
https://reviews.llvm.org/D42922
Files:
lib/CodeGen/CGCUDANV.cpp
Index: lib/CodeGen/CGCUDANV.cpp
===
--- lib/CodeGen/CGCUDANV.
Hahnfeld planned changes to this revision.
Hahnfeld added a comment.
I didn't write tests for this yet, but I wanted to get some early feedback on
this and show what I have in mind.
Comment at: lib/CodeGen/CGCUDANV.cpp:330-331
// the GPU side.
for (const std::string &Gpu
Hahnfeld created this revision.
Hahnfeld added reviewers: jlebar, tra, hfinkel.
Herald added a subscriber: cfe-commits.
nvcc generates a unique registration function for each object file
that contains relocatable device code. Unique names are achieved
with a module id that is also reflected in the
17 matches
Mail list logo