Skip to content

Conversation

@abhinavgaba
Copy link
Contributor

Depends on #169438. Will be rebased once that is merged.

This PR adds a new map-type bit to control the fallback behavior when
when a pointer lookup fails.

For now, this is only meaningful with RETURN_PARAM, and can be used
for need_device_ptr (for which the default is to use nullptr as the result
when lookup fails), and OpenMP 6.1's use_device_ptr(fb_nullify).

Eventually, this can be extended to work with assumed-size maps on target
constructs, to control what the argument should be set to when lookup
fails (the OpenMP spec does not have a way to control that yet).

…ddr lookup failure.

As per OpenMP 5.1, we need to assume that when the lookup for
use_device_ptr/addr fails, the incoming pointer was already device
accessible.

Prior to 5.1, a lookup-failure meant a user-error, so we could do anything
in that scenario.
…llify)`.

This PR adds a new map-type bit to control the fallback behavior when
when a pointer lookup fails.

For now, this is only meaningful with `RETURN_PARAM`, and can be used
for `need_device_ptr` (for which the default is to use `nullptr` as the result
when lookup fails), and OpenMP 6.1's `use_device_ptr(fb_nullify)`.

Eventually, this can be extended to work with assumed-size maps on `target`
constructs, to control what the argument should be set to when lookup
fails (the OpenMP spec does not have a way to control that yet).
@abhinavgaba abhinavgaba changed the title [OpenMP][Offload] Add FB_NULLIFY map-type for use_device_ptr(fb_nullify). [OpenMP][Offload] Add FB_NULLIFY map-type for use_device_ptr(fb_nullify). Nov 26, 2025
@github-actions
Copy link

github-actions bot commented Nov 26, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

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.

2 participants