Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MLIR][OpenMP] More robust support for target SPMD #161

Merged
merged 1 commit into from
Sep 24, 2024

Commits on Sep 23, 2024

  1. [MLIR][OpenMP] More robust support for target SPMD

    This patch fixes `TargetOp::getInnermostCapturedOmpOp()` to avoid detecting as
    captured by the top target construct other constructs nested inside of a loop.
    This prevents the `omp.target` verifier from incorrectly flagging valid SPMD
    loops, like in the following example:
    
    ```f90
    subroutine foo(n)
      implicit none
      integer, intent(in) :: n
      integer :: i, j
    
      !$omp target teams distribute parallel do
      do i=1,n
        !$omp simd
        do j=1,n
          call bar()
        enddo
      enddo
    end subroutine foo
    ```
    skatrak committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    d4989a2 View commit details
    Browse the repository at this point in the history