Skip to content

Commit 9f24380

Browse files
committed
Remove test for device allocations as they cannot work. Fix formatting.
Signed-off-by: James Brodman <[email protected]>
1 parent 6c6309e commit 9f24380

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

sycl/test/usm/allocator_equal.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
99
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
1010

11-
//==---- allocator_equal.cpp - Allocator Equality test -------------------==//
11+
//==---------- allocator_equal.cpp - Allocator Equality test ---------------==//
1212
//
1313
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
1414
// See https://llvm.org/LICENSE.txt for license information.
@@ -18,6 +18,8 @@
1818

1919
#include <CL/sycl.hpp>
2020

21+
#include <cassert>
22+
2123
using namespace cl::sycl;
2224

2325
int main() {

sycl/test/usm/allocator_shared.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
99
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
1010

11-
//==---- allocator_shared.cpp - Allocate Shared test -------------------==//
11+
//==-------- allocator_shared.cpp - Allocate Shared test -------------------==//
1212
//
1313
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
1414
// See https://llvm.org/LICENSE.txt for license information.
@@ -18,6 +18,7 @@
1818

1919
#include <CL/sycl.hpp>
2020

21+
#include <cassert>
2122
#include <memory>
2223

2324
using namespace cl::sycl;
@@ -46,14 +47,7 @@ int main() {
4647
assert((*ptr2 == 42) && "Shared construct passed.");
4748
}
4849

49-
if (dev.get_info<info::device::usm_device_allocations>()) {
50-
usm_allocator<int, usm::alloc::device> alloc(ctxt, dev);
51-
auto ptr1 = std::allocate_shared<int>(alloc);
52-
53-
// Test construction
54-
auto ptr2 = std::allocate_shared<int>(alloc, 42);
55-
// Cannot actually construct value for device pointers, but should not die.
56-
}
50+
// Device allocations are not supported due to how allocated_shared is written.
5751

5852
return 0;
5953
}

0 commit comments

Comments
 (0)