[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2023-06-06 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. I'm trying to pick up the context for this and D95976 . Superficially it looks like lowering variadic functions in the compiler could be used to simplify quite a lot of this, @jdoerfert there's a comment from some time ago which

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2023-04-04 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added a comment. In D102107#4243260 , @jhuber6 wrote: > Fixed the Clang tests. Haven't touched the LLVM ones because this breaks > SPMDzation and state machine rewrites completely in those tests. Someone who > knows what this patch changes sh

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2023-04-04 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 510797. jhuber6 added a comment. Herald added subscribers: kbarton, nemanjai. Fixed the Clang tests. Haven't touched the LLVM ones because this breaks SPMDzation and state machine rewrites completely in those tests. Someone who knows what this patch changes

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2023-04-04 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added a comment. I rebased the patch and regenerated the clang tests. I haven't regenerated the llvm tests. @jhuber6 @jdoerfert Please help regenerate the llvm tests. Several of the failing clang tests were regenerated earlier, they can perhaps be regenerated after the llvm tests are

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2023-04-03 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak updated this revision to Diff 510706. dhruvachak added a comment. Herald added subscribers: jplehr, sunshaoce, kerbowa. Rebased and updated tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102107/new/ https://reviews.llvm.org/D102107

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2023-01-17 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added a comment. After rebasing on top of main today and regenerating all the auto-update clang tests, here are the test results. The AST tests have to be updated manually as Johannes mentioned earlier. I haven't looked at the other clang test failures. The llvm tests need to be fixe

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2023-01-17 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak updated this revision to Diff 490030. dhruvachak added a comment. Herald added a subscriber: pcwang-thead. Rebased. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102107/new/ https://reviews.llvm.org/D102107 Files: clang/lib/CodeGen/CG

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-11-14 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added a comment. @jhuber6 Turns out a rebase on top of trunk had ~200 test conflicts. During my last update in Sep, I had resolved all of the clang test conflicts and failures, there were only llvm test failures. At this point, I checked out commit 92bc3fb5

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-11-14 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak updated this revision to Diff 475341. dhruvachak edited the summary of this revision. dhruvachak added a comment. Herald added subscribers: kosarev, jvesely. Rebased. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102107/new/ https://revi

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-11-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D102107#3922842 , @dhruvachak wrote: > In D102107#3921948 , @jhuber6 wrote: > >> @dhruvachak Do you still need help updating the LLVM tests? > > If you go a few messages back, there ar

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-11-11 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added a comment. In D102107#3921948 , @jhuber6 wrote: > @dhruvachak Do you still need help updating the LLVM tests? If you go a few messages back, there are some llvm tests that @jdoerfert said were not updated properly. Can someone help upda

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-11-11 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. @dhruvachak Do you still need help updating the LLVM tests? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102107/new/ https://reviews.llvm.org/D102107 ___ cfe-commits mailing lis

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-11-11 Thread Fabio Luporini via Phabricator via cfe-commits
FabioLuporini added a comment. Hi, any chance this will be completed any time soon? We are very keen to resurrect our clang-based OpenMP offloading pipeline at https://github.com/devitocodes/devito :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-09-24 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. I'm unlikely to get to it in the next 2 weeks (IWOMP and OpenMP F2F). What I would do is to take the new IR, the old IR, run instnamer on the new one. Then splice in the new parts into the old IR removing what was there wrt. parallel_51. Repository: rG LLVM Github

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-09-23 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added a comment. In D102107#3812946 , @jdoerfert wrote: > In D102107#3812582 , @dhruvachak > wrote: > >> In D102107#3812554 , @dhruvachak >> wrote: >> >>> Upd

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-09-23 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D102107#3812582 , @dhruvachak wrote: > In D102107#3812554 , @dhruvachak > wrote: > >> Updated llvm tests. The following 3 tests still fail: >> >> LLVM :: Transforms/OpenMP/spmdiza

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-09-23 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added a comment. In D102107#3812554 , @dhruvachak wrote: > Updated llvm tests. The following 3 tests still fail: > > LLVM :: Transforms/OpenMP/spmdization_constant_prop.ll > LLVM :: Transforms/OpenMP/spmdization_guarding_two_reaching_kerne

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-09-23 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak updated this revision to Diff 462582. dhruvachak added a comment. Updated llvm tests. The following 3 tests still fail: LLVM :: Transforms/OpenMP/spmdization_constant_prop.ll LLVM :: Transforms/OpenMP/spmdization_guarding_two_reaching_kernels.ll LLVM :: Transforms/OpenMP/spmdizat

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-09-23 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak reopened this revision. dhruvachak added a comment. This revision is now accepted and ready to land. This patch was reverted. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102107/new/ https://reviews.llvm.org/D102107 ___

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-09-14 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added a comment. I reverted this commit while I fix the failing tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102107/new/ https://reviews.llvm.org/D102107 ___ cfe-commits mailing list c

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-09-14 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added a comment. In D102107#3791292 , @vitalybuka wrote: > check-llvm fails bunch of test for me > > > > Failed Tests (12): > > LLVM :: Transforms/OpenMP/custom_state_machines.ll > LLVM :: Transforms/OpenMP/custom_stat

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-09-14 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. check-llvm fails bunch of test for me Failed Tests (12): LLVM :: Transforms/OpenMP/custom_state_machines.ll LLVM :: Transforms/OpenMP/custom_state_machines_remarks.ll LLVM :: Transforms/OpenMP/get_hardware_num_threads_in_block_fold.ll LLV

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-09-14 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG7539e9cf811e: [OpenMP] Codegen aggregate for outlined function captures (authored by ggeorgakoudis, committed by dhruvachak). Repository: rG LLVM

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-09-14 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak updated this revision to Diff 460274. dhruvachak added a comment. Rebased Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102107/new/ https://reviews.llvm.org/D102107 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp clang/lib/CodeGen/CGOp

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-08-31 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. LG, the new remarks need to be addressed in a follow up. Please test for them and make a TODO that they should be optimized away. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102107/new/

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-08-03 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added a comment. Pointing out the recent changes at the corresponding source locations. Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp:1570 + {llvm::ConstantInt::get(CGM.SizeTy, AllocSize)}); + GlobalPtr->addRetAttr(llvm::Attri

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-08-03 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added a comment. @jdoerfert Attached are the device IR files, generated with -save-temps. F24006188: remarks_parallel_in_multiple_target_state_machines-openmp-amdgcn-amd-amdhsa.ll F24006197: remarks_parallel_in_target_state_machine-openmp-amdgcn-

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-08-03 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D102107#3685694 , @dhruvachak wrote: > @jdoerfert With this patch, additional remarks are being generated. Please > check whether the new OMP121 remarks in the following tests are OK. > > Clang :: OpenMP/remarks_parallel_in

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-07-28 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added a comment. All changes from my end are in. Please review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102107/new/ https://reviews.llvm.org/D102107 ___ cfe-commits mailing list cfe-comm

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-07-28 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added a comment. @jdoerfert With this patch, additional remarks are being generated. Please check whether the new OMP121 remarks in the following tests are OK. Clang :: OpenMP/remarks_parallel_in_multiple_target_state_machines.c Clang :: OpenMP/remarks_parallel_in_target_state_machine

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-07-28 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added a comment. Rebased on top of a recent commit. Both check-clang and check-openmp (on amdgpu) pass. Testing Time: 30.73s Skipped : 4 Unsupported : 1480 Passed : 29554 Expectedly Failed:27 [100%] Built target check-clang On amdgpu: Testi

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-07-28 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak updated this revision to Diff 448404. dhruvachak added a comment. Regenerated clang tests, make check-clang passes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102107/new/ https://reviews.llvm.org/D102107 Files: clang/lib/CodeGen/CGO

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-07-15 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added a comment. In D102107#3648219 , @jdoerfert wrote: > > Can you share the output of the AST dump tests and the new check lines, so > what run produces and the file we give to Filechec to verify it. I looked at the AST test output and

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-07-13 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. It seems the buildbot didn't actually test this patch but an old one, still: The checks for this tests are not updated: target_teams_distribute_parallel_for_order_codegen.cpp target_in_reduction_codegen.cpp nvptx_lambda_capturing.cpp nvptx_lambda_pointer_capturing.c

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-07-08 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added a comment. make check-openmp passes on amdgpu. Need to check on nvptx. Testing Time: 39.95s Unsupported : 143 Passed : 563 Expectedly Failed: 14 [100%] Built target check-openmp [100%] Built target check-openmp Repository: rG LLVM Github Monorepo CHAN

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-07-08 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added a comment. Results from "make check-clang": Failed Tests (14): Clang :: AST/ast-dump-openmp-distribute-parallel-for-simd.c Clang :: AST/ast-dump-openmp-distribute-parallel-for.c Clang :: AST/ast-dump-openmp-target-teams-distribute-parallel-for-simd.c Clang :: AST/ast-dum

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-07-08 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added inline comments. Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:4263 case OMPRTL___kmpc_nvptx_end_reduce_nowait: +case OMPRTL___kmpc_alloc_aggregate_arg: break; dhruvachak wrote: > @jdoerfert Is this enough to enable SPMDizatio

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-07-08 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added inline comments. Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:4263 case OMPRTL___kmpc_nvptx_end_reduce_nowait: +case OMPRTL___kmpc_alloc_aggregate_arg: break; @jdoerfert Is this enough to enable SPMDization or is further hand

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-07-08 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added a comment. In D102107#3640232 , @jdoerfert wrote: > In D102107#3640198 , @dhruvachak > wrote: > >> Thanks. I followed the above steps and regenerated a couple of the AST tests >> but they still

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-07-08 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak updated this revision to Diff 443399. dhruvachak added a comment. Herald added a subscriber: hiraditya. Fixed opaque pointer miscompile. Added alloc_aggregate_arg entry point to OpenMPOpt SPMD list. Fixed nocapture attribute of __kmpc_alloc_aggregate_arg, Added align attribute for call

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-07-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D102107#3640198 , @dhruvachak wrote: > Thanks. I followed the above steps and regenerated a couple of the AST tests > but they still fail. Perhaps I am missing some options? > > I currently have a handful of clang test failur

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-07-08 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D102107#3640198 , @dhruvachak wrote: > Thanks. I followed the above steps and regenerated a couple of the AST tests > but they still fail. Perhaps I am missing some options? > > I currently have a handful of clang test fail

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-07-08 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added a comment. In D102107#3639735 , @jdoerfert wrote: > F23722893: ast_dump_2_check.py >>! In > D102107#3639615 , @dhruvachak wrote: > >> In D102107#3639556

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-07-08 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D102107#3639615 , @dhruvachak wrote: > In D102107#3639556 , @jdoerfert > wrote: > >> In D102107#3639551 , @dhruvachak >> wrote: >> >>> Is

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-07-08 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added a comment. In D102107#3639556 , @jdoerfert wrote: > In D102107#3639551 , @dhruvachak > wrote: > >> Is there an llvm/utils script to update clang tests that have RUN lines at >> the top? An examp

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-07-08 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D102107#3639551 , @dhruvachak wrote: > Is there an llvm/utils script to update clang tests that have RUN lines at > the top? An example is clang/test/OpenMP/debug_threadprivate_copyin.c. You can create the run lines with t

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-07-08 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added a comment. Is there an llvm/utils script to update clang tests that have RUN lines at the top? An example is clang/test/OpenMP/debug_threadprivate_copyin.c. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102107/new/ https://reviews

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-07-08 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp:3541 .getPointerType(CGF.getContext().getPointerType( CGF.getContext().VoidPtrTy)) .castAs()); Th

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-07-07 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added a comment. In D102107#3633705 , @jdoerfert wrote: > Also, make sure to remove all deviceRTL files and probably reset the > autogenerated tests to upstream (and re-generate) before you merge (or > reupload). > > In D102107#3633678

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-07-06 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Also, make sure to remove all deviceRTL files and probably reset the autogenerated tests to upstream (and re-generate) before you merge (or reupload). In D102107#3633678 , @dhruvachak wrote: > I rebased and resolved conflict

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-07-06 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added a comment. I rebased and resolved conflicts just now and got the compiler built. I did not update the tests, hence not updating this review. I see the following outstanding issues: (1) make check-libomptarget produces a bunch of failures with the following compile-time asserti

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-07-06 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Herald added a subscriber: mattd. reverse ping. Are there outstanding issues with this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102107/new/ https://reviews.llvm.org/D102107 _

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-04-08 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added inline comments. Comment at: llvm/include/llvm/Frontend/OpenMP/OMPKinds.def:907 +__OMP_RTL_ATTRS(__kmpc_alloc_aggregate_arg, DefaultAttrs, ReturnPtrAttrs, +ParamAttrs(NoCaptureAttrs, NoCaptureAttrs)) + NoCapture attributes for the

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-04-07 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added a comment. In D102107#3434733 , @ggeorgakoudis wrote: > In D102107#3417452 , @dhruvachak > wrote: > >> I added https://github.com/llvm/llvm-project/issues/54654 documenting what I >> found when

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-04-06 Thread Giorgis Georgakoudis via Phabricator via cfe-commits
ggeorgakoudis added a comment. In D102107#3417452 , @dhruvachak wrote: > I added https://github.com/llvm/llvm-project/issues/54654 documenting what I > found when testing this patch on amdgpu. > > @ggeorgakoudis Can you please rebase this patch on top o

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-03-30 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added a comment. As discussed in https://github.com/llvm/llvm-project/issues/54654, this needs to be added for SPMDization with this patch. Not sure whether further handling is required. diff --git a/llvm/lib/Transforms/IPO/OpenMPOpt.cpp b/llvm/lib/Transforms/IPO/OpenMPOpt.cpp index

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-03-30 Thread Dhruva Chakrabarti via Phabricator via cfe-commits
dhruvachak added a comment. Herald added a project: All. I added https://github.com/llvm/llvm-project/issues/54654 documenting what I found when testing this patch on amdgpu. @ggeorgakoudis Can you please rebase this patch on top of main? Thanks. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-12-23 Thread Pushpinder Singh via Phabricator via cfe-commits
pdhaliwal added a comment. And, I am seeing a lot of failures on nvptx machine (sm_70, cuda11.4) with this patch, libomptarget :: nvptx64-nvidia-cuda :: offloading/bug49021.cpp libomptarget :: nvptx64-nvidia-cuda :: offloading/bug49334.cpp libomptarget :: nvptx64-nvidia-cuda :: offloading/

RE: [PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-12-23 Thread Lieberman, Ron via cfe-commits
; zhang.guans...@gmail.com; cfe-commits@lists.llvm.org; balaji-sankar-naga-sai-sandeep.kos...@hpe.com; misono.tomoh...@fujitsu.com; sunil.shres...@hpe.com; jacob.weight...@hpe.com; Balasubrmanian, Vignesh ; gandhi21...@gmail.com; michael.hl...@gmail.com Subject: [PATCH] D102107: [OpenMP] Codegen aggregate

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-12-23 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. Can we land this? AMD issues seems resolved. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102107/new/ https://reviews.llvm.org/D102107 ___ cf

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-12-01 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. This works approximately as well as trunk does for me, provided D114865 is also applied. My baseline is not totally solid but I think there's a credible chance this would pass the buildbot, provided D114865

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-12-01 Thread Giorgis Georgakoudis via Phabricator via cfe-commits
ggeorgakoudis updated this revision to Diff 391099. ggeorgakoudis added a comment. Rebase, address comment, update few tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102107/new/ https://reviews.llvm.org/D102107 Files: clang/lib/CodeGen/CGOp

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-12-01 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 wit a nit Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp:1567 +} else + AggregatePtr = llvm::Constant::getNullValue(OMPBuilder.VoidPtr); ---

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-12-01 Thread Giorgis Georgakoudis via Phabricator via cfe-commits
ggeorgakoudis added a comment. Ping! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102107/new/ https://reviews.llvm.org/D102107 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-11-11 Thread Giorgis Georgakoudis via Phabricator via cfe-commits
ggeorgakoudis updated this revision to Diff 386594. ggeorgakoudis added a comment. Herald added subscribers: asavonic, ormris. Update tests Fix for attributes to kmpc_alloc_aggregate_arg Do not emit allocations if there are no arguments in the aggregate Repository: rG LLVM Github Monorepo CHA

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-11-09 Thread Giorgis Georgakoudis via Phabricator via cfe-commits
ggeorgakoudis added a comment. TODO update tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102107/new/ https://reviews.llvm.org/D102107 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-11-09 Thread Giorgis Georgakoudis via Phabricator via cfe-commits
ggeorgakoudis updated this revision to Diff 385818. ggeorgakoudis added a comment. Update the interface for allocating/sharing the struct aggregate Simplify invoking tasks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102107/new/ https://reviews.ll

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-10-06 Thread Pushpinder Singh via Phabricator via cfe-commits
pdhaliwal added a comment. I have created a patch (D111218 ) with fix for amdgcn. This is a temporary fix. I will still keep on looking into it until I find a real root cause. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-09-30 Thread Pushpinder Singh via Phabricator via cfe-commits
pdhaliwal added a comment. I modified the declare_mapper_target to print the contents of array after target region and found the following output: 2 3 4 5 6 7 8 9 10 11 Sum = 65 Program: #include #include #define NUM 10 int main() { int *c= new int[NUM]; for (int i =

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-09-29 Thread Giorgis Georgakoudis via Phabricator via cfe-commits
ggeorgakoudis added a comment. In D102107#3029825 , @pdhaliwal wrote: > Apologies for late reply. Most of the tests now do not try to call malloc, so > no page fault errors. But all of them are producing wrong results. For e.g. > declare_mapper_target.c

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-09-29 Thread Pushpinder Singh via Phabricator via cfe-commits
pdhaliwal added a comment. Apologies for late reply. Most of the tests now do not try to call malloc, so no page fault errors. But all of them are producing wrong results. For e.g. declare_mapper_target.cpp produces Sum = 132608 with the patch applied. Similarly for other tests as well. So don'

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-09-28 Thread Giorgis Georgakoudis via Phabricator via cfe-commits
ggeorgakoudis added a comment. In D102107#3028386 , @ronlieb wrote: > i backed up to your reverted patch, and applied this one. > I see some new errors > > libomptarget :: amdgcn-amd-amdhsa :: mapping/declare_mapper_target.cpp > libomptarget :: amdgcn

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-09-28 Thread Ron Lieberman via Phabricator via cfe-commits
ronlieb added a comment. i backed up to your reverted patch, and applied this one. I see some new errors libomptarget :: amdgcn-amd-amdhsa :: mapping/declare_mapper_target.cpp libomptarget :: amdgcn-amd-amdhsa :: mapping/declare_mapper_target_data.cpp libomptarget :: amdgcn-amd-amdhsa :: m

RE: [PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-09-28 Thread Lieberman, Ron via cfe-commits
] D102107: [OpenMP] Codegen aggregate for outlined function captures [CAUTION: External Email] ggeorgakoudis added a comment. @pdhaliwal @JonChesterfield @ronlieb I updated the aggregate argument memory allocation to use an alloca instead of malloc'ing in SPMD mode, which should resolve your

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-09-28 Thread Giorgis Georgakoudis via Phabricator via cfe-commits
ggeorgakoudis added a comment. @pdhaliwal @JonChesterfield @ronlieb I updated the aggregate argument memory allocation to use an alloca instead of malloc'ing in SPMD mode, which should resolve your issue. Could someone please test the updated patch and give me feedback before landing? Reposit

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-09-28 Thread Giorgis Georgakoudis via Phabricator via cfe-commits
ggeorgakoudis updated this revision to Diff 375634. ggeorgakoudis added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Update memory allocation for aggregate argument. Introduce runtime interface to allocate from local memory, when in SPMD mode, or heap, when i

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-09-22 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D102107#3014759 , @JonChesterfield wrote: > In D102107#3014743 , @pdhaliwal > wrote: > >> I got this after changing __kmpc_impl_malloc to return 0xdeadbeef. So, this >> confirms th

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-09-22 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. In D102107#3014743 , @pdhaliwal wrote: > I got this after changing __kmpc_impl_malloc to return 0xdeadbeef. So, this > confirms that missing malloc implementation is the root cause. > >> Memory access fault by GPU node-4

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-09-22 Thread Pushpinder Singh via Phabricator via cfe-commits
pdhaliwal added a comment. I got this after changing __kmpc_impl_malloc to return 0xdeadbeef. So, this confirms that missing malloc implementation is the root cause. > Memory access fault by GPU node-4 (Agent handle: 0x1bc5000) on address > 0xdeadb000. Reason: Page not present or supervisor pri

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-09-22 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. In D102107#3014599 , @pdhaliwal wrote: > It looks like from IR diff that this patch is adding use of kmpc_alloc_shared > method. These methods likely won't work on AMDGPU as device malloc is not > available. Not sure wha

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-09-22 Thread Pushpinder Singh via Phabricator via cfe-commits
pdhaliwal added a comment. It looks like from IR diff that this patch is adding use of kmpc_alloc_shared method. These methods likely won't work on AMDGPU as device malloc is not available. Not sure what could be done apart from marking those tests as XFAIL on amdgcn. :( Repository: rG LLVM

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-09-21 Thread Ron Lieberman via Phabricator via cfe-commits
ronlieb added a subscriber: pdhaliwal. ronlieb added a comment. @pdhaliwal i will pass the problem over to Pushpinder Singh who should be waking up soon. George, thank you for reverting it. i can reproduce the issue on a local system. building latest (revert present) passes. Revert the revert an

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-09-21 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D102107#3013437 , @ronlieb wrote: > Please revert the patch so our buildbot can resume greeness, and we can look > into it with urgency today (me or Jon) > as it should be reproducible Sounds good. @ggeorgakoudis let's reve

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-09-21 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a subscriber: dpalermo. JonChesterfield added a comment. @ronlieb can you apply this to amd-stg-open? If it breaks there we have a chance of trying a debugger on it. @dpalermo might be available again now. @jdoerfert I debug stuff like this by inspection, guesswork and a DI

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-09-21 Thread Ron Lieberman via Phabricator via cfe-commits
ronlieb added a comment. Please revert the patch so our buildbot can resume greeness, and we can look into it with urgency today (me or Jon) as it should be reproducible Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102107/new/ https://reviews.llv

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-09-21 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D102107#3013233 , @ronlieb wrote: > seeing buildbot failures after this patch landed > https://lab.llvm.org/staging/#/builders/183/builds/1598 This looks like another AMDGPU issue. The code in question doesn't do anything

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-09-21 Thread Giorgis Georgakoudis via Phabricator via cfe-commits
ggeorgakoudis added a comment. In D102107#3013233 , @ronlieb wrote: > seeing buildbot failures after this patch landed > https://lab.llvm.org/staging/#/builders/183/builds/1598 Looking it at @ronlieb, thanks for reporting Repository: rG LLVM Github

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-09-21 Thread Ron Lieberman via Phabricator via cfe-commits
ronlieb added a comment. seeing buildbot failures after this patch landed https://lab.llvm.org/staging/#/builders/183/builds/1598 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102107/new/ https://reviews.llvm.org/D102107 _

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-09-21 Thread Giorgis Georgakoudis via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG1d66649adf28: [OpenMP] Codegen aggregate for outlined function captures (authored by ggeorgakoudis). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-09-21 Thread Giorgis Georgakoudis via Phabricator via cfe-commits
ggeorgakoudis updated this revision to Diff 373982. ggeorgakoudis added a comment. Rebase and update tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102107/new/ https://reviews.llvm.org/D102107 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-09-20 Thread Giorgis Georgakoudis via Phabricator via cfe-commits
ggeorgakoudis updated this revision to Diff 373755. ggeorgakoudis added a comment. Fix for clang-tidy Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102107/new/ https://reviews.llvm.org/D102107 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp clang

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-09-20 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 accepted this revision. jhuber6 added a comment. This revision is now accepted and ready to land. LGTM, this passed the usual tests and I didn't see any leftover allocations. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102107/new/ https:/

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-09-16 Thread Giorgis Georgakoudis via Phabricator via cfe-commits
ggeorgakoudis updated this revision to Diff 373107. ggeorgakoudis added a comment. Remove unnecessary comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102107/new/ https://reviews.llvm.org/D102107 Files: clang/lib/CodeGen/CGOpenMPRuntime.c

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-09-16 Thread Giorgis Georgakoudis via Phabricator via cfe-commits
ggeorgakoudis updated this revision to Diff 373105. ggeorgakoudis added a comment. Add previous, upper bound to aggregate for combined distributed directives. Update tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102107/new/ https://reviews.l

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-07-28 Thread Giorgis Georgakoudis via Phabricator via cfe-commits
ggeorgakoudis updated this revision to Diff 362305. ggeorgakoudis added a comment. Rebase, update tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102107/new/ https://reviews.llvm.org/D102107 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp cla

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-07-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp:1601 + CGM.getModule(), OMPRTL___kmpc_free_shared), + V); +} This needs to include the size of the accompanying push afte

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-07-19 Thread Giorgis Georgakoudis via Phabricator via cfe-commits
ggeorgakoudis added a comment. Thanks for spotting. Test are auto-gened through update scripts so it should be easy to compare. I'll fix and ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102107/new/ https://reviews.llvm.org/D102107

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-07-19 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a subscriber: ronlieb. JonChesterfield added a comment. @ronlieb bisected amdgpu crashing to this too, rocm 'veccopy' case tries to dereference 0. Might be the same failure mode as the above or a different one, the hsa error reporting is quite coarse grained. Suggest we pu

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-07-18 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. This patch causes wrong arguments in nested parallel regions. `openmp/libomptarget/test/offloading/bug49779.cpp` fails and after reverting this patch, it passed. You can easily find out the wrong pointer with a tiny change of the test case: void work(int *C) {

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-07-16 Thread Giorgis Georgakoudis via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe9c7291cb25f: [OpenMP] Codegen aggregate for outlined function captures (authored by ggeorgakoudis). Repository: rG LLVM Github Monorepo CHANGES

  1   2   >