mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 23:03:02 +08:00
fix: correct loading L0 loader functions
- don't load ze_loader.dll from file system - to perform self-open on Windows use getModuleHandleA with proper module name - don't free library loaded with getModuleHandleA - as loader may be not available during runtime teardown: - load translate handle function during global setup - load setDriverTeardown function during global teardown - when loader is not available during teardown, unset translate handle function Related-To: GSD-10147 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9d6d6e85f1
commit
4154e6666b
@@ -114,7 +114,7 @@ ze_result_t MetricEnumeration::loadMetricsDiscovery() {
|
||||
getMetricsDiscoveryFilename(libnames);
|
||||
|
||||
for (auto &name : libnames) {
|
||||
hMetricsDiscovery.reset(NEO::OsLibrary::loadFunc(name));
|
||||
hMetricsDiscovery.reset(NEO::OsLibrary::loadFunc({name}));
|
||||
|
||||
// Load exported functions.
|
||||
if (hMetricsDiscovery) {
|
||||
|
||||
@@ -179,7 +179,7 @@ void MetricsLibrary::release() {
|
||||
|
||||
bool MetricsLibrary::load() {
|
||||
// Load library.
|
||||
handle = NEO::OsLibrary::loadFunc(getFilename());
|
||||
handle = NEO::OsLibrary::loadFunc({getFilename()});
|
||||
|
||||
// Load exported functions.
|
||||
if (handle) {
|
||||
|
||||
Reference in New Issue
Block a user