Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions source/loader/layers/sanitizer/asan_interceptor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,10 @@ struct DeviceInfo {
std::queue<std::shared_ptr<AllocInfo>> Quarantine;
size_t QuarantineSize = 0;

explicit DeviceInfo(ur_device_handle_t Device) : Handle(Device) {
[[maybe_unused]] auto Result =
getContext()->urDdiTable.Device.pfnRetain(Device);
assert(Result == UR_RESULT_SUCCESS);
}

~DeviceInfo() {
[[maybe_unused]] auto Result =
getContext()->urDdiTable.Device.pfnRelease(Handle);
assert(Result == UR_RESULT_SUCCESS);
}
// TODO: re-enable retaining and releasing device handles in DeviceInfo
// constructor/destructor. See PR
// https://github.com/oneapi-src/unified-runtime/pull/1883
explicit DeviceInfo(ur_device_handle_t Device) : Handle(Device) {}

ur_result_t allocShadowMemory(ur_context_handle_t Context);
};
Expand Down