Skip to content

Commit

Permalink
Use CELERITY_SYCL_IS_DPCPP detection macro instead of __SYCL_COMPILER…
Browse files Browse the repository at this point in the history
…_VERSION
  • Loading branch information
fknorr committed Jan 31, 2025
1 parent a9c3001 commit 624db73
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/runtime_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ namespace detail {
buffer<size_t, 1> buf1{1};

SECTION("capturing host accessor into device kernel") {
#if !defined(__SYCL_COMPILER_VERSION) // TODO: This may break when using AdaptiveCpp w/ DPC++ as compiler
#if !CELERITY_SYCL_IS_DPCPP
CHECK_THROWS_WITH(([&] {
q.submit([&](handler& cgh) {
accessor acc0{buf1, cgh, one_to_one{}, write_only_host_task};
Expand Down Expand Up @@ -400,7 +400,7 @@ namespace detail {

TEST_CASE_METHOD(test_utils::runtime_fixture, "handler throws when accessing host objects within device tasks", "[handler]") {
queue q;
#if !defined(__SYCL_COMPILER_VERSION) // TODO: This may break when using AdaptiveCpp w/ DPC++ as compiler
#if !CELERITY_SYCL_IS_DPCPP
experimental::host_object<size_t> ho;

CHECK_THROWS_WITH(([&] {
Expand All @@ -427,7 +427,7 @@ namespace detail {
accessor acc0{buf0, cgh, one_to_one{}, write_only};
accessor acc1{buf1, cgh, one_to_one{}, write_only};
// DPC++ has its own compile-time check for this, so we can't actually capture anything by reference
#if !defined(__SYCL_COMPILER_VERSION) // TODO: This may break when using AdaptiveCpp w/ DPC++ as compiler
#if !CELERITY_SYCL_IS_DPCPP
cgh.parallel_for(range<1>(1), [acc0, &acc1 /* oops */](item<1>) {
(void)acc0;
(void)acc1;
Expand Down

0 comments on commit 624db73

Please sign in to comment.