[CUDA][SPIRV] Assign global address space to CUDA kernel arguments
authorShangwu Yao <shangwuyao@waymo.com>
Thu, 17 Feb 2022 17:38:06 +0000 (09:38 -0800)
committerJustin Lebar <justin.lebar@gmail.com>
Thu, 17 Feb 2022 17:38:06 +0000 (09:38 -0800)
commit9de4fc0f2d3b60542956f7e5254951d049edeb1f
tree7f50d8f67dacb0de5c1a960b143f538fe0309e48
parent2404313d8023d2a650f4cd12f8b4e334c58f5736
[CUDA][SPIRV] Assign global address space to CUDA kernel arguments

This patch converts CUDA pointer kernel arguments with default address space to
CrossWorkGroup address space (__global in OpenCL). This is because Generic or
Function (OpenCL's private) is not supported as storage class for kernel pointer types.

Differential Revision: https://reviews.llvm.org/D119207
clang/lib/Basic/Targets/SPIR.h
clang/lib/CodeGen/TargetInfo.cpp
clang/test/CodeGenCUDASPIRV/kernel-argument.cu [new file with mode: 0644]