Skip to content

[SYCL] Fix typo in the name of the host-visible pool #5073

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

Merged
merged 2 commits into from
Dec 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sycl/plugins/level_zero/pi_level_zero.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ pi_result _pi_context::decrementUnreleasedEventsInPool(pi_event Event) {
}

if (Event->ZeHostVisibleEventPool) {
if (NumEventsUnreleasedInEventPool[Event->ZeEventPool] == 0)
if (NumEventsUnreleasedInEventPool[Event->ZeHostVisibleEventPool] == 0)
die("Invalid host visible event release: host visible event pool doesn't "
"have unreleased events");
if (--NumEventsUnreleasedInEventPool[Event->ZeHostVisibleEventPool] == 0) {
Expand Down Expand Up @@ -4761,7 +4761,7 @@ pi_result piEventCreate(pi_context Context, pi_event *RetEvent) {
if (ZeAllHostVisibleEvents) {
ZeEventDesc.signal = ZE_EVENT_SCOPE_FLAG_HOST;
} else {
ZeEventDesc.signal = ZE_EVENT_SCOPE_FLAG_DEVICE;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't completely understand this change. So do you basically want to change this to ZE_EVENT_SCOPE_FLAG_SUBDEVICE?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the current recommendation from L0 GPU RT is that "0" scope should be used. The ZE_EVENT_SCOPE_FLAG_SUBDEVICE is "1".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, but per specification it looks like ZE_EVENT_SCOPE_FLAG_SUBDEVICE is "0" and ZE_EVENT_SCOPE_FLAG_DEVICE is "1".
https://spec.oneapi.io/level-zero/latest/core/api.html?highlight=ze_event_scope_flag_device#_CPPv426ZE_EVENT_SCOPE_FLAG_DEVICE

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ZE_BIT(0) = 1 << 0 = 1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, sorry

ZeEventDesc.signal = 0;
}

ZE_CALL(zeEventCreate, (ZeEventPool, &ZeEventDesc, &ZeEvent));
Expand Down