[PATCH] D32431: [Polly] Added OpenCL Runtime to GPURuntime Library for GPGPU CodeGen

Singapuram Sanjay Srivallabh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 29 09:33:25 PDT 2017


singam-sanjay added inline comments.


================
Comment at: lib/CodeGen/PPCGCodeGeneration.cpp:1623
+    else if (Runtime == GPURuntime::OpenCL)
+      GPUTriple = llvm::Triple(Triple::normalize("nvptx64-nvidia-nvcl"));
+    break;
----------------
PhilippSchaad wrote:
> singam-sanjay wrote:
> > Does `nvptx64-nvidia-nvcl` mean OpenCL code meant to be run on NVIDIA GPUs ?
> Yes, exactly. It generates a slightly different flavor of PTX, which can be used by OpenCL to generate a kernel from the PTX binary (on NVIDIA GPUs). If you were to use the standard CUDA PTX, OpenCL would complain because of wrong argument accesses.
Okay. From what you're saying, `nvptx64-nvidia-nvcl` indicates that backend must generate NVPTX code for a 64bit architecture for an NVIDIA GPU controlled by a OpenCL driver. Please correct me if I'm wrong.


Repository:
  rL LLVM

https://reviews.llvm.org/D32431





More information about the llvm-commits mailing list