- Feb 12, 2020
-
-
Kelvin Li authored
Change the string from "Intel(R) OMP" to "LLVM OMP" in libomp.so Differential Revision: https://reviews.llvm.org/D74462
-
Johannes Doerfert authored
[OpenMP][Offloading] Added support for multiple streams so that multiple kernels can be executed concurrently Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D74145
-
Johannes Doerfert authored
Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D74258
-
- Feb 07, 2020
-
-
Jonas Devlieghere authored
EXCLUDE_FROM_ALL means something else for add_lit_testsuite as it does for something like add_executable. Distinguish between the two by renaming the variable and making it an argument to add_lit_testsuite. Differential revision: https://reviews.llvm.org/D74168
-
- Feb 04, 2020
-
-
Jon Chesterfield authored
Summary: [libomptarget] Implement wavefront functions for amdgcn Reviewers: jdoerfert, ABataev, grokos, arsenm Reviewed By: arsenm Subscribers: saiislam, wdng, arsenm, jvesely, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D73077
-
protze@itc.rwth-aachen.de authored
Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=44733 | TEST 'libomp :: ompt/synchronization/reduction/tree_reduce.c' FAILED on 32-bit x86 ]] For 32-bit we need at least 3 variables to avoid atomic reduction to be choosen by runtime function `__kmp_determine_reduction_method`. This patch adds reduction variables to the testcase. Reviewers: mgorny, Hahnfeld Differential Revision: https://reviews.llvm.org/D73850
-
- Jan 27, 2020
-
-
Jon Chesterfield authored
This reverts commit 0e9374e3. Revert D73239. It fails some local testing, cause presently unknown
-
- Jan 23, 2020
-
-
Michał Górny authored
This fixed build failures due to missing ompt headers. See https://bugs.gentoo.org/700762. Differential Revision: https://reviews.llvm.org/D73249
-
Kelvin Li authored
The OpenMP spec defines the OMP_ATK_* and OMP_ATV_* to be lowercase. Differential Revision: https://reviews.llvm.org/D73248
-
Jon Chesterfield authored
Summary: [nfc][libomptarget] Remove SHARED annotation from local variables A few local variables in reduction.cu were marked SHARED. This patch leaves all per-kernel global state localised in omp_data.cu. Reviewers: ABataev, jdoerfert, grokos Reviewed By: jdoerfert Subscribers: openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D73239
-
- Jan 21, 2020
-
-
Alexey Bataev authored
[OpenMP][Offloading] Fix the issue that omp_get_num_devices returns wrong number of devices, by Shiley Tian. Summary: This patch is to fix issue in the following simple case: #include <omp.h> #include <stdio.h> int main(int argc, char *argv[]) { int num = omp_get_num_devices(); printf("%d\n", num); return 0; } Currently it returns 0 even devices exist. Since this file doesn't contain any target region, the host entry is empty so further actions like initialization will not be proceeded, leading to wrong device number returned by runtime function call. Reviewers: jdoerfert, ABataev, protze.joachim Reviewed By: ABataev Subscribers: protze.joachim Tags: #openmp Differential Revision: https://reviews.llvm.org/D72576
-
- Jan 20, 2020
-
-
David Carlier authored
- pthread affinity np has different semantic than sched affinity counterpart. On success returns strictly 0. Reviewers: chandlerc, AndreyChurbanov, jdoerfert Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D72132
-
Jon Chesterfield authored
Summary: [libomptarget] Implement smid for amdgcn Implementation is in a new file as it uses an intrinsic with complicated encoding that warranted substantial comments. Reviewers: jdoerfert, grokos, ABataev, ronlieb Reviewed By: jdoerfert Subscribers: jvesely, mgorny, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D72956
-
- Jan 16, 2020
-
-
Joachim Protze authored
Fix the memory leak pointed out in https://reviews.llvm.org/D70412. And a second one due to double-allocation. Reviewed by: Hahnfeld Differential revision: https://reviews.llvm.org/D72779
-
- Jan 15, 2020
-
-
George Rokos authored
The reference counter for global objects marked with declare target is INF. This patch prevents the runtime from incrementing /decrementing INF refcounts. Without it, the map(delete: global_object) directive actually deallocates the global on the device. With this patch, such a directive becomes a no-op. Differential Revision: https://reviews.llvm.org/D72525
-
- Jan 14, 2020
-
-
Joachim Protze authored
TSan spuriously reports for any OpenMP application a race on the initialization of a runtime internal mutex: ``` Atomic read of size 1 at 0x7b6800005940 by thread T4: #0 pthread_mutex_lock <null> (a.out+0x43f39e) #1 __kmp_resume_64 <null> (libomp.so.5+0x84db4) Previous write of size 1 at 0x7b6800005940 by thread T7: #0 pthread_mutex_init <null> (a.out+0x424793) #1 __kmp_suspend_initialize_thread <null> (libomp.so.5+0x8422e) ``` According to @AndreyChurbanov this is a false positive report, as the control flow of the runtime guarantees the ordering of the mutex initialization and the lock: https://software.intel.com/en-us/forums/intel-open-source-openmp-runtime-library/topic/530363 To suppress this report, I suggest the use of TSAN_OPTIONS='ignore_uninstrumented_modules=1'. With this patch, a runtime warning is provided in case an OpenMP application is built with Tsan and executed without this Tsan-option. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D70412
-
Jon Chesterfield authored
Summary: [nfc][libomptarget] Refactor nxptx/target_impl.cu Use __kmpc_impl_atomic_add instead of atomicAdd to match the rest of the file. Alternatively, target_impl.cu could use the cuda functions directly. Using a mixture in this file was an oversight, happy to resolve in either direction. Removed some comments that look outdated. Call __kmpc_impl_unset_lock directly to avoid a redundant diagnostic and remove an implict dependency on interface.h. Reviewers: ABataev, grokos, jdoerfert Reviewed By: jdoerfert Subscribers: jfb, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D72719
-
Jon Chesterfield authored
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
-
Joachim Protze authored
The OpenMP runtime is not instrumented, so entering the runtime leaves no hint on the source line of the pragma on ThreadSanitizer's function stack. This patch adds function entry/exit annotations for OpenMP parallel regions, and synchronization regions (barrier, taskwait, taskgroup). Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D70408
-
Joachim Protze authored
If the openmp project is built standalone, the test compiler is feature tested for an available -fsanitize=thread flag. If the openmp project is built as part of llvm, the target tsan is needed to test archer. An additional line (requires tsan) was introduced to the tests, this patch updates the line numbers for the race. Follow-up for 77ad98c8 Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D71914
-
- Jan 10, 2020
-
-
Alexey Bataev authored
Summary: If the dynamically loaded module has been compiled with -fopenmp-targets and has no target regions, it has empty target descriptor. It leads to a crash at the runtime if another module has at least one target region and at least one entry in its descriptor. The runtime library is unable to load the empty binary descriptor and terminates the execution. Caused by a clang-offload-wrapper. Reviewers: grokos, jdoerfert Subscribers: caomhin, kkwli0, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D72472
-
- Jan 07, 2020
-
-
Kazuaki Ishizaki authored
Reviewers: jdoerfert, Jim Reviewed By: Jim Subscribers: Jim, mgorny, guansong, jfb, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D72285
-
- Jan 06, 2020
-
-
Kelvin Li authored
__has_attribute(fallthough) -> __has_attribute(fallthrough) Submitted by: kiszk (Kazuaki Ishizaki <ishizaki@jp.ibm.com>) Differential Revision: https://reviews.llvm.org/D72287
-
- Jan 04, 2020
-
-
Kelvin Li authored
Submitted by: kiszk Differential Revision: https://reviews.llvm.org/D72171
-
- Dec 30, 2019
-
-
Jon Chesterfield authored
-
- Dec 27, 2019
-
-
protze@itc.rwth-aachen.de authored
Including two tests These callbacks were added late to the 5.0 specification, an implementation is missing. Reviewed By: jdoerfert Differential Review: https://reviews.llvm.org/D70395
-
- Dec 19, 2019
-
-
Jon Chesterfield authored
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
-
JonChesterfield authored
-
Jon Chesterfield authored
-
JonChesterfield authored
-
- Dec 18, 2019
-
-
Jon Chesterfield authored
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
-
JonChesterfield authored
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
-
- Dec 17, 2019
-
-
Alexey Bataev authored
-
JonChesterfield authored
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
-
JonChesterfield authored
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
-
Jon Chesterfield authored
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
-
Jon Chesterfield authored
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
-
- Dec 16, 2019
-
-
JonChesterfield authored
Revert "Revert "[libomptarget] Move resource id functions into target specific code, implement for amdgcn"" Summary: This reverts commit dd8a7fcd. 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
-
- Dec 13, 2019
-
-
Alexey Bataev authored
This reverts commit dbb3fec8 since it breaks the NVPTX tests.
-
Jon Chesterfield authored
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
-