[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-09-20 Thread Kazushi Marukawa via Phabricator via cfe-commits
kaz7 added a comment. In D152054#4648318 , @sandeepkosuri wrote: > @kaz7, it seems that the thread_limit is being set properly, but the > `omp_get_thread_limit()` is giving a wrong output when you enable anything > more than `-O1`. I will fix it as soo

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-09-19 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri added a comment. @kaz7, it seems that the thread_limit is being set properly, but the `omp_get_thread_limit()` is giving a wrong output when you enable anything more than `-O1`. I will fix it as soon as I can. Meanwhile, if you absolutely want the test case to work right now, remo

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-09-11 Thread Kazushi Marukawa via Phabricator via cfe-commits
kaz7 added a comment. I figure out the reason of strange behavior I mentioned last night. However, I'm still not sure what is the good way to solve this problem. Can someone check the behavior with `-O2` option please? Thanks! Comment at: openmp/runtime/test/target/target_

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-09-10 Thread Kazushi Marukawa via Phabricator via cfe-commits
kaz7 added a comment. In D152054#4642793 , @tianshilei1992 wrote: > In D152054#4642725 , @kaz7 wrote: > >> I run check-openmp on our machine, this omp_get_thread_limit() returns >> default thread limit 214748364

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-09-10 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In D152054#4642725 , @kaz7 wrote: > I run check-openmp on our machine, this omp_get_thread_limit() returns > default thread limit 2147483647 (=0x7fff). That is something wrong because this patch is about host instead

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-09-10 Thread Kazushi Marukawa via Phabricator via cfe-commits
kaz7 added a comment. I cannot write inline comment, so I'm leaving message here. openmp/runtime/test/target/target_thread_limit.cpp: > // checking consecutive target regions with different thread_limits > #pragma omp target thread_limit(3) > > { > printf("\nsecond target: thread_limit = %

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-09-07 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: openmp/runtime/test/target/target_thread_limit.cpp:28 +// OMP51: target: parallel +// OMP51: target: parallel +// OMP51-NOT: target: parallel sandeepkosuri wrote: > mstorsjo wrote: > > mstorsjo wrote: > > > This test fa

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-09-07 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri added inline comments. Comment at: openmp/runtime/test/target/target_thread_limit.cpp:28 +// OMP51: target: parallel +// OMP51: target: parallel +// OMP51-NOT: target: parallel mstorsjo wrote: > mstorsjo wrote: > > This test fails when running (on W

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-31 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: openmp/runtime/test/target/target_thread_limit.cpp:28 +// OMP51: target: parallel +// OMP51: target: parallel +// OMP51-NOT: target: parallel mstorsjo wrote: > This test fails when running (on Windows) on GitHub Actions

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-30 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: openmp/runtime/test/target/target_thread_limit.cpp:28 +// OMP51: target: parallel +// OMP51: target: parallel +// OMP51-NOT: target: parallel This test fails when running (on Windows) on GitHub Actions runners - see ht

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D152054#4622642 , @vadikp-intel wrote: > Windows importing is now done by name, and new exports do not need to have an > ordinal specified for them i.e. you can add a line with just the API name to > dllexports. Oh, right,

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-28 Thread Vadim Paretsky via Phabricator via cfe-commits
vadikp-intel added a comment. Windows importing is now done by name, and new exports do not need to have an ordinal specified for them i.e. you can add a line with just the API name to dllexports. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1520

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added subscribers: vadikp-intel, natgla. mstorsjo added a comment. In D152054#4620927 , @mstorsjo wrote: > This new test is failing on Windows, due to `__kmpc_set_thread_limit` not > being exported - see e.g. > https://github.com/mstorsjo/llvm-

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. This new test is failing on Windows, due to `__kmpc_set_thread_limit` not being exported - see e.g. https://github.com/mstorsjo/llvm-mingw/actions/runs/5994183421/job/16264501555. Can someone add it to `openmp/runtime/src/dllexports`? Repository: rG LLVM Github Mon

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-26 Thread Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG08bbff4aad57: [OpenMP] Codegen support for thread_limit on target directive for host (authored by sandeepkosuri, committed by Sandeep Kosuri ). Repository: rG LLVM Github

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152054/new/ https://reviews.llvm.org/D152054 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-25 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri updated this revision to Diff 553487. sandeepkosuri added a comment. made new LIT test cases target specific to linux Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152054/new/ https://reviews.llvm.org/D152054 Files: clang/include/c

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-25 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri updated this revision to Diff 553405. sandeepkosuri added a comment. Made LIT test cases more robust to check lines ordering problem Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152054/new/ https://reviews.llvm.org/D152054 Files:

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-24 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri updated this revision to Diff 553358. sandeepkosuri added a comment. Used `CHECK-DAG` s to avoid LIT test failures on Windows system Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152054/new/ https://reviews.llvm.org/D152054 Files:

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152054/new/ https://reviews.llvm.org/D152054 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-24 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri updated this revision to Diff 553139. sandeepkosuri added a comment. Edited the LIT test cases to use more script generated check lines. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152054/new/ https://reviews.llvm.org/D152054 Files

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/OpenMP/target_parallel_for_simd_tl_codegen.cpp:30 +// OMP51-NEXT: entry: +// OMP51-NEXT:[[DOTGLOBAL_TID__ADDR_I:%.*]] = alloca i32, align 4 +// OMP51-NEXT:[[DOTPART_ID__ADDR_I:%.*]] = alloca ptr, align 8 -

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-24 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri marked an inline comment as done. sandeepkosuri added inline comments. Comment at: clang/test/OpenMP/target_parallel_for_simd_tl_codegen.cpp:30 +// OMP51-NEXT: entry: +// OMP51-NEXT:[[DOTGLOBAL_TID__ADDR_I:%.*]] = alloca i32, align 4 +// OMP51-NEXT:[[DOTPAR

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/OpenMP/target_parallel_for_simd_tl_codegen.cpp:30 +// OMP51-NEXT: entry: +// OMP51-NEXT:[[DOTGLOBAL_TID__ADDR_I:%.*]] = alloca i32, align 4 +// OMP51-NEXT:[[DOTPART_ID__ADDR_I:%.*]] = alloca ptr, align 8 -

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-23 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri marked an inline comment as done. sandeepkosuri added inline comments. Comment at: clang/test/OpenMP/target_parallel_for_simd_tl_codegen.cpp:30 +// OMP51-NEXT: entry: +// OMP51-NEXT:[[DOTGLOBAL_TID__ADDR_I:%.*]] = alloca i32, align 4 +// OMP51-NEXT:[[DOTPAR

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-23 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/OpenMP/target_parallel_for_simd_tl_codegen.cpp:30 +// OMP51-NEXT: entry: +// OMP51-NEXT:[[DOTGLOBAL_TID__ADDR_I:%.*]] = alloca i32, align 4 +// OMP51-NEXT:[[DOTPART_ID__ADDR_I:%.*]] = alloca ptr, align 8 -

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-23 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri updated this revision to Diff 552725. sandeepkosuri added a comment. Added PCH options to the RUN lines in LIT tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152054/new/ https://reviews.llvm.org/D152054 Files: clang/include/cl

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-09 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/OpenMP/target_parallel_for_simd_tl_codegen.cpp:4 + +// RUN: %clang_cc1 -fopenmp -fopenmp-version=51 -emit-llvm %s -o - | FileCheck --check-prefix=OMP51 %s + Add PCH serialization/desrialization checks in your

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-09 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri updated this revision to Diff 548518. sandeepkosuri added a comment. Used the python script `update_cc_test_checks.py` to generate the checks for the newly added tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152054/new/ https:

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-08 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Please, use the script to generate the checks for the newly added tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152054/new/ https://reviews.llvm.org/D152054 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-08 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri updated this revision to Diff 548082. sandeepkosuri added a comment. - Updated `SemaOpenMP.cpp` to support `thread_limit` clause on the newly allowed directives. - This update is to fix the newly added LIT tests' failures (which were occurring only on debug build) CHANGES SINCE

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152054/new/ https://reviews.llvm.org/D152054 ___

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-06 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri added a comment. In D152054#4560353 , @tianshilei1992 wrote: > Is this patch to support `thread_limit` on `target` directive on the host? Yes @tianshilei1992 , It is for host only Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-04 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. Is this patch to support `thread_limit` on `target` directive on the host? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152054/new/ https://reviews.llvm.org/D152054 ___ c

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-04 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9866 + (CGM.getLangOpts().OpenMP >= 51 && + needsTaskBasedThreadLimit(D.getDirectiveKind()) && + D.hasClausesOfKind()); ABataev wrote: > I think you don't need

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-07-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9866 + (CGM.getLangOpts().OpenMP >= 51 && + needsTaskBasedThreadLimit(D.getDirectiveKind()) && + D.hasClausesOfKind()); I think you don't need needsTaskBasedThreadLi

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-07-25 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri updated this revision to Diff 544201. sandeepkosuri added a comment. Explicitly mentioned `-fopenmp-version=51` in LIT test cases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152054/new/ https://reviews.llvm.org/D152054 Files: cla

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-07-25 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri updated this revision to Diff 543889. sandeepkosuri added a comment. - Added support for `thread_limit` clause on relevant combined directives which begin with `target` as per @ABataev 's comments. - Added additional LIT test cases to check codegen of the `thread_limit` on the newl

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-07-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: openmp/runtime/test/target/target_thread_limit.cpp:28 +// OMP51: target: parallel +// OMP51: target: parallel + This doesn't check much. You need to verify a 5th or print the team size. Same for the rest ===

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-06-30 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9818 + D.hasClausesOfKind() || + (CGM.getLangOpts().OpenMP >= 51 && D.getDirectiveKind() == OMPD_target && + D.hasClausesOfKind()); ABataev wrote: > What if D i

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-06-28 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9818 + D.hasClausesOfKind() || + (CGM.getLangOpts().OpenMP >= 51 && D.getDirectiveKind() == OMPD_target && + D.hasClausesOfKind()); What if D is combined target direc

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-06-12 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri updated this revision to Diff 530591. sandeepkosuri added a comment. Updated `target_codegen.cpp` test case to incorporate my changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152054/new/ https://reviews.llvm.org/D152054 Files:

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-06-03 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri created this revision. sandeepkosuri added reviewers: ABataev, soumitra, koops, RitanyaB, dreachem. Herald added subscribers: sunshaoce, guansong, yaxunl. Herald added a project: All. sandeepkosuri requested review of this revision. Herald added a reviewer: jdoerfert. Herald added sub