Skip to content

Commit ec37e17

Browse files
[SYCL][E2E] Fix VirtualMem tests (#15799)
Fixed compilation issues with the test and re-enabled it: `usm_shared_allocations` aspect requirement was not spelled correctly and therefore the test was always skipped
1 parent c471c8c commit ec37e17

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sycl/test-e2e/VirtualMem/vector_with_virtual_mem.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: aspect-ext_oneapi_virtual_mem, usm_shared_allocations
1+
// REQUIRES: aspect-ext_oneapi_virtual_mem, aspect-usm_shared_allocations
22

33
// RUN: %{build} -o %t.out
44
// RUN: %{run} %t.out
@@ -16,16 +16,16 @@ namespace syclext = sycl::ext::oneapi::experimental;
1616
// value can be used for aligning both physical memory allocations and for
1717
// reserving virtual memory ranges.
1818
size_t GetLCMGranularity(const sycl::device &Dev, const sycl::context &Ctx) {
19-
size_t CtxGranularity = syclext::get_mem_granularity(MContext);
20-
size_t DevGranularity = syclext::get_mem_granularity(MDevice, MContext);
19+
size_t CtxGranularity = syclext::get_mem_granularity(Ctx);
20+
size_t DevGranularity = syclext::get_mem_granularity(Dev, Ctx);
2121

2222
size_t GCD = CtxGranularity;
2323
size_t Rem = DevGranularity % GCD;
2424
while (Rem != 0) {
2525
std::swap(GCD, Rem);
2626
Rem %= GCD;
2727
}
28-
return (DevGranularity / GCD) * LCMGranularity;
28+
return (DevGranularity / GCD) * CtxGranularity;
2929
}
3030

3131
template <typename T> class VirtualVector {

0 commit comments

Comments
 (0)