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

Commit 3f3402c

Browse files
authored
[SYCL][CUDA] CXX std lib funcs for CUDA backend (#1112)
Relating to PR intel/llvm#6482
1 parent ccef0d4 commit 3f3402c

File tree

5 files changed

+17
-6
lines changed

5 files changed

+17
-6
lines changed

SYCL/DeviceLib/assert.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// REQUIRES: cpu,linux
2-
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl %s -o %t.out
1+
// REQUIRES: (cpu || cuda ) && linux
2+
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
33
// (see the other RUN lines below; it is a bit complicated)
44
//
55
// assert() call in device code guarantees nothing: on some devices it behaves
@@ -72,6 +72,7 @@
7272
// Overall this sounds stable enough. What could possibly go wrong?
7373
//
7474
// RUN: %CPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 SHOULD_CRASH=1 EXPECTED_SIGNAL=SIGABRT %t.out 2>%t.stderr.native
75+
// RUN: %GPU_RUN_PLACEHOLDER env SHOULD_CRASH=1 EXPECTED_SIGNAL=SIGIOT %t.out 2>%t.stderr.native
7576
// RUN: FileCheck %s --input-file %t.stderr.native --check-prefixes=CHECK-MESSAGE || FileCheck %s --input-file %t.stderr.native --check-prefix CHECK-NOTSUPPORTED
7677
//
7778
// Skip the test if the CPU RT doesn't support the extension yet:
@@ -181,6 +182,8 @@ int main() {
181182
expected = SIGABRT;
182183
} else if (0 == strcmp(env, "SIGSEGV")) {
183184
expected = SIGSEGV;
185+
} else if (0 == strcmp(env, "SIGIOT")) {
186+
expected = SIGIOT;
184187
}
185188
if (!expected) {
186189
fprintf(stderr, "EXPECTED_SIGNAL should be set to either \"SIGABRT\", "

SYCL/DeviceLib/cmath_test.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
// RUN: %clangxx -fsycl -fno-builtin %s -o %t.out
1+
// UNSUPPORTED: hip
2+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fno-builtin %s -o %t.out
23
// RUN: %HOST_RUN_PLACEHOLDER %t.out
34
// RUN: %CPU_RUN_PLACEHOLDER %t.out
5+
// RUN: %GPU_RUN_PLACEHOLDER %t.out
46
// RUN: %ACC_RUN_PLACEHOLDER %t.out
57

68
// RUN: %clangxx -fsycl -fno-builtin -fsycl-device-lib-jit-link %s -o %t.out

SYCL/DeviceLib/math_fp64_test.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
// RUN: %clangxx -fsycl %s -o %t.out
1+
// UNSUPPORTED: hip
2+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
23
// RUN: %HOST_RUN_PLACEHOLDER %t.out
34
// RUN: %CPU_RUN_PLACEHOLDER %t.out
5+
// RUN: %GPU_RUN_PLACEHOLDER %t.out
46
// RUN: %ACC_RUN_PLACEHOLDER %t.out
57

68
// RUN: %clangxx -fsycl -fsycl-device-lib-jit-link %s -o %t.out

SYCL/DeviceLib/math_test.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
// RUN: %clangxx -fsycl %s -o %t.out
1+
// UNSUPPORTED: hip
2+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
23
// RUN: %HOST_RUN_PLACEHOLDER %t.out
34
// RUN: %CPU_RUN_PLACEHOLDER %t.out
5+
// RUN: %GPU_RUN_PLACEHOLDER %t.out
46
// RUN: %ACC_RUN_PLACEHOLDER %t.out
57

68
// RUN: %clangxx -fsycl -fsycl-device-lib-jit-link %s -o %t.out

SYCL/DeviceLib/string_test.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
// RUN: %clangxx -fsycl -fno-builtin %s -o %t.out
1+
// UNSUPPORTED: hip
2+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fno-builtin %s -o %t.out
23
// RUN: %HOST_RUN_PLACEHOLDER %t.out
34
// RUN: %CPU_RUN_PLACEHOLDER %t.out
5+
// RUN: %GPU_RUN_PLACEHOLDER %t.out
46
// RUN: %ACC_RUN_PLACEHOLDER %t.out
57

68
// RUN: %clangxx -fsycl -fno-builtin -fsycl-device-lib-jit-link %s -o %t.out

0 commit comments

Comments
 (0)