This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP][libomptarget] Process resources when getting/returning from managers
ClosedPublic

Authored by kevinsala on Jul 25 2023, 8:27 AM.

Details

Summary

This patch adds the functionality to process with a lambda the resources
obtained and returned by the resource managers in the plugins. These
processing lambdas are empty for the moment. The idea is to process them
while the resource manager mutex is acquired.

This patch can be useful to implement D154523

Depends on D155629

Diff Detail

Event Timeline

kevinsala created this revision.Jul 25 2023, 8:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 25 2023, 8:27 AM
kevinsala requested review of this revision.Jul 25 2023, 8:27 AM
jdoerfert added inline comments.Jul 25 2023, 9:25 AM
openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h
1209–1215

Do we need this one now?

kevinsala added inline comments.Jul 25 2023, 9:28 AM
openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h
1209–1215

Not really. Managers that override getResource can just call the getResourcesImpl(/*Num=*/1, ...) directly. I'll remove it.

This revision is now accepted and ready to land.Jul 25 2023, 10:07 AM
kevinsala updated this revision to Diff 544775.Jul 27 2023, 7:44 AM

Removing unused function