mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 14:02:58 +08:00
Add 4-digit zero alignment of device id in device name (2)
Unify names for OpenCL and L0 Related-To: NEO-4744 Change-Id: I5094f228f447ecbd942c25d6244abee593f3ffbf Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
2f27e4dde9
commit
31291b1cf0
@@ -394,7 +394,7 @@ ze_result_t DeviceImp::getProperties(ze_device_properties_t *pDeviceProperties)
|
||||
|
||||
memset(pDeviceProperties->name, 0, ZE_MAX_DEVICE_NAME);
|
||||
|
||||
std::string name = getNEODevice()->getDeviceName(hardwareInfo);
|
||||
std::string name = getNEODevice()->getDeviceInfo().name;
|
||||
memcpy_s(pDeviceProperties->name, name.length(), name.c_str(), name.length());
|
||||
|
||||
return ZE_RESULT_SUCCESS;
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
#include "driver_version.h"
|
||||
|
||||
#include <iomanip>
|
||||
#include <string>
|
||||
|
||||
namespace NEO {
|
||||
@@ -434,12 +433,7 @@ void ClDevice::initializeOpenclCAllVersions() {
|
||||
}
|
||||
|
||||
const std::string ClDevice::getClDeviceName(const HardwareInfo &hwInfo) const {
|
||||
std::stringstream deviceName;
|
||||
|
||||
deviceName << device.getDeviceName(hwInfo);
|
||||
deviceName << " [0x" << std::hex << std::setw(4) << std::setfill('0') << hwInfo.platform.usDeviceID << "]";
|
||||
|
||||
return deviceName.str();
|
||||
return this->getDevice().getDeviceInfo().name;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
#include "shared/source/memory_manager/memory_manager.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
|
||||
#include <iomanip>
|
||||
|
||||
namespace NEO {
|
||||
|
||||
static const char *spirvWithVersion = "SPIR-V_1.2 ";
|
||||
@@ -118,6 +120,13 @@ void Device::initializeCaps() {
|
||||
if (DebugManager.flags.EnableSharedSystemUsmSupport.get() != -1) {
|
||||
deviceInfo.sharedSystemAllocationsSupport = DebugManager.flags.EnableSharedSystemUsmSupport.get();
|
||||
}
|
||||
|
||||
std::stringstream deviceName;
|
||||
|
||||
deviceName << this->getDeviceName(hwInfo);
|
||||
deviceName << " [0x" << std::hex << std::setw(4) << std::setfill('0') << hwInfo.platform.usDeviceID << "]";
|
||||
|
||||
deviceInfo.name = deviceName.str();
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -47,6 +47,7 @@ struct DeviceInfo {
|
||||
bool debuggerActive;
|
||||
bool force32BitAddressess;
|
||||
bool sharedSystemAllocationsSupport;
|
||||
std::string name;
|
||||
};
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user