Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion source/adapters/level_zero/v2/event_pool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class event_pool {
event_pool(const event_pool &) = delete;
event_pool &operator=(const event_pool &) = delete;

DeviceId Id() { return provider->device()->Id; };
DeviceId Id() { return provider->device()->Id.value(); };

ur_event_handle_t_ *allocate();
void free(ur_event_handle_t_ *event);
Expand Down
8 changes: 4 additions & 4 deletions test/adapters/level_zero/v2/event_pool_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ TEST_P(EventPoolTest, Basic) {
ur_event_handle_t first;
ze_event_handle_t zeFirst;
{
auto pool = cache->borrow(device->Id);
auto pool = cache->borrow(device->Id.value());

first = pool->allocate();
zeFirst = first->getZeEvent();
Expand All @@ -148,7 +148,7 @@ TEST_P(EventPoolTest, Basic) {
ur_event_handle_t second;
ze_event_handle_t zeSecond;
{
auto pool = cache->borrow(device->Id);
auto pool = cache->borrow(device->Id.value());

second = pool->allocate();
zeSecond = second->getZeEvent();
Expand All @@ -165,7 +165,7 @@ TEST_P(EventPoolTest, Threaded) {
for (int iters = 0; iters < 3; ++iters) {
for (int th = 0; th < 10; ++th) {
threads.emplace_back([&] {
auto pool = cache->borrow(device->Id);
auto pool = cache->borrow(device->Id.value());
std::vector<ur_event_handle_t> events;
for (int i = 0; i < 100; ++i) {
events.push_back(pool->allocate());
Expand All @@ -183,7 +183,7 @@ TEST_P(EventPoolTest, Threaded) {
}

TEST_P(EventPoolTest, ProviderNormalUseMostFreePool) {
auto pool = cache->borrow(device->Id);
auto pool = cache->borrow(device->Id.value());
std::list<ur_event_handle_t> events;
for (int i = 0; i < 128; ++i) {
events.push_back(pool->allocate());
Expand Down