summaryrefslogtreecommitdiffstats
path: root/openmp/libomptarget/deviceRTLs/amdgcn
Commit message (Collapse)AuthorAgeFilesLines
* [nfc][libomptarget] Refactor amdgcn target_implJon Chesterfield2020-01-143-60/+57
| | | | | | | | | | | | | | | | | | | | | | | | Summary: [nfc][libomptarget] Refactor amdgcn target_impl Removes references to internal libraries from the header Standardises on C++ mangling for all the target_impl functions Update comment block clang-format Move some functions into a new target_impl.hip source file This lays the groundwork for implementing the remaining unresolved symbols in the target_impl.hip source. Reviewers: jdoerfert, grokos, ABataev, ronlieb Reviewed By: jdoerfert Subscribers: jvesely, mgorny, jfb, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D72712
* [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-0/+5
| | | | | | | | | | | | | | | | | 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][nvptx] Fix build, second symbol reorderingJonChesterfield2019-12-191-2/+2
|
* [libomptarget][nvptx] Fix build, symbol ordering in target_impl.hJon Chesterfield2019-12-191-2/+2
|
* [libomptarget][amdgcn] Correct return type of extern __clock64 to unsignedJonChesterfield2019-12-191-1/+1
|
* [libomptarget][nfc] Introduce atomic wrapper functionJon Chesterfield2019-12-181-0/+1
| | | | | | | | | | | | | | | | | | | 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-182-2/+5
| | | | | | | | | | | | | | | | | | 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
* [libomptarget][nfc] Move three files under common, build them for amdgcnJonChesterfield2019-12-171-0/+3
| | | | | | | | | | | | | | | | | 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] Move omp locks under target_implJonChesterfield2019-12-172-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: [libomptarget][nfc] Move omp locks under target_impl These are likely to be target specific, even down to the lock_t which is correspondingly moved out of interface.h. The alternative is to include interface.h in target_impl which substantiatially increases the scope of those symbols. The current nvptx implementation deadlocks on amdgcn. The preferred implementation for that arch is still under discussion - this change leaves declarations in target_impl. The functions could be inline for nvptx. I'd prefer to keep the internals hidden in the target_impl translation unit, but will add the (possibly renamed) macros to target_impl.h if preferred. Reviewers: ABataev, jdoerfert, grokos Reviewed By: jdoerfert Subscribers: jvesely, mgorny, jfb, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D71574
* [libomptarget][nfc] Move timer functions behind target_implJon Chesterfield2019-12-171-0/+7
| | | | | | | | | | | | | | Summary: [libomptarget][nfc] Move timer functions behind target_impl Reviewers: jdoerfert, ABataev, grokos Reviewed By: jdoerfert Subscribers: jvesely, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D71584
* [libomptarget][nfc] Wrap cuda min() in target_implJon Chesterfield2019-12-172-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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-161-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-131-8/+0
| | | | | | | implement for amdgcn" This reverts commit dbb3fec8adfc4ac3fbf31f51f294427dbabbebb2 since it breaks the NVPTX tests.
* [libomptarget] Build most of common/src for amdgcnJon Chesterfield2019-12-131-1/+7
| | | | | | | | | | | | | | | | | | Summary: [libomptarget] Build most of common/src for amdgcn Excluding parallel.cu, which uses an integer min() from cuda, Excluding support.cu, which calls malloc that is not yet available for amdgcn Reviewers: jdoerfert, ABataev, grokos Reviewed By: jdoerfert Subscribers: gregrodgers, ronlieb, jvesely, mgorny, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D71446
* [libomptarget][nfc] Add nop syncwarp function for amdgcnJon Chesterfield2019-12-131-0/+4
|
* [libomptarget][nfc] Add declarations of atomic functions for amdgcnJon Chesterfield2019-12-123-0/+42
| | | | | | | | | | | | | | | | | | Summary: [libomptarget][nfc] Add declarations of atomic functions for amdgcn This enables building more source for amdgcn. The functions are usually available in a hip runtime header, but are duplicated here to decouple the implementation Reviewers: jdoerfert, ABataev, grokos Reviewed By: jdoerfert Subscribers: jvesely, mgorny, jfb, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D71412
* [libomptarget] Move resource id functions into target specific code, ↵Jon Chesterfield2019-12-121-0/+8
| | | | | | | | | | | | | | | | 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] Add missing header for amdgcn/target_implJon Chesterfield2019-12-121-1/+3
|
* [libomptarget][nfc] Move cuda threadfence functions behind kmpc_implJonChesterfield2019-12-061-0/+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] Introduce SHARED, ALIGN macrosJon Chesterfield2019-12-051-0/+2
| | | | | | | | | | | | | | | | 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] Build a minimal deviceRTL for amdgcnJonChesterfield2019-12-042-13/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-033-181/+13
| | | | | This reverts commit 877ffa716fba52251a7454ffd3727d025b617a1f because it breaks the build.
* [libomptarget] Build a minimal deviceRTL for amdgcnJon Chesterfield2019-12-033-13/+181
| | | | | | | | | | | | | | | | | | | | | | | | 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
* [nfc][libomptarget] Write amdgcn macros in terms of compiler intrinsicsJonChesterfield2019-11-191-3/+3
|
* [libomptarget] Implement target_impl for amdgcnJonChesterfield2019-11-012-0/+148
Summary: [libomptarget] Implement target_impl for amdgcn Smallest atomic addition for a new target. Implements enough of the amdgcn specific code that some of the source files under nvptx/src could be compiled, without modification, to run on amdgcn. This foreshadows a work in progress patch to move said source out of nvptx/src. Patch based on fork at https://github.com/ROCm-Developer-Tools/llvm-project Reviewers: ABataev, jdoerfert, grokos, ronlieb Subscribers: jvesely, jfb, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D69718
OpenPOWER on IntegriCloud