[PATCH] D32431: [Polly] Added OpenCL Runtime to GPURuntime Library for GPGPU CodeGen
Hongbin Zheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 25 17:12:14 PDT 2017
etherzhhb added inline comments.
================
Comment at: include/polly/LinkAllPasses.h:51
#ifdef GPU_CODEGEN
-llvm::Pass *createPPCGCodeGenerationPass();
+llvm::Pass *createPPCGCodeGenerationPass(int Runtime);
#endif
----------------
is this Runtime supposed to be with type GPURuntimeT ? it is a little bit tricky here.
Maybe we need to introduce a PPCG header and define the runtime enum there, than include that runtime enum.
or we can declare the function as
```
llvm::Pass *createPPCGCodeGenerationPass(int Runtime = 0);
```
to at least avoid the magic number 0 in line 86.
================
Comment at: lib/CodeGen/PPCGCodeGeneration.cpp:1562
+ else if (GPUNodeBuilder::Runtime == GPU_RUNTIME_OPENCL)
+ GPUModule->setTargetTriple(Triple::normalize("nvptx64-nvidia-nvcl"));
+
----------------
PhilippSchaad wrote:
> Meinersbur wrote:
> > Is there some vendor-neutral triple?
> Do you mean like `nvptx64-nvcl` / `nvptx64-cuda`?
for opencl, it can be "spir-unknown-unknown" or "spir64-unknown-unknown", but that may not work :)
https://reviews.llvm.org/D32431
More information about the llvm-commits
mailing list