intel / intel-application-migration-tool-for-openacc-to-openmp

OpenACC* to OpenMP* API assisting migration tool
BSD 3-Clause "New" or "Revised" License
32 stars 6 forks source link

OpenMP 5.1 tile construct #25

Open Lyphion opened 5 months ago

Lyphion commented 5 months ago

In OpenMP 5.1 the tile construct for loops was introduced to allow loop tiling. The structure is a bit different from OpenACC and not all compilers support it until now. Some implementation exist.

OpenACC:

!$acc parallel loop tile(BLOCK1,BLOCK2) independent
do j = 1, n
  do i = 1, n
    do k = 1, n
      c(i,j) = c(i,j)+a(i,k)*b(k,j)
    end do
  end do
end do

OpenMP:

!$omp target teams loop 
!$omp tile sizes(BLOCK1,BLOCK2)
do j = 1, n
  do i = 1, n
    do k = 1, n
      c(i,j) = c(i,j)+a(i,k)*b(k,j)
    end do
  end do
end do
!$omp end tile
!$omp end target teams loop

Is it possible to add the functionality for better and easier migration?

hservatg commented 5 months ago

Working on this. Will come back to you when I have some feedback.

hservatg commented 5 months ago

BTW -- just tested in our compilers. The tile construct currently works in ICPX but fails in IFX. I have filed a ticket to our compiler teams so that they take a look at it.

Lyphion commented 5 months ago

Thank for reporting the issue to your compiler team. I reported this issue (https://community.intel.com/t5/Intel-Fortran-Compiler/Internal-Compiler-Error-with-OpenMP-Offloading-and-loop-tiling/td-p/1600780) some weeks ago but didn't received any update on it yet.

hservatg commented 4 months ago

@Lyphion -- I've been told that the tile issue you reported will be fixed in 2025.0

Lyphion commented 4 months ago

Okey, thanks for the info

hservatg commented 4 months ago

Will work on the tile translation in the following days when I have an internal nightly compiler that I can test it.