Skip to content

Commit 8e031bf

Browse files
committed
Remove duplicate device_global decl
Update some tests Signed-off-by: JackAKirk <[email protected]>
1 parent 6d35831 commit 8e031bf

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

sycl/include/sycl/ext/oneapi/device_global/device_global.hpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010

1111
#include <sycl/access/access.hpp> // for address_space
1212
#include <sycl/exception.hpp> // for make_error_code
13-
#include <sycl/ext/oneapi/device_global/properties.hpp> // for device_image...
14-
#include <sycl/ext/oneapi/properties/properties.hpp> // for properties_t
13+
#include <sycl/ext/oneapi/device_global/properties.hpp> // for device_image... , for properties_t
1514
#include <sycl/multi_ptr.hpp> // for multi_ptr
1615
#include <sycl/pointers.hpp> // for decorated_gl...
1716

@@ -40,9 +39,6 @@ namespace sycl {
4039
inline namespace _V1 {
4140
namespace ext::oneapi::experimental {
4241

43-
template <typename T, typename PropertyListT, typename Condition>
44-
class device_global;
45-
4642
namespace detail {
4743
// Type-trait for checking if a type defines `operator->`.
4844
template <typename T, typename = void>
@@ -193,7 +189,7 @@ class device_global_base<
193189

194190
} // namespace detail
195191

196-
template <typename T, typename PropertyListT, typename Condition>
192+
template <typename T, typename PropertyListT, typename>
197193
class
198194
#ifdef __SYCL_DEVICE_ONLY__
199195
// FIXME: Temporary work-around. Remove when fixed.

sycl/test-e2e/DeviceGlobal/device_global_copy.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,15 @@ oneapiext::device_global<const int> DGInit5{7};
3030
oneapiext::device_global<const int, decltype(oneapiext::properties{
3131
oneapiext::host_access_read})>
3232
DGCopy5{DGInit5};
33+
oneapiext::device_global<const int, decltype(oneapiext::properties{
34+
oneapiext::device_constant})>
35+
DGInit6{8};
36+
oneapiext::device_global<const int> DGCopy6{DGInit6};
3337

3438
int main() {
3539
sycl::queue Q;
3640

37-
int ReadVals[10] = {0, 0};
41+
int ReadVals[12] = {0, 0};
3842
{
3943
sycl::buffer<int, 1> ReadValsBuff{ReadVals, 10};
4044

@@ -51,6 +55,8 @@ int main() {
5155
ReadValsAcc[7] = DGCopy4.get();
5256
ReadValsAcc[8] = DGInit5.get();
5357
ReadValsAcc[9] = DGCopy5.get();
58+
ReadValsAcc[10] = DGInit6.get();
59+
ReadValsAcc[11] = DGCopy6.get();
5460
});
5561
}).wait_and_throw();
5662
}
@@ -65,6 +71,8 @@ int main() {
6571
assert(ReadVals[7] == 6);
6672
assert(ReadVals[8] == 7);
6773
assert(ReadVals[9] == 7);
74+
assert(ReadVals[10] == 8);
75+
assert(ReadVals[11] == 8);
6876

6977
return 0;
7078
}

sycl/test/e2e_test_requirements/no-unsupported-without-info.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
// tests to match the required format and in that case you should just update
5555
// (i.e. reduce) the number and the list below.
5656
//
57-
// NUMBER-OF-UNSUPPORTED-WITHOUT-INFO: 381
57+
// NUMBER-OF-UNSUPPORTED-WITHOUT-INFO: 382
5858
//
5959
// List of improperly UNSUPPORTED tests.
6060
// Remove the CHECK once the test has been properly UNSUPPORTED.

0 commit comments

Comments
 (0)