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

Update SubGroup tests to account for optionality of double #1241

Merged
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion SYCL/SubGroup/barrier.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fsycl-device-code-split=per_kernel %s -o %t.out
// RUN: %CPU_RUN_PLACEHOLDER %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
// RUN: %ACC_RUN_PLACEHOLDER %t.out
Expand Down
9 changes: 7 additions & 2 deletions SYCL/SubGroup/broadcast_fp64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@

int main() {
queue Queue;
check<double>(Queue);
std::cout << "Test passed." << std::endl;
if (Queue.get_device().has(sycl::aspect::fp64)) {
check<double>(Queue);
std::cout << "Test passed." << std::endl;
} else {
std::cout << "Test skipped because device doesn't support aspect::fp64"
<< std::endl;
}
return 0;
}
20 changes: 11 additions & 9 deletions SYCL/SubGroup/load_store.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fsycl-device-code-split=per_kernel %s -o %t.out
// RUN: %CPU_RUN_PLACEHOLDER %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
// RUN: %ACC_RUN_PLACEHOLDER %t.out
Expand Down Expand Up @@ -262,14 +262,16 @@ int main() {
check<aligned_ulong, 4>(Queue);
check<aligned_ulong, 8>(Queue);
check<aligned_ulong, 16>(Queue);
typedef double aligned_double __attribute__((aligned(16)));
check<aligned_double>(Queue);
check<aligned_double, 1>(Queue);
check<aligned_double, 2>(Queue);
check<aligned_double, 3>(Queue);
check<aligned_double, 4>(Queue);
check<aligned_double, 8>(Queue);
check<aligned_double, 16>(Queue);
if (Queue.get_device().has(sycl::aspect::fp64)) {
typedef double aligned_double __attribute__((aligned(16)));
check<aligned_double>(Queue);
check<aligned_double, 1>(Queue);
check<aligned_double, 2>(Queue);
check<aligned_double, 3>(Queue);
check<aligned_double, 4>(Queue);
check<aligned_double, 8>(Queue);
check<aligned_double, 16>(Queue);
}
}
std::cout << "Test passed." << std::endl;
return 0;
Expand Down
9 changes: 7 additions & 2 deletions SYCL/SubGroup/shuffle_fp64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@

int main() {
queue Queue;
check<double>(Queue);
std::cout << "Test passed." << std::endl;
if (Queue.get_device().has(sycl::aspect::fp64)) {
check<double>(Queue);
std::cout << "Test passed." << std::endl;
} else {
std::cout << "Test skipped because device doesn't support aspect::fp64"
<< std::endl;
}
Comment on lines +19 to +25

Choose a reason for hiding this comment

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

I'm not sure if I'm going to ask to do that as part of this PR, but the best way would be to merge all shuffle_*.cpp tests into one using this method.

return 0;
}