This is an archive of the discontinued LLVM Phabricator instance.

[Libomptarget] Support device destructors more correctly
Needs ReviewPublic

Authored by jhuber6 on Aug 2 2022, 12:28 PM.

Details

Summary

Previous patched addressed problems with the plugin's teardown order by
implementing a specific function used to initialize and uninitialize the
plugins. This allows us to more correctly control the teardown order.
This is important for handling device destructors which were previously
problematic as the runtime may have been unititialized prior to
attempting to run the destructors. This patch adds support for the new
init / deinit plugin functions to the CUDA and generic plugins. We can
now correctly test device destructors.

Diff Detail

Event Timeline

jhuber6 created this revision.Aug 2 2022, 12:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 2 2022, 12:28 PM
jhuber6 requested review of this revision.Aug 2 2022, 12:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 2 2022, 12:28 PM

This seems to cause problems for CUDA, we get a lot of errors about being unable to destroy a stream or an event.