@@ -43,9 +43,8 @@ namespace xpu {
4343
4444void check (ze_result_t ret, const char *functionName) {
4545 if (ret != ZE_RESULT_SUCCESS) {
46- throw std::runtime_error (" Failed to execute " +
47- std::string (functionName) + " with error " +
48- std::to_string (ret));
46+ throw std::runtime_error (" Failed to execute " + std::string (functionName) +
47+ " with error " + std::to_string (ret));
4948 }
5049}
5150
@@ -79,20 +78,22 @@ extern "C" void getDeviceProperties(uint64_t index, uint32_t *clockRate,
7978 // create a struct to hold device properties
8079 ze_device_properties_t device_properties = {};
8180 device_properties.stype = ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES;
82- check (zeDeviceGetProperties (phDevice, &device_properties), " zeDeviceGetProperties" );
81+ check (zeDeviceGetProperties (phDevice, &device_properties),
82+ " zeDeviceGetProperties" );
8383 *clockRate = device_properties.coreClockRate ;
8484 *numSms =
8585 device_properties.numSlices * device_properties.numSubslicesPerSlice ;
8686 // create a struct to hold device memory properties
8787 uint32_t memoryCount = 0 ;
88- check (zeDeviceGetMemoryProperties (phDevice, &memoryCount, nullptr ), " zeDeviceGetMemoryProperties" );
88+ check (zeDeviceGetMemoryProperties (phDevice, &memoryCount, nullptr ),
89+ " zeDeviceGetMemoryProperties" );
8990 auto pMemoryProperties = new ze_device_memory_properties_t [memoryCount];
9091 for (uint32_t mem = 0 ; mem < memoryCount; ++mem) {
9192 pMemoryProperties[mem].stype = ZE_STRUCTURE_TYPE_DEVICE_MEMORY_PROPERTIES;
9293 pMemoryProperties[mem].pNext = nullptr ;
9394 }
94- check (zeDeviceGetMemoryProperties (phDevice, &memoryCount,
95- pMemoryProperties), " zeDeviceGetMemoryProperties" );
95+ check (zeDeviceGetMemoryProperties (phDevice, &memoryCount, pMemoryProperties),
96+ " zeDeviceGetMemoryProperties" );
9697
9798 *memoryClockRate = pMemoryProperties[0 ].maxClockRate ;
9899 *busWidth = pMemoryProperties[0 ].maxBusWidth ;
0 commit comments