Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

[SYCL] Fix USM/copy.cpp for double #1244

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion SYCL/USM/copy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
//
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
// RUN: %clangxx -fsycl-device-code-split=per_kernel -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
// RUN: %ACC_RUN_PLACEHOLDER %t1.out
Expand Down Expand Up @@ -71,6 +71,10 @@ template <typename T> void test(queue q, T val, T *src, T *dst, bool dev_dst) {
}

template <typename T> void runTests(queue q, T val, alloc kind1, alloc kind2) {
if ((std::is_same_v<T, double> || std::is_same_v<T, test_struct>)&&!q

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can just remove double from the test_struct or have two structs - with and without double.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have applied this suggestion in #1242

.get_device()
.has(sycl::aspect::fp64))
return;
bool dev_dst1 = (kind1 == alloc::device);
bool dev_dst2 = (kind2 == alloc::device);
test(q, val, regular<T>(q, kind1), regular<T>(q, kind2), dev_dst2);
Expand Down