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

[SYCL][CUDA] CXX std lib funcs for CUDA backend #1112

Merged
merged 3 commits into from
Sep 2, 2022
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
7 changes: 5 additions & 2 deletions SYCL/DeviceLib/assert.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// REQUIRES: cpu,linux
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl %s -o %t.out
// REQUIRES: (cpu || cuda ) && linux
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
// (see the other RUN lines below; it is a bit complicated)
//
// assert() call in device code guarantees nothing: on some devices it behaves
Expand Down Expand Up @@ -72,6 +72,7 @@
// Overall this sounds stable enough. What could possibly go wrong?
//
// RUN: %CPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 SHOULD_CRASH=1 EXPECTED_SIGNAL=SIGABRT %t.out 2>%t.stderr.native
// RUN: %GPU_RUN_PLACEHOLDER env SHOULD_CRASH=1 EXPECTED_SIGNAL=SIGIOT %t.out 2>%t.stderr.native
// RUN: FileCheck %s --input-file %t.stderr.native --check-prefixes=CHECK-MESSAGE || FileCheck %s --input-file %t.stderr.native --check-prefix CHECK-NOTSUPPORTED
//
// Skip the test if the CPU RT doesn't support the extension yet:
Expand Down Expand Up @@ -181,6 +182,8 @@ int main() {
expected = SIGABRT;
} else if (0 == strcmp(env, "SIGSEGV")) {
expected = SIGSEGV;
} else if (0 == strcmp(env, "SIGIOT")) {
expected = SIGIOT;
}
if (!expected) {
fprintf(stderr, "EXPECTED_SIGNAL should be set to either \"SIGABRT\", "
Expand Down
4 changes: 3 additions & 1 deletion SYCL/DeviceLib/cmath_test.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// RUN: %clangxx -fsycl -fno-builtin %s -o %t.out
// UNSUPPORTED: hip
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fno-builtin %s -o %t.out
// RUN: %HOST_RUN_PLACEHOLDER %t.out
// RUN: %CPU_RUN_PLACEHOLDER %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
// RUN: %ACC_RUN_PLACEHOLDER %t.out

// RUN: %clangxx -fsycl -fno-builtin -fsycl-device-lib-jit-link %s -o %t.out
Expand Down
4 changes: 3 additions & 1 deletion SYCL/DeviceLib/math_fp64_test.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// RUN: %clangxx -fsycl %s -o %t.out
// UNSUPPORTED: hip
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
// RUN: %HOST_RUN_PLACEHOLDER %t.out
// RUN: %CPU_RUN_PLACEHOLDER %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
// RUN: %ACC_RUN_PLACEHOLDER %t.out

// RUN: %clangxx -fsycl -fsycl-device-lib-jit-link %s -o %t.out
Expand Down
4 changes: 3 additions & 1 deletion SYCL/DeviceLib/math_test.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// RUN: %clangxx -fsycl %s -o %t.out
// UNSUPPORTED: hip
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
// RUN: %HOST_RUN_PLACEHOLDER %t.out
// RUN: %CPU_RUN_PLACEHOLDER %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
// RUN: %ACC_RUN_PLACEHOLDER %t.out

// RUN: %clangxx -fsycl -fsycl-device-lib-jit-link %s -o %t.out
Expand Down
4 changes: 3 additions & 1 deletion SYCL/DeviceLib/string_test.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// RUN: %clangxx -fsycl -fno-builtin %s -o %t.out
// UNSUPPORTED: hip
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fno-builtin %s -o %t.out
// RUN: %HOST_RUN_PLACEHOLDER %t.out
// RUN: %CPU_RUN_PLACEHOLDER %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
// RUN: %ACC_RUN_PLACEHOLDER %t.out

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