Skip to content

Commit c81bb03

Browse files
committed
Merge branch 'allocshared' of https://github.com/jbrodman/llvm into allocshared
2 parents ce67702 + 9f24380 commit c81bb03

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
@@ -7,7 +7,7 @@
77
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
88
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
99

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

1818
#include <CL/sycl.hpp>
1919

20+
#include <cassert>
21+
2022
using namespace cl::sycl;
2123

2224
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)