This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Add missing test for pinned memory API
ClosedPublic

Authored by carlo.bertolli on Dec 14 2022, 5:32 PM.

Details

Summary

I accidentally left out the test for the pinned API introduced by D138933. Adding it back.

Diff Detail

Event Timeline

carlo.bertolli created this revision.Dec 14 2022, 5:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 14 2022, 5:32 PM
carlo.bertolli requested review of this revision.Dec 14 2022, 5:32 PM

Should this have a target? Do you want to check a and b after?

Updated test with checks of a and b pointers.

Should this have a target? Do you want to check a and b after?

Good points. This is just the host API for now, so no way to test a target. I do have a test for this in a dependent patch (https://reviews.llvm.org/D139208). I will update that tomorrow to make the missing link between this api and the libomptarget implementation.
I added checks for a and b after allocation and initialization.

jdoerfert accepted this revision.Dec 14 2022, 9:54 PM

LG, one nit, is pinned_alloc2 really pinned? If not, maybe rename it.

This revision is now accepted and ready to land.Dec 14 2022, 9:54 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptDec 15 2022, 7:30 PM