mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 18:06:32 +08:00
Add debug variable to override device name
This commit introduces debug variable to override device name reported by CL_DEVICE_NAME property in OpenCL and ze_device_properties_t.name in level_zero Signed-off-by: Pawel Wilma <pawel.wilma@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
e7e1e64cca
commit
d9858bf206
@@ -656,7 +656,9 @@ ze_result_t DeviceImp::getProperties(ze_device_properties_t *pDeviceProperties)
|
||||
memset(pDeviceProperties->name, 0, ZE_MAX_DEVICE_NAME);
|
||||
|
||||
std::string name = getNEODevice()->getDeviceInfo().name;
|
||||
if (driverInfo) {
|
||||
if (NEO::DebugManager.flags.OverrideDeviceName.get() != "unk") {
|
||||
name.assign(NEO::DebugManager.flags.OverrideDeviceName.get().c_str());
|
||||
} else if (driverInfo) {
|
||||
name.assign(driverInfo->getDeviceName(name).c_str());
|
||||
}
|
||||
memcpy_s(pDeviceProperties->name, name.length(), name.c_str(), name.length());
|
||||
|
||||
Reference in New Issue
Block a user