Skip to content

Conversation

@llvmbot llvmbot added the flang Flang issues not falling into any other category label Aug 29, 2025
@ergawy ergawy requested review from jeanPerier, skatrak and tblah August 29, 2025 10:14
@ergawy ergawy force-pushed the users/ergawy/upstream_dc_device_3_pass_changes branch from 26e7330 to 0373863 Compare September 1, 2025 06:26
@ergawy ergawy force-pushed the users/ergawy/upstream_dc_device_4_lit_tests branch from 02636ca to 3dd383b Compare September 1, 2025 06:27
@ergawy ergawy force-pushed the users/ergawy/upstream_dc_device_3_pass_changes branch from 0373863 to 196da8d Compare September 1, 2025 11:40
@ergawy ergawy force-pushed the users/ergawy/upstream_dc_device_4_lit_tests branch from 3dd383b to f2e47d9 Compare September 1, 2025 11:40
@ergawy ergawy force-pushed the users/ergawy/upstream_dc_device_3_pass_changes branch from 196da8d to 5438f65 Compare September 2, 2025 05:25
@ergawy ergawy force-pushed the users/ergawy/upstream_dc_device_4_lit_tests branch from f2e47d9 to 77181e6 Compare September 2, 2025 05:25
@ergawy
Copy link
Member Author

ergawy commented Sep 2, 2025

Ping! Please have a look when you have time.

@ergawy ergawy force-pushed the users/ergawy/upstream_dc_device_3_pass_changes branch from 5438f65 to 343e07c Compare September 4, 2025 09:39
@ergawy ergawy force-pushed the users/ergawy/upstream_dc_device_4_lit_tests branch from 77181e6 to bd8fab0 Compare September 4, 2025 09:39
@ergawy ergawy force-pushed the users/ergawy/upstream_dc_device_3_pass_changes branch from 343e07c to 959c75f Compare September 8, 2025 12:00
@ergawy ergawy force-pushed the users/ergawy/upstream_dc_device_4_lit_tests branch from bd8fab0 to f19a301 Compare September 8, 2025 12:00
ergawy added a commit that referenced this pull request Sep 8, 2025
…ide values (#155754)

Following up on #154483, this PR introduces further refactoring to
extract some shared utils between OpenMP lowering and `do concurrent`
conversion pass. In particular, this PR extracts 2 utils that handle
mapping or cloning values used inside target regions but defined
outside.

Later `do concurrent` PR(s) will also use these utils.

PR stack:
- #155754 ◀️
- #155987
- #155992
- #155993
- #156589
- #156610
- #156837
@ergawy ergawy force-pushed the users/ergawy/upstream_dc_device_3_pass_changes branch from 959c75f to 19c73bd Compare September 8, 2025 12:35
@ergawy ergawy force-pushed the users/ergawy/upstream_dc_device_4_lit_tests branch from f19a301 to db09d54 Compare September 8, 2025 12:35
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Sep 8, 2025
… clone outside values (#155754)

Following up on #154483, this PR introduces further refactoring to
extract some shared utils between OpenMP lowering and `do concurrent`
conversion pass. In particular, this PR extracts 2 utils that handle
mapping or cloning values used inside target regions but defined
outside.

Later `do concurrent` PR(s) will also use these utils.

PR stack:
- llvm/llvm-project#155754 ◀️
- llvm/llvm-project#155987
- llvm/llvm-project#155992
- llvm/llvm-project#155993
- llvm/llvm-project#156589
- llvm/llvm-project#156610
- llvm/llvm-project#156837
@ergawy ergawy force-pushed the users/ergawy/upstream_dc_device_3_pass_changes branch 2 times, most recently from c19e0a1 to 9e581e6 Compare September 9, 2025 10:07
@ergawy ergawy force-pushed the users/ergawy/upstream_dc_device_4_lit_tests branch from db09d54 to 6d564c6 Compare September 9, 2025 10:10
@ergawy ergawy force-pushed the users/ergawy/upstream_dc_device_3_pass_changes branch from 9e581e6 to ccad1a3 Compare September 10, 2025 07:45
ergawy added a commit that referenced this pull request Sep 16, 2025
Adds a requirement on a test to run only when amd gpu is a registered target. We need to do this since the test uses `-triple amdgcn-amd-amdhsa` when invoking flang.
@ergawy
Copy link
Member Author

ergawy commented Sep 16, 2025

#158813 hopefully fixes the issue.

llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Sep 16, 2025
ergawy added a commit that referenced this pull request Sep 16, 2025
Adds a requirement on a test to run only when amd gpu is a registered
target. We need to do this since the test uses `-triple
amdgcn-amd-amdhsa` when invoking flang.
ergawy added a commit that referenced this pull request Sep 17, 2025
…#155993)

Adds end-to-end tests for `do concurrent` offloading to the device.


PR stack:
- #155754
- #155987
- #155992
- #155993 ◀️
- #157638
- #156610
- #156837
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Sep 17, 2025
@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 20, 2025

LLVM Buildbot has detected a new failure on builder ppc64le-flang-rhel-clang running on ppc64le-flang-rhel-test while building flang at step 6 "test-build-unified-tree-check-flang".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/157/builds/39976

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-flang) failure: test (failure)
******************** TEST 'Flang :: Transforms/DoConcurrent/host_eval.f90' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 3
/home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/build/bin/flang -fc1 -emit-hlfir -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa      -fdo-concurrent-to-openmp=device /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/flang/test/Transforms/DoConcurrent/host_eval.f90 -o -                            | /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/build/bin/FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/flang/test/Transforms/DoConcurrent/host_eval.f90 --check-prefix=HOST -vv
# executed command: /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/build/bin/flang -fc1 -emit-hlfir -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -fdo-concurrent-to-openmp=device /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/flang/test/Transforms/DoConcurrent/host_eval.f90 -o -
# .---command stderr------------
# | warning: Mapping `do concurrent` to OpenMP is still experimental.
# `-----------------------------
# executed command: /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/build/bin/FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/flang/test/Transforms/DoConcurrent/host_eval.f90 --check-prefix=HOST -vv
# RUN: at line 7
/home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/build/bin/flang -fc1 -triple amdgcn-amd-amdhsa -emit-hlfir -fopenmp               -fopenmp-is-target-device -fdo-concurrent-to-openmp=device /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/flang/test/Transforms/DoConcurrent/host_eval.f90 -o -  | /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/build/bin/FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/flang/test/Transforms/DoConcurrent/host_eval.f90 --check-prefix=DEVICE
# executed command: /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/build/bin/flang -fc1 -triple amdgcn-amd-amdhsa -emit-hlfir -fopenmp -fopenmp-is-target-device -fdo-concurrent-to-openmp=device /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/flang/test/Transforms/DoConcurrent/host_eval.f90 -o -
# .---command stderr------------
# | error: unable to create target: 'No available targets are compatible with triple "amdgcn-amd-amdhsa"'
# `-----------------------------
# error: command failed with exit status: 1
# executed command: /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/build/bin/FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/flang/test/Transforms/DoConcurrent/host_eval.f90 --check-prefix=DEVICE
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/build/bin/FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/flang/test/Transforms/DoConcurrent/host_eval.f90 --check-prefix=DEVICE
# `-----------------------------
# error: command failed with exit status: 2

--

********************


ergawy added a commit that referenced this pull request Sep 23, 2025
Extends support for mapping `do concurrent` on the device by adding
support for `local` specifiers. The changes in this PR map the local
variable to the `omp.target` op and uses the mapped value as the
`private` clause operand in the nested `omp.parallel` op.

- #155754
- #155987
- #155992
- #155993
- #157638 ◀️
- #156610
- #156837
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Sep 23, 2025
… (#157638)

Extends support for mapping `do concurrent` on the device by adding
support for `local` specifiers. The changes in this PR map the local
variable to the `omp.target` op and uses the mapped value as the
`private` clause operand in the nested `omp.parallel` op.

- llvm/llvm-project#155754
- llvm/llvm-project#155987
- llvm/llvm-project#155992
- llvm/llvm-project#155993
- llvm/llvm-project#157638 ◀️
- llvm/llvm-project#156610
- llvm/llvm-project#156837
ergawy added a commit that referenced this pull request Sep 23, 2025
Extends `do concurrent` to OpenMP device mapping by adding support for
mapping `reduce` specifiers to omp `reduction` clauses. The changes
attach 2 `reduction` clauses to the mapped OpenMP construct: one on the
`teams` part of the construct and one on the `wloop` part.

- #155754
- #155987
- #155992
- #155993
- #157638
- #156610 ◀️
- #156837
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Sep 23, 2025
…e (#156610)

Extends `do concurrent` to OpenMP device mapping by adding support for
mapping `reduce` specifiers to omp `reduction` clauses. The changes
attach 2 `reduction` clauses to the mapped OpenMP construct: one on the
`teams` part of the construct and one on the `wloop` part.

- llvm/llvm-project#155754
- llvm/llvm-project#155987
- llvm/llvm-project#155992
- llvm/llvm-project#155993
- llvm/llvm-project#157638
- llvm/llvm-project#156610 ◀️
- llvm/llvm-project#156837
ergawy added a commit that referenced this pull request Sep 23, 2025
… GPU (#156837)

Fixes a bug related to insertion points when inlining multi-block
combiner reduction regions. The IP at the end of the inlined region was
not used resulting in emitting BBs with multiple terminators.

PR stack:
- #155754
- #155987
- #155992
- #155993
- #157638
- #156610
- #156837 ◀️
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Sep 23, 2025
…ions on the GPU (#156837)

Fixes a bug related to insertion points when inlining multi-block
combiner reduction regions. The IP at the end of the inlined region was
not used resulting in emitting BBs with multiple terminators.

PR stack:
- llvm/llvm-project#155754
- llvm/llvm-project#155987
- llvm/llvm-project#155992
- llvm/llvm-project#155993
- llvm/llvm-project#157638
- llvm/llvm-project#156610
- llvm/llvm-project#156837 ◀️
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flang Flang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants