Skip to content

[Flang][OpenMP] Fix one part of the descriptor type performance regression noted in LC-1761#2413

Open
agozillon wants to merge 1 commit into
amd-stagingfrom
amd/dev/agozillo/performance-regression-fix-1
Open

[Flang][OpenMP] Fix one part of the descriptor type performance regression noted in LC-1761#2413
agozillon wants to merge 1 commit into
amd-stagingfrom
amd/dev/agozillo/performance-regression-fix-1

Conversation

@agozillon
Copy link
Copy Markdown

This PR tries to fix the second performance regression noted in LC-1761 by removing the OMP_MAP_OBJ_AND_PTR flag that was put in place to work-around an unintended early write back issue in another PR and then addressing that breakage a different way, by removing the application of MEMBER_OF forced on pointers by the declare mapper infrastructure that does not respect MEMBER_OF being omitted from an entry, it will ALWAYS apply it without this PR (which conceptually makes sense except that pointers can belong to structures, and they can have data, that isn't part of the structure, but is part of the overall mapping). These changes take us through a path in the runtime that avoids forced re-maps caused by MAP_OBJ_AND_PTR.

NOTE: This PR only applies to Fortran, as I've attempted to restrict the declare mapper infrastructure to only apply this tweak for fortran via an option only passed through the Flang path, it should default to off for Clang.

There's a larger rework of this for attach maps in progress by Intel so this PR is likely a stop-gap for the more permanent solution. Although, they intend to fix it upstream in a similar manner, just with a lot more functionality (discussed the solution a bit in e-mail with Abhinav at Intel, we agree this fix is the way to go for the attach map style of pointer mapping).

@agozillon agozillon requested a review from dpalermo May 5, 2026 01:24
@z1-cciauto
Copy link
Copy Markdown
Collaborator

@ronlieb
Copy link
Copy Markdown
Collaborator

ronlieb commented May 5, 2026

killing npsdb, will restart in 2 hours
need cycles for merge

@ronlieb
Copy link
Copy Markdown
Collaborator

ronlieb commented May 5, 2026

!PSDB

@z1-cciauto
Copy link
Copy Markdown
Collaborator

…ssion noted in LC-1761

This PR tries to fix the second performance regression noted in LC-1761 by removing the
OMP_MAP_OBJ_AND_PTR flag that was put in place to work-around an unintended early write
back issue in another PR and then addressing that breakage a different way, by removing
the application of MEMBER_OF forced on pointers by the declare mapper infrastructure
that does not respect MEMBER_OF being omitted from an entry, it will ALWAYS apply it
without this PR (which conceptually makes sense except that pointers can belong to
structures, and they can have data, that isn't part of the structure, but is part
of the overall mapping). These changes take us through a path in the runtime that
avoids forced re-maps caused by MAP_OBJ_AND_PTR.

NOTE: This PR only applies to Fortran, as I've attempted to restrict the declare
mapper infrastrcuture to only apply this tweak for fortran via an option only
passed through the Flang path, it should default to off for Clang.

There's a larger rework of this for attach maps in progress by Intel so this PR is
likely a stop-gap for the more permanent solutiuon. Although, they intend to fix it
upstream in a similar manner, just with a lot more functionality (discussed the
solution a bit in e-mail with Abhinav at Intel, we agree this fix is the way to
go for the attach map style of pointer mapping).
@agozillon agozillon force-pushed the amd/dev/agozillo/performance-regression-fix-1 branch from 63726cd to d22a671 Compare May 12, 2026 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants