There are HIP applications e.g. Tensorflow 1.3 using amdgpu kernel attributes, however
currently they are only allowed on OpenCL kernel functions.
This patch will allow amdgpu kernel attributes to be applied to CUDA/HIP __global__
functions.
Paths
| Differential D47958
[CUDA][HIP] Allow CUDA __global__ functions to have amdgpu kernel attributes ClosedPublic Authored by yaxunl on Jun 8 2018, 1:19 PM.
Details Summary There are HIP applications e.g. Tensorflow 1.3 using amdgpu kernel attributes, however This patch will allow amdgpu kernel attributes to be applied to CUDA/HIP __global__
Diff Detail Event TimelineHerald added subscribers: t-tye, tpr, dstuttard and 2 others. · View Herald TranscriptJun 8 2018, 1:19 PM Comment Actions Drive-by review: The patch could use a better description.
yaxunl retitled this revision from [CUDA][HIP] Allow CUDA kernel to have amdgpu kernel attributes to [CUDA][HIP] Allow CUDA `__global__` functions to have amdgpu kernel attributes.Jun 8 2018, 2:06 PM Comment Actions
Thanks for your suggestion. Modified the description.
yaxunl marked 2 inline comments as done. yaxunl retitled this revision from [CUDA][HIP] Allow CUDA `__global__` functions to have amdgpu kernel attributes to [CUDA][HIP] Allow CUDA __global__ functions to have amdgpu kernel attributes. Comment ActionsImprove error msg. This revision is now accepted and ready to land.Jun 12 2018, 10:34 AM Closed by commit rL334561: [CUDA][HIP] Allow CUDA __global__ functions to have amdgpu kernel attributes (authored by yaxunl). · Explain WhyJun 12 2018, 5:04 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 150872 include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaDeclAttr.cpp
test/CodeGenCUDA/amdgpu-kernel-attrs.cu
test/SemaCUDA/amdgpu-attrs.cutest/SemaOpenCL/invalid-kernel-attrs.cl
|
This is confusing. Isn't kernel == __global__ function?
Considering that the error message is diag::err_opencl_kernel_attr, I think the diagnostics should say applied to a OpenCL kernel function