-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL] Fix event profiling for command_submit in L0 and other backends #7526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
7973c58
2dd3761
bf53daa
f73197d
d25bc5d
c7d76cc
1c465da
ecfc6b1
3e40b44
375ff05
23ec955
713430e
dc509a9
82fbb3b
6cacfff
810cbe0
6bbc64f
9645592
474fa17
a7b3b60
1d4d355
a32b8e8
d086af8
1e74912
5d01757
26ca040
12a0536
ba6ccc8
bfcc33e
d353ae8
d871187
6361bc0
e2fc03a
0473ed4
0d9021f
4be8dc0
3700114
5ee56ef
ba0b2db
8268fdf
5e2949f
19cd2e9
82ff6c7
451de35
2d6a636
b9c4171
ac695db
89ffa97
554fde5
228b22e
f6426f3
a891d2c
26319bf
d5760dd
843bf6c
3337ecb
eda7e39
43b24e7
e834879
37f2e53
2df30af
dc18419
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5988,7 +5988,10 @@ pi_result piEventGetProfilingInfo(pi_event Event, pi_profiling_info ParamName, | |
} | ||
case PI_PROFILING_INFO_COMMAND_QUEUED: | ||
case PI_PROFILING_INFO_COMMAND_SUBMIT: | ||
// TODO: Support these when Level Zero supported is added. | ||
// Note: No users for this case | ||
// TODO: Implement commmand submission time when needed, | ||
// by recording device timestamp (using zeDeviceGetGlobalTimestamps) | ||
// before submitting command to device | ||
return ReturnValue(uint64_t{0}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Returning "0" is still not the right behavior. We should use |
||
default: | ||
zePrint("piEventGetProfilingInfo: not supported ParamName\n"); | ||
|
@@ -9354,4 +9357,22 @@ pi_result _pi_buffer::free() { | |
return PI_SUCCESS; | ||
} | ||
|
||
pi_result piGetDeviceAndHostTimer(pi_device Device, uint64_t *DeviceTime, | ||
uint64_t *HostTime) { | ||
const uint64_t &ZeTimerResolution = | ||
Device->ZeDeviceProperties->timerResolution; | ||
const uint64_t TimestampMaxCount = | ||
((1ULL << Device->ZeDeviceProperties->kernelTimestampValidBits) - 1ULL); | ||
uint64_t DeviceClockCount, Dummy; | ||
|
||
ZE_CALL(zeDeviceGetGlobalTimestamps, | ||
(Device->ZeDevice, HostTime == nullptr ? &Dummy : HostTime, | ||
&DeviceClockCount)); | ||
|
||
if (DeviceTime != nullptr) { | ||
|
||
*DeviceTime = (DeviceClockCount & TimestampMaxCount) * ZeTimerResolution; | ||
} | ||
return PI_SUCCESS; | ||
} | ||
} // extern "C" |
Uh oh!
There was an error while loading. Please reload this page.