| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[OpenMP] Remove XFAIL for cancellation tests using gcc llvm-svn: 354370 | 7 年前 | |
[openmp] Provide an assembly implementation of __kmp_invoke_microtask on ARM This fixes passing an arbitrarily large number of arguments to microtasks, fixing the misc_bugs/many-microtask-args.c testcase on ARM. Differential Revision: https://reviews.llvm.org/D138704 | 3 年前 | |
[OpenMP] [Flang] Resolved Issue llvm#76121: Implemented Check for Unhandled Arguments in __kmpc_fork_call_if (#82221) Root cause: Segmentation fault is caused by null pointer dereference inside the __kmpc_fork_call_if function at https://github.com/llvm/llvm-project/blob/main/openmp/runtime/src/z_Linux_asm.S#L1186 . __kmpc_fork_call_if is missing case to handle argc=0 . Fix: Added a check inside the __kmp_invoke_microtask function to handle the case when argc is 0. --------- Co-authored-by: Singh <chasingh@amd.com> | 2 年前 | |
[OpenMP][Tests] Fix compiler warnings in OpenMP runtime tests This patch allows to pass the OpenMP runtime tests after configuring with cmake . -DOPENMP_TEST_FLAGS:STRING="-Werror". The warnings for OMPT tests are addressed in D90752. Differential Revision: https://reviews.llvm.org/D91280 | 5 年前 | |
[OpenMP] return empty stmt for nothing (#74042) - nothing directive was effecting the if block structure which it should not. So return an empty statement instead of an error statement while parsing to avoid this. | 2 年前 | |
[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 年前 | |
Added propagation of not big initial stack size of master thread to workers. Currently implemented only for non-Windows 64-bit platforms. Differential Revision: https://reviews.llvm.org/D62488 llvm-svn: 362618 | 7 年前 | |
Fixed intermittent hang on tests with "target teams if(0)" construct with no parallel inside. Differential Revision: https://reviews.llvm.org/D29597 llvm-svn: 298373 | 9 年前 | |
Fix alignment in teams-reduction.c test The runtime will use the global kmp_critical_name as a lock and tries to atomically store a pointer in there. This will fail if the global is only aligned by 4 bytes, the size of one int32_t element. Use a union to ensure the global is aligned to the size of a pointer on the current platform. llvm-svn: 319811 | 8 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 7 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 5 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 7 年前 | ||
| 9 年前 | ||
| 8 年前 |