Correct printing vendor and device id in level zero black box tests

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2022-09-22 22:30:23 +00:00
committed by Compute-Runtime-Automation
parent e960802e33
commit 7f0619e6b9

View File

@ -327,19 +327,16 @@ void teardown(ze_context_handle_t context, ze_command_queue_handle_t cmdQueue) {
}
void printDeviceProperties(const ze_device_properties_t &props) {
auto fillChar = std::cout.fill();
auto widthSize = static_cast<int>(std::cout.width());
if (verbose) {
std::cout << "Device : "
<< "\n"
<< " * name : " << props.name << "\n"
<< " * type : " << ((props.type == ZE_DEVICE_TYPE_GPU) ? "GPU" : "FPGA") << "\n"
<< std::setw(4) << std::setfill('0')
<< " * vendorId : 0x" << std::hex << props.vendorId << "\n"
<< " * deviceId : 0x" << std::hex << props.deviceId << "\n"
<< std::setw(widthSize) << std::setfill(fillChar)
<< " * subdeviceId : " << std::dec << props.subdeviceId << "\n"
<< std::hex
<< " * vendorId : 0x" << std::setw(4) << std::setfill('0') << props.vendorId << "\n"
<< " * deviceId : 0x" << std::setw(4) << std::setfill('0') << props.deviceId << "\n"
<< std::dec
<< " * subdeviceId : " << props.subdeviceId << "\n"
<< " * coreClockRate : " << props.coreClockRate << "\n"
<< " * maxMemAllocSize : " << props.maxMemAllocSize << "\n"
<< " * maxHardwareContexts : " << props.maxHardwareContexts << "\n"
@ -356,10 +353,10 @@ void printDeviceProperties(const ze_device_properties_t &props) {
} else {
std::cout << "Device : \n"
<< " * name : " << props.name << "\n"
<< std::setw(4) << std::setfill('0')
<< " * vendorId : 0x" << std::hex << props.vendorId << "\n"
<< " * deviceId : 0x" << std::hex << props.deviceId << std::dec << "\n"
<< std::setw(widthSize) << std::setfill(fillChar);
<< std::hex
<< " * vendorId : 0x" << std::setw(4) << std::setfill('0') << props.vendorId << "\n"
<< " * deviceId : 0x" << std::setw(4) << std::setfill('0') << props.deviceId << "\n"
<< std::dec;
}
}