summaryrefslogtreecommitdiffstats
path: root/openmp/libomptarget/deviceRTLs/common
Commit message (Collapse)AuthorAgeFilesLines
* [OpenMP] NFC: Fix trivial typos in commentsKazuaki Ishizaki2020-01-076-11/+11
| | | | | | | | | | | | Reviewers: jdoerfert, Jim Reviewed By: Jim Subscribers: Jim, mgorny, guansong, jfb, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D72285
* [libomptarget][nfc] Change unintentional target_impl prefix to kmpc_implJon Chesterfield2019-12-301-2/+2
|
* [libomptarget][nfc] Provide target_impl malloc/freeJon Chesterfield2019-12-192-3/+2
| | | | | | | | | | | | | | | | | Summary: [libomptarget][nfc] Provide target_impl malloc/free Sufficient to build support.cu for amdgcn Reviewers: jdoerfert, ABataev, grokos Reviewed By: jdoerfert Subscribers: jvesely, mgorny, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D71685
* [libomptarget][nfc] Introduce atomic wrapper functionJon Chesterfield2019-12-186-21/+65
| | | | | | | | | | | | | | | | | | | Summary: [libomptarget][nfc] Introduce atomic wrapper function Wraps atomic functions in a template prefixed __kmpc_atomic that dispatches to cuda or hip atomic functions. Intended to be easily extended to dispatch to OpenCL or C++ atomics for a third target. Reviewers: ABataev, jdoerfert, grokos Reviewed By: jdoerfert Subscribers: Anastasia, jvesely, mgrang, dexonsmith, llvm-commits, mgorny, jfb, openmp-commits Tags: #openmp, #llvm Differential Revision: https://reviews.llvm.org/D71404
* [libomptarget][nfc] Extract function from data_sharing, move to commonJonChesterfield2019-12-181-0/+569
| | | | | | | | | | | | | | | | | | Summary: [libomptarget][nfc] Extract function from data_sharing, move to common Finding the first active thread in the warp is different on nvptx and amdgcn, mostly due to warp size and the desire for efficiency. Reviewers: ABataev, jdoerfert, grokos Reviewed By: jdoerfert Subscribers: jvesely, mgorny, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D71643
* [LIBOPENMP][NVPTX]Fix the build error in the runtime.Alexey Bataev2019-12-171-1/+1
|
* [libomptarget][nfc] Move three files under common, build them for amdgcnJonChesterfield2019-12-173-0/+1011
| | | | | | | | | | | | | | | | | Summary: [libomptarget][nfc] Move three files under common, build them for amdgcn Change to reduction.cu to remove two dead includes, otherwise no code change. Reviewers: jdoerfert, ABataev, grokos Reviewed By: jdoerfert Subscribers: jvesely, mgorny, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D71601
* [libomptarget][nfc] Wrap cuda min() in target_implJon Chesterfield2019-12-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Summary: [libomptarget][nfc] Wrap cuda min() in target_impl nvptx forwards to cuda min, amdgcn implements directly. Sufficient to build parallel.cu for amdgcn, added to CMakeLists. All call sites are homogenous except one that passes a uint32_t and an int32_t. This could be smoothed over by taking two type parameters and some care over the return type, but overall I think the inline <uint32_t> calling attention to what was an implicit sign conversion is cleaner. Reviewers: ABataev, jdoerfert Reviewed By: jdoerfert Subscribers: jvesely, mgorny, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D71580
* Revert "Revert "[libomptarget] Move resource id functions into target ↵JonChesterfield2019-12-162-13/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | specific code, implement for amdgcn"" Summary: This reverts commit dd8a7fcdd73dd63529b81bf9f72c7529dfe99ec3. Alexey reports undefined symbols for the new inline functions defined in target_impl.h This does not reproduce for me for nvptx, or amdgcn, under release or debug builds. I believe the patch is fine, based on: - the semantics of an inline function in C++ (the cuda INLINE functions end up as linkonce_odr in IR), which are only legal to drop if they have no uses - the code generated from a debug build of clang 9 does not show these undef symbols - the tests pass - the code is trivial To progress from here I either need: - A tie break - someone to play the role of CI in determining whether the patch works - Alexey to provide sufficient information about his build for me to reproduce the failure - Alexey to debug why the symbols are disappearing for him and report back Reviewers: ABataev, jdoerfert, grokos Subscribers: jvesely, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D71502
* Revert "[libomptarget] Move resource id functions into target specific code, ↵Alexey Bataev2019-12-132-1/+13
| | | | | | | implement for amdgcn" This reverts commit dbb3fec8adfc4ac3fbf31f51f294427dbabbebb2 since it breaks the NVPTX tests.
* [libomptarget] Move resource id functions into target specific code, ↵Jon Chesterfield2019-12-122-13/+1
| | | | | | | | | | | | | | | | implement for amdgcn Summary: [libomptarget] Move resource id functions into target specific code, implement for amdgcn Reviewers: jdoerfert, ABataev, grokos Reviewed By: jdoerfert Subscribers: jvesely, mgorny, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D71382
* [libomptarget][nfc] Move cuda threadfence functions behind kmpc_implJonChesterfield2019-12-063-4/+4
| | | | | | | | | | | | | | | | | Summary: [libomptarget][nfc] Move cuda threadfence functions behind kmpc_impl Part of building code under common/ without requiring a cuda compiler Reviewers: ABataev, jdoerfert, grokos Reviewed By: ABataev Subscribers: jvesely, jfb, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D71102
* [libomptarget][nfc] Move three more files to commonJon Chesterfield2019-12-063-0/+912
| | | | | | | | | | | | | | Summary: [libomptarget][nfc] Move three more files to common Reviewers: ABataev, jdoerfert, grokos Reviewed By: ABataev Subscribers: openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D71103
* [libomptarget][nfc] Introduce SHARED, ALIGN macrosJon Chesterfield2019-12-052-18/+18
| | | | | | | | | | | | | | | | Summary: [libomptarget][nfc] Introduce SHARED, ALIGN macros Move remaining cuda attributes behind such macros Reviewers: ABataev, jdoerfert, grokos Reviewed By: ABataev Subscribers: openmp-commits, jvesely Tags: #openmp Differential Revision: https://reviews.llvm.org/D71076
* [libomptarget][nfc] Move omptarget-nvptx under commonJon Chesterfield2019-12-055-2/+795
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: [libomptarget][nfc] Move omptarget-nvptx under common Almost all files depend on require omptarget-nvptx, which no longer contains any obviously architecture dependent code. Moving it under common unblocks task/loop for amdgcn, and allows moving other code. At some point there should probably be a widespread symbol renaming to replace the nvptx string. I'd prefer to get things working first. Building this (and task.cu, loop.cu) without a cuda library requires some more refactoring, e.g. wrap threadfence(), use DEVICE macro more consistently. Patches for that are orthogonal and will be posted shortly. Reviewers: jdoerfert, ABataev, grokos Reviewed By: ABataev Subscribers: mgorny, fedor.sergeev, jfb, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D71073
* [libomptarget] Build a minimal deviceRTL for amdgcnJonChesterfield2019-12-043-2/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: [libomptarget] Build a minimal deviceRTL for amdgcn Repeat of D70414, with an include path fixed. Diff for sanity checking. The CMakeLists.txt file is functionally identical to the one used in the aomp fork. Whitespace changes were made based on nvptx/CMakeLists.txt, plus the copyright notice updated to match (Greg was the original author so would like his sign off on that here). This change will build a small subset of the deviceRTL if an appropriate toolchain is available, e.g. a local install of rocm. Support.h is moved from nvptx as a dependency of debug.h. Reviewers: ABataev, jdoerfert Reviewed By: ABataev Subscribers: jvesely, mgorny, jfb, openmp-commits, jdoerfert Tags: #openmp Differential Revision: https://reviews.llvm.org/D70971
* Revert "[libomptarget] Build a minimal deviceRTL for amdgcn"Alexey Bataev2019-12-031-107/+0
| | | | | This reverts commit 877ffa716fba52251a7454ffd3727d025b617a1f because it breaks the build.
* [libomptarget] Build a minimal deviceRTL for amdgcnJon Chesterfield2019-12-031-0/+107
| | | | | | | | | | | | | | | | | | | | | | | | Summary: [libomptarget] Build a minimal deviceRTL for amdgcn The CMakeLists.txt file is functionally identical to the one used in the aomp fork. Whitespace changes were made based on nvptx/CMakeLists.txt, plus the copyright notice updated to match (Greg was the original author so would like his sign off on that here). This change will build a small subset of the deviceRTL if an appropriate toolchain is available, e.g. a local install of rocm. Support.h is moved from nvptx as a dependency of debug.h. Reviewers: jdoerfert, ABataev, grokos, ronlieb, gregrodgers Reviewed By: jdoerfert Subscribers: jfb, Hahnfeld, jvesely, mgorny, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D70414
* [libomptarget][nfc] Move some source into common from nvptxJon Chesterfield2019-11-187-0/+1508
Summary: [libomptarget][nfc] Move some source into common from nvptx Moves some source that compiles cleanly under amdgcn into a common subdirectory Includes some non-trivial files and some headers. Keeps the cuda file extension. The build systems for different architectures seem unlikely to have much in common. The idea is therefore to set include paths such that files under common/src compile as if they were under arch/src as the mechanism for sharing. In particular, files under common/src need to be able to include target_impl.h. The corresponding -Icommon is left out in favour of explicit includes on the basis that the it makes it clearer which files under common are used by a given architecture. Reviewers: jdoerfert, ABataev, grokos Reviewed By: ABataev Subscribers: jfb, mgorny, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D70328
OpenPOWER on IntegriCloud