This is an archive of the discontinued LLVM Phabricator instance.

[libomptarget][cuda] Handle missing _v2 symbols gracefully
ClosedPublic

Authored by JonChesterfield on Jan 25 2021, 7:04 PM.

Details

Summary

[libomptarget][cuda] Handle missing _v2 symbols gracefully

Follow on from D95367. Dlsym the _v2 symbols if present, otherwise use the
unsuffixed version. Builds a hashtable for the check, can revise for zero
heap allocations later if necessary.

Diff Detail

Event Timeline

JonChesterfield requested review of this revision.Jan 25 2021, 7:04 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 25 2021, 7:04 PM
grokos added a subscriber: grokos.Jan 25 2021, 7:20 PM
grokos added inline comments.
openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.cpp
102–103

Maybe add a debug message here in order for the user to know which version was loaded eventually?

jdoerfert accepted this revision.Jan 25 2021, 8:10 PM

LG, with the nit @grokos pointed out.

This revision is now accepted and ready to land.Jan 25 2021, 8:10 PM
  • Add debug print
JonChesterfield marked an inline comment as done.Jan 26 2021, 12:03 PM
JonChesterfield added inline comments.
openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.cpp
102–103

Good call! Thanks

This revision was landed with ongoing or failed builds.Jan 26 2021, 4:22 PM
This revision was automatically updated to reflect the committed changes.