[Openmp-commits] [PATCH] D66846: [libomptarget] Refactor macros from omptarget-nvptx to inline functions
Jon Chesterfield via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Aug 27 16:37:52 PDT 2019
JonChesterfield created this revision.
JonChesterfield added reviewers: jdoerfert, ABataev, bollu, jfb, tra, grokos, Hahnfeld, guansong, xtian, gregrodgers, ronlieb, hfinkel, gtbercea, guraypp, arpith-jacob.
Herald added a subscriber: dexonsmith.
Herald added a project: OpenMP.
[libomptarget] Refactor macros from omptarget-nvptx to inline functions
Removes architecture dependent macros from omptarget-nvptx.h in favour of inline
functions in target-impl.h. Inlines the sole use of #define __SYNCTHREADS_N.
Uses explicit types in preference to the int / unsigned of the cuda API.
An alternative to the inline #ifdef would be:
#if CUDA_VERSION >= 9000
#include "cuda_9/target_impl.h"
#else
#include "tbd/target_impl.h"
#endif
Tested by disassembling libomptarget-nvptx.a with and without. No codegen change.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D66846
Files:
openmp/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu
openmp/libomptarget/deviceRTLs/nvptx/src/loop.cu
openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h
openmp/libomptarget/deviceRTLs/nvptx/src/parallel.cu
openmp/libomptarget/deviceRTLs/nvptx/src/reduction.cu
openmp/libomptarget/deviceRTLs/nvptx/src/supporti.h
openmp/libomptarget/deviceRTLs/nvptx/src/sync.cu
openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66846.217529.patch
Type: text/x-patch
Size: 13271 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20190827/275b2ae9/attachment.bin>
More information about the Openmp-commits
mailing list