Skip to content

Commit

Permalink
Merge from 'sycl' to 'sycl-web' (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
iclsrc committed Nov 11, 2020
2 parents 0f3c3af + 6e3f244 commit 341d71d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
8 changes: 8 additions & 0 deletions libclc/ptx-nvidiacl/libspirv/group/collectives.cl
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,10 @@ long __clc__3d_to_linear_local_id(ulong3 id) {
uint scope, TYPE x, ulong3 local_id) { \
ulong linear_local_id = __clc__3d_to_linear_local_id(local_id); \
return __spirv_GroupBroadcast(scope, x, linear_local_id); \
} \
_CLC_DEF _CLC_OVERLOAD _CLC_CONVERGENT TYPE __spirv_GroupBroadcast( \
uint scope, TYPE x, uint local_id) { \
return __spirv_GroupBroadcast(scope, x, (ulong)local_id); \
}
__CLC_GROUP_BROADCAST(char);
__CLC_GROUP_BROADCAST(uchar);
Expand All @@ -411,6 +415,10 @@ _CLC_DECL _CLC_CONVERGENT half
_Z17__spirv_GroupBroadcastjDF16_Dv3_m(uint scope, half x, ulong3 local_id) {
return __spirv_GroupBroadcast(scope, x, local_id);
}
_CLC_DECL _CLC_CONVERGENT half
_Z22__spirv_GroupBroadcastjDF16_j(uint scope, half x, uint local_id) {
return __spirv_GroupBroadcast(scope, x, (ulong)local_id);
}

#undef __CLC_GROUP_BROADCAST

Expand Down
5 changes: 1 addition & 4 deletions sycl/test/on-device/sub_group/broadcast.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// XFAIL: cuda
// CUDA compilation and runtime do not yet support sub-groups.

// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
// RUN: %CPU_RUN_PLACEHOLDER %t.out
Expand All @@ -19,7 +16,7 @@

int main() {
queue Queue;
if (!core_sg_supported(Queue.get_device())) {
if (Queue.get_device().is_host()) {
std::cout << "Skipping test\n";
return 0;
}
Expand Down
6 changes: 2 additions & 4 deletions sycl/test/on-device/sub_group/broadcast_fp16.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// XFAIL: cuda
// CUDA compilation and runtime do not yet support sub-groups.

// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out

Expand All @@ -16,10 +13,11 @@

int main() {
queue Queue;
if (!core_sg_supported(Queue.get_device())) {
if (Queue.get_device().is_host()) {
std::cout << "Skipping test\n";
return 0;
}
check<cl::sycl::half>(Queue);
std::cout << "Test passed." << std::endl;
return 0;
}
5 changes: 1 addition & 4 deletions sycl/test/on-device/sub_group/broadcast_fp64.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// XFAIL: cuda
// CUDA compilation and runtime do not yet support sub-groups.

// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
// RUN: %CPU_RUN_PLACEHOLDER %t.out
Expand All @@ -19,7 +16,7 @@

int main() {
queue Queue;
if (!core_sg_supported(Queue.get_device())) {
if (Queue.get_device().is_host()) {
std::cout << "Skipping test\n";
return 0;
}
Expand Down

0 comments on commit 341d71d

Please sign in to comment.