[PATCH] [cuda] Include GPU binary into host object file and generate init/deinit code.
Artem Belevich
tra at google.com
Wed May 6 12:36:16 PDT 2015
================
Comment at: lib/CodeGen/CGCUDANV.cpp:23
@@ -22,2 +22,3 @@
#include "llvm/IR/DerivedTypes.h"
+#include "llvm/IR/Verifier.h"
#include <vector>
----------------
echristo wrote:
> Unused include?
Verifier.h is used and needed, but vector was indeed superfluous.
================
Comment at: lib/CodeGen/CGCUDANV.cpp:43
@@ +42,3 @@
+ llvm::SmallVector<llvm::Function *, 16> EmittedKernels;
+ /// Keeps track of variables containing handles of GPU binaries Populated by
+ /// ModuleCtorFunction() and used to create corresponding cleanup calls in
----------------
eliben wrote:
> Nit: period (or semicolon) after "binaries"?
Done.
================
Comment at: lib/CodeGen/CGCUDANV.cpp:240
@@ +239,3 @@
+
+ for (const std::string &GpuBinaryFileName :
+ CGM.getCodeGenOpts().CudaGpuBinaryFileNames) {
----------------
echristo wrote:
> Comment this loop please?
Done.
================
Comment at: test/CodeGenCUDA/device-stub.cu:5
@@ -4,1 +4,3 @@
+// Test for presence of elements we construct for constructor and destructor:
+// * constant unnamed string with the kernel name
----------------
echristo wrote:
> Reword this in some way? It's a bit oddly phrased :)
Done.
================
Comment at: test/CodeGenCUDA/device-stub.cu:29
@@ +28,3 @@
+
+// Test that be build correct kernel launch sequence.
+// CHECK: define{{.*}}hostfunc
----------------
echristo wrote:
> "Test that we"
Fixed.
http://reviews.llvm.org/D9507
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list