Skip to content

Commit 4296bb0

Browse files
author
Jaime Arteaga
authored
[SYCL][L0] Improve L0 timestamps (2) (#6010)
- Cleanup device selection. Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
1 parent d1f4a9d commit 4296bb0

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

sycl/plugins/level_zero/pi_level_zero.cpp

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5374,19 +5374,12 @@ pi_result piEventGetProfilingInfo(pi_event Event, pi_profiling_info ParamName,
53745374
return PI_PROFILING_INFO_NOT_AVAILABLE;
53755375
}
53765376

5377-
uint64_t ZeTimerResolution =
5378-
Event->Queue
5379-
? Event->Queue->Device->ZeDeviceProperties->timerResolution
5380-
: Event->Context->Devices[0]->ZeDeviceProperties->timerResolution;
5377+
pi_device Device =
5378+
Event->Queue ? Event->Queue->Device : Event->Context->Devices[0];
53815379

5380+
uint64_t ZeTimerResolution = Device->ZeDeviceProperties->timerResolution;
53825381
const uint64_t TimestampMaxValue =
5383-
Event->Queue
5384-
? ((1ULL << Event->Queue->Device->ZeDeviceProperties
5385-
->kernelTimestampValidBits) -
5386-
1ULL)
5387-
: ((1ULL << Event->Context->Devices[0]
5388-
->ZeDeviceProperties->kernelTimestampValidBits) -
5389-
1ULL);
5382+
((1ULL << Device->ZeDeviceProperties->kernelTimestampValidBits) - 1ULL);
53905383

53915384
ReturnHelper ReturnValue(ParamValueSize, ParamValue, ParamValueSizeRet);
53925385

0 commit comments

Comments
 (0)