| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 10 个月前 | ||
| 8 个月前 | ||
[OpenMP] [test] Skip the -mlong-double-80 test on MSVC ABI (#81115) Within the MSVC ABI, long doubles are the same as regular 64 bit doubles. This test case, which is compiled with -mlong-double-80, cannot work when libomp has been compiled without that flag, as -mlong-double-80 changes the calling convention for the tested functions. | 2 年前 | |
[OpenMP] Fix distributed barrier hang for OMP_WAIT_POLICY=passive (#83058) The resume thread logic inside __kmp_free_team() is faulty. Only checking b_go for sleep status doesn't wake up distributed barrier. Change to generic check for th_sleep_loc and calling __kmp_null_resume_wrapper(). Fixes: #80664 | 2 年前 | |
[OpenMP][Tests][NFC] Mark tests trying to link COI as unsupported For some tests with target-related functionality icc 18/19 tries to link libioffload_target.so.5, which fails for missing COI symbols. | 4 年前 | |
[OpenMP] Fixup bugs found during fuzz testing (#143455) A lot of these only trip when using sanitizers with the library. * Insert forgotten free()s * Change (-1) << amount to 0xffffffffu as left shifting a negative is UB * Fixup integer parser to return INT_MAX when parsing huge string of digits. e.g., 452523423423423423 returns INT_MAX * Fixup range parsing for affinity mask so integer overflow does not occur * Don't assert when branch bits are 0, instead warn user that is invalid and use the default value. * Fixup kmp_set_defaults() so the C version only uses null terminated strings and the Fortran version uses the string + size version. * Make sure the KMP_ALIGN_ALLOC is power of two, otherwise use CACHE_LINE. * Disallow ability to set KMP_TASKING=1 (task barrier) this doesn't work and hasn't worked for a long time. * Limit KMP_HOT_TEAMS_MAX_LEVEL to 1024, an array is allocated based on this value. * Remove integer values for OMP_PROC_BIND. The specification only allows strings and CSV of strings. * Fix setting KMP_AFFINITY=disabled + OMP_DISPLAY_AFFINITY=TRUE | 1 年前 | |
Fix for bugzilla https://bugs.llvm.org/show_bug.cgi?id=39970 Broken tests fixed Differential Revision: https://reviews.llvm.org/D55598 llvm-svn: 349017 | 7 年前 | |
[OpenMP] NFC: Fix trivial typo Differential Revision: https://reviews.llvm.org/D77430 | 6 年前 | |
Remove trailing whitespace from tests llvm-svn: 269841 | 10 年前 | |
[OpenMP][SIMD][FIX] Use conservative "omp simd ordered" lowering (#126172) A proposed fix for the issue #95611, [OpenMP][SIMD] ordered has no effect in a loop SIMD region as of LLVM 18.1.0 Changes: - Implement new lowering behavior: Conservatively serialize "omp simd" loops that have omp simd ordered directive to prevent incorrect vectorization (which results in incorrect execution behavior of the miscompiled program). Implementation outline: - We start with the optimistic default initial value of LoopStack.setParallel(/Enable=/true); in CodeGenFunction::EmitOMPSimdInit(const OMPLoopDirective &D). - We only disable the loop parallel memory access assumption with if (HasOrderedDirective) LoopStack.setParallel(/Enable=/false); using the HasOrderedDirective (which tests for the presence of an OMPOrderedDirective). - This results in no longer incorrectly vectorizing the loop when the omp simd ordered directive is present. Motivation: We'd like to prevent incorrect vectorization of the loops marked with the #pragma omp ordered simd directive which has previously resulted in miscompiled code. At the same time, we'd like the usage outside of the #pragma omp ordered simd context to remain unaffected: Note that in the test "clang/test/OpenMP/ordered_codegen.cpp" we only "lose" the !llvm.access.group metadata in foo_simd alone. This is conservative, in that it's possible some of the loops would be possible to vectorize, but we prefer to avoid miscompilation of the loops that are currently illegal to vectorize. A concrete example follows: cpp // "test.c" #include <float.h> #include <math.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> #include <time.h> int compare_float(float x1, float x2, float scalar) { const float diff = fabsf(x1 - x2); x1 = fabsf(x1); x2 = fabsf(x2); const float l = (x2 > x1) ? x2 : x1; if (diff <= l * scalar * FLT_EPSILON) return 1; else return 0; } #define ARRAY_SIZE 256 __attribute__((noinline)) void initialization_loop( float X[ARRAY_SIZE][ARRAY_SIZE], float Y[ARRAY_SIZE][ARRAY_SIZE]) { const float max = 1000.0; srand(time(NULL)); for (int r = 0; r < ARRAY_SIZE; r++) { for (int c = 0; c < ARRAY_SIZE; c++) { X[r][c] = ((float)rand() / (float)(RAND_MAX)) * max; Y[r][c] = X[r][c]; } } } __attribute__((noinline)) void omp_simd_loop(float X[ARRAY_SIZE][ARRAY_SIZE]) { for (int r = 1; r < ARRAY_SIZE; ++r) { for (int c = 1; c < ARRAY_SIZE; ++c) { #pragma omp simd for (int k = 2; k < ARRAY_SIZE; ++k) { #pragma omp ordered simd X[r][k] = X[r][k - 2] + sinf((float)(r / c)); } } } } __attribute__((noinline)) int comparison_loop(float X[ARRAY_SIZE][ARRAY_SIZE], float Y[ARRAY_SIZE][ARRAY_SIZE]) { int totalErrors_simd = 0; const float scalar = 1.0; for (int r = 1; r < ARRAY_SIZE; ++r) { for (int c = 1; c < ARRAY_SIZE; ++c) { for (int k = 2; k < ARRAY_SIZE; ++k) { Y[r][k] = Y[r][k - 2] + sinf((float)(r / c)); } } // check row for simd update for (int k = 0; k < ARRAY_SIZE; ++k) { if (!compare_float(X[r][k], Y[r][k], scalar)) { ++totalErrors_simd; } } } return totalErrors_simd; } int main(void) { float X[ARRAY_SIZE][ARRAY_SIZE]; float Y[ARRAY_SIZE][ARRAY_SIZE]; initialization_loop(X, Y); omp_simd_loop(X); const int totalErrors_simd = comparison_loop(X, Y); if (totalErrors_simd) { fprintf(stdout, "totalErrors_simd: %d \n", totalErrors_simd); fprintf(stdout, "%s : %d - FAIL: error in ordered simd computation.\n", __FILE__, __LINE__); } else { fprintf(stdout, "Success!\n"); } return totalErrors_simd; } Before: $ clang -fopenmp-simd -O3 -ffast-math -lm test.c -o test && ./test totalErrors_simd: 15408 test.c : 76 - FAIL: error in ordered simd computation. clang 19.1.0: https://godbolt.org/z/6EvhxqEhe After: $ clang -fopenmp-simd -O3 -ffast-math test.c -o test && ./test Success! Co-authored-by: Matt P. Dziubinski <matt-p.dziubinski@hpe.com> | 1 年前 | |
[OpenMP][Test][NFC] output tool data as hex to improve readibility (#152757) Using hex format allows to better interpret IDs: the first digits represent the thread number, the last digits represent the ID within a thread The main change is in callback.h: PRIu64 -> PRIx64 The patch also guards RUN/CHECK lines in openmp/runtime/tests/ompt with clang-format on/off comments and clang-formats the directory. --------- Co-authored-by: Kaloyan Ignatov <kaloyan.ignatov@rwth-aachen.de> | 11 个月前 | |
[OpenMP] Fix test omp_parallel_num_threads_list.c to require fewer threads. (#96916) Original test case used too many threads for some environments. This update reduces to a max of 36 threads. | 2 年前 | |
[OpenMP] Fix task state and taskteams for serial teams (#86859) * Serial teams now use a stack (similar to dispatch buffers) * Serial teams always use t_task_team[0] as the task team and the second pointer is a next pointer for the stack t_task_team[1] is interpreted as a stack of task teams where each level is a nested level inner serial team outer serial team [ t_task_team[0] ] -> (task_team) [ t_task_team[0] ] -> (task_team) [ next ] ----------------> [ next ] -> ... * Remove the task state memo stack from thread structure. * Instead of a thread-private stack, use team structure to store th_task_state of the primary thread. When coming out of a parallel, restore the primary thread's task state. The new field in the team structure doesn't cause sizeof(team) to change and is in the cache line which is only read/written by the primary thread. Fixes: #50602 Fixes: #69368 Fixes: #69733 Fixes: #79416 | 2 年前 | |
[OpenMP] Fixup bugs found during fuzz testing (#143455) A lot of these only trip when using sanitizers with the library. * Insert forgotten free()s * Change (-1) << amount to 0xffffffffu as left shifting a negative is UB * Fixup integer parser to return INT_MAX when parsing huge string of digits. e.g., 452523423423423423 returns INT_MAX * Fixup range parsing for affinity mask so integer overflow does not occur * Don't assert when branch bits are 0, instead warn user that is invalid and use the default value. * Fixup kmp_set_defaults() so the C version only uses null terminated strings and the Fortran version uses the string + size version. * Make sure the KMP_ALIGN_ALLOC is power of two, otherwise use CACHE_LINE. * Disallow ability to set KMP_TASKING=1 (task barrier) this doesn't work and hasn't worked for a long time. * Limit KMP_HOT_TEAMS_MAX_LEVEL to 1024, an array is allocated based on this value. * Remove integer values for OMP_PROC_BIND. The specification only allows strings and CSV of strings. * Fix setting KMP_AFFINITY=disabled + OMP_DISPLAY_AFFINITY=TRUE | 1 年前 | |
[OpenMP][Tests][NFC] Mark unsupported libomp tests for GCC This patch properly marks the support level for libomp test when testing with GCC. Some new OpenMP features were only introduced with GCC 11. Tests using the target construct are incompatibe with GCC. Tests pass now with GCC 10, 11, 12 | 3 年前 | |
[OpenMP] NFC: Fix trivial typos in comments Reviewers: jdoerfert, Jim Reviewed By: Jim Subscribers: Jim, mgorny, guansong, jfb, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D72285 | 6 年前 | |
[OpenMP] Clean-up Fortran tests * Use "do" for DO loops, there is no "for" in Fortran and it is always integer * Add -cpp to not rely on file name case * Add "implicit none" safety | 9 个月前 | |
LLVM Buildbot failure on openmp runtime test (#143674) Error looks to be missing includes for complex number support in some system. Removing test for now. Relevant PR : [PR-134709](https://github.com/llvm/llvm-project/pull/134709) .---command stderr------------ # | /home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/openmp/runtime/test/worksharing/for/omp_for_private_reduction.cpp:78:42: error: use of undeclared identifier 'I' # | 78 | double _Complex expected = 0.0 + 0.0 * I; # | | ^ # | /home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/openmp/runtime/test/worksharing/for/omp_for_private_reduction.cpp:79:40: error: use of undeclared identifier 'I' # | 79 | double _Complex result = 0.0 + 0.0 * I; # | | ^ # | /home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/openmp/runtime/test/worksharing/for/omp_for_private_reduction.cpp:84:22: error: use of undeclared identifier 'I' # | 84 | arr[i] = i - i * I; # | | ^ # | /home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/openmp/runtime/test/worksharing/for/omp_for_private_reduction.cpp:92:19: error: use of undeclared identifier 'creal' # | 92 | real_sum += creal(arr[i]); # | | ^~~~~ # | /home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/openmp/runtime/test/worksharing/for/omp_for_private_reduction.cpp:93:19: error: use of undeclared identifier 'cimag' # | 93 | imag_sum += cimag(arr[i]); # | | ^~~~~ # | /home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/openmp/runtime/test/worksharing/for/omp_for_private_reduction.cpp:96:36: error: use of undeclared identifier 'I' # | 96 | result = real_sum + imag_sum * I; # | | ^ # | /home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/openmp/runtime/test/worksharing/for/omp_for_private_reduction.cpp:97:9: error: use of undeclared identifier 'cabs' # | 97 | if (cabs(result - expected) > 1e-6) { # | | ^~~~ # | 7 errors generated. Co-authored-by: Chandra Ghale <ghale@pe31.hpc.amslabs.hpecorp.net> | 1 年前 | |
| 10 个月前 | ||
| 10 个月前 | ||
| 10 个月前 | ||
OpenMP Initial testsuite change to purely llvm-lit based testing This change introduces a check-libomp target which is based upon llvm's lit test infrastructure. Each test (generated from the University of Houston's OpenMP testsuite) is compiled and then run. For each test, an exit status of 0 indicates success and non-zero indicates failure. This way, FileCheck is not needed. I've added a bit of logic to generate symlinks (libiomp5 and libgomp) in the build tree so that gcc can be tested as well. When building out-of- tree builds, the user will have to provide llvm-lit either by specifying -DLIBOMP_LLVM_LIT_EXECUTABLE or having llvm-lit in their PATH. Differential Revision: http://reviews.llvm.org/D11821 llvm-svn: 248211 | 10 年前 | |
[openmp] [test] Fix warnings about printf format mismatches on Windows This fixes warnings like this: openmp/runtime/test/omp_testsuite.h:107:60: warning: format specifies type 'unsigned int' but the argument has type 'DWORD' (aka 'unsigned long') [-Wformat] fprintf(stderr, "CreateThread() failed: Error #%u.\n", GetLastError()); ~~ ^~~~~~~~~~~~~~ %lu Differential Revision: https://reviews.llvm.org/D137747 | 3 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 10 个月前 | ||
| 8 个月前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 7 年前 | ||
| 6 年前 | ||
| 10 年前 | ||
| 1 年前 | ||
| 11 个月前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 6 年前 | ||
| 9 个月前 | ||
| 1 年前 | ||
| 10 个月前 | ||
| 10 个月前 | ||
| 10 个月前 | ||
| 10 年前 | ||
| 3 年前 |