File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -510,7 +510,8 @@ inline uint64_t GetDeviceTimestampMask(ze_device_handle_t device) {
510
510
o_api_string.c_str ());
511
511
};
512
512
PTI_ASSERT (status == ZE_RESULT_SUCCESS);
513
- return (1ull << props.kernelTimestampValidBits ) - 1ull ;
513
+ return ((props.kernelTimestampValidBits == 64 ) ? std::numeric_limits<uint64_t >::max ()
514
+ : ((1ull << props.kernelTimestampValidBits ) - 1ull ));
514
515
}
515
516
516
517
inline uint64_t GetMetricTimestampMask (ze_device_handle_t device) {
@@ -532,7 +533,8 @@ inline uint64_t GetMetricTimestampMask(ze_device_handle_t device) {
532
533
if ((devicemask == 0x5600 ) || (devicemask == 0x4F00 ) || (devicemask == 0x0B00 )) {
533
534
return (1ull << (props.kernelTimestampValidBits - 1 )) - 1ull ;
534
535
} else {
535
- return (1ull << props.kernelTimestampValidBits ) - 1ull ;
536
+ return ((props.kernelTimestampValidBits == 64 ) ? std::numeric_limits<uint64_t >::max ()
537
+ : ((1ull << props.kernelTimestampValidBits ) - 1ull ));
536
538
}
537
539
#endif
538
540
}
Original file line number Diff line number Diff line change @@ -356,7 +356,8 @@ inline uint64_t GetDeviceTimestampMask(ze_device_handle_t device) {
356
356
ze_device_properties_t props{ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES_1_2, };
357
357
ze_result_t status = zeDeviceGetProperties (device, &props);
358
358
PTI_ASSERT (status == ZE_RESULT_SUCCESS);
359
- return (1ull << props.kernelTimestampValidBits ) - 1ull ;
359
+ return ((props.kernelTimestampValidBits == 64 ) ? std::numeric_limits<uint64_t >::max ()
360
+ : ((1ull << props.kernelTimestampValidBits ) - 1ull ));
360
361
}
361
362
362
363
inline uint64_t GetMetricTimestampMask (ze_device_handle_t device) {
@@ -371,7 +372,8 @@ inline uint64_t GetMetricTimestampMask(ze_device_handle_t device) {
371
372
return (1ull << (props.kernelTimestampValidBits - 1 )) - 1ull ;
372
373
}
373
374
else {
374
- return (1ull << props.kernelTimestampValidBits ) - 1ull ;
375
+ return ((props.kernelTimestampValidBits == 64 ) ? std::numeric_limits<uint64_t >::max ()
376
+ : ((1ull << props.kernelTimestampValidBits ) - 1ull ));
375
377
}
376
378
#endif
377
379
}
You can’t perform that action at this time.
0 commit comments