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

Commit c4d6c14

Browse files
authored
[SYCL][HIP] Fix assert tests (#1083)
Assert is now implemented for HIP. Additionally fixing the assert multiple tus tests led to fixing the `sycl-external.cpp` test. It turns out that the AMDGPU llvm backend was running some dead code elimination and deleting `SYCL_EXTERNAL` functions, this is also why `kernel_bundle_ignore_sycl_external.cpp` worked on AMD, not because it was behaving correctly but because the DCE was deleting the `SYCL_EXTERNAL` function so it looked "ignored" from the kernel bundle, this test is now marked as failing again.
1 parent 7a21a8f commit c4d6c14

15 files changed

+2
-25
lines changed

SYCL/Assert/assert_in_kernels.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
// REQUIRES: linux
2-
// FIXME unsupported on HIP until fallback libdevice becomes available
3-
// UNSUPPORTED: hip
42
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
53
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
64
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt

SYCL/Assert/assert_in_kernels_ndebug.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// FIXME unsupported on HIP until fallback libdevice becomes available
2-
// UNSUPPORTED: hip
31
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -DNDEBUG %S/assert_in_kernels.cpp -o %t.out
42
// RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER
53
// RUN: %GPU_RUN_PLACEHOLDER %t.out %GPU_CHECK_PLACEHOLDER

SYCL/Assert/assert_in_kernels_win.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// REQUIRES: windows
2-
// UNSUPPORTED: hip
32
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
43
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
54
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt

SYCL/Assert/assert_in_multiple_tus.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
// REQUIRES: linux
2-
// FIXME unsupported on HIP until fallback libdevice becomes available
3-
// UNSUPPORTED: hip
42
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple -I %S/Inputs %s %S/Inputs/kernels_in_file2.cpp -o %t.out
53
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
64
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt

SYCL/Assert/assert_in_multiple_tus_one_ndebug.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
// REQUIRES: linux
2-
// FIXME unsupported on HIP until fallback libdevice becomes available
3-
// UNSUPPORTED: hip
42
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple -DDEFINE_NDEBUG_INFILE2 -I %S/Inputs %S/assert_in_multiple_tus.cpp %S/Inputs/kernels_in_file2.cpp -o %t.out
53
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
64
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt

SYCL/Assert/assert_in_multiple_tus_one_ndebug_win.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// REQUIRES: windows
2-
// UNSUPPORTED: hip
32
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple -DDEFINE_NDEBUG_INFILE2 -I %S/Inputs %S/assert_in_multiple_tus.cpp %S/Inputs/kernels_in_file2.cpp -o %t.out
43
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
54
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt

SYCL/Assert/assert_in_multiple_tus_win.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// REQUIRES: windows
2-
// UNSUPPORTED: hip
32
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple -I %S/Inputs %s %S/Inputs/kernels_in_file2.cpp -o %t.out
43
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
54
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt

SYCL/Assert/assert_in_one_kernel.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
// REQUIRES: linux
2-
// FIXME unsupported on HIP until fallback libdevice becomes available
3-
// UNSUPPORTED: hip
42
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
53
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
64
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt

SYCL/Assert/assert_in_one_kernel_win.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// REQUIRES: windows
2-
// UNSUPPORTED: hip
32
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
43
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
54
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt

SYCL/Assert/assert_in_simultaneous_kernels.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
// REQUIRES: linux
2-
// FIXME unsupported on HIP until fallback libdevice becomes available
3-
// UNSUPPORTED: hip
42
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple %s -o %t.out %threads_lib
53
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
64
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt

SYCL/Assert/assert_in_simultaneous_kernels_win.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// REQUIRES: windows
2-
// UNSUPPORTED: hip
32
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple %s -o %t.out %threads_lib
43
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
54
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt

SYCL/Assert/assert_in_simultaneously_multiple_tus.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
// FIXME unsupported on HIP until fallback libdevice becomes available
21
// FIXME flaky output on Level Zero
3-
// UNSUPPORTED: hip || level_zero
2+
// UNSUPPORTED: level_zero
43
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple -I %S/Inputs %s %S/Inputs/kernels_in_file2.cpp -o %t.out %threads_lib
54
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
65
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt

SYCL/Assert/assert_in_simultaneously_multiple_tus_one_ndebug.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// FIXME unsupported on HIP until fallback libdevice becomes available
2-
// UNSUPPORTED: hip
31
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple -DDEFINE_NDEBUG_INFILE2 -I %S/Inputs %S/assert_in_simultaneously_multiple_tus.cpp %S/Inputs/kernels_in_file2.cpp -o %t.out %threads_lib
42
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
53
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt

SYCL/Regression/kernel_bundle_ignore_sycl_external.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RUN: %CPU_RUN_PLACEHOLDER %t.out
44
// RUN: %ACC_RUN_PLACEHOLDER %t.out
55
//
6-
// XFAIL: cuda || hip_nvidia
6+
// XFAIL: cuda || hip
77

88
#include <sycl/sycl.hpp>
99

SYCL/SeparateCompile/sycl-external.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
// RUN: %CPU_RUN_PLACEHOLDER %t.exe
1616
// RUN: %GPU_RUN_PLACEHOLDER %t.exe
1717
// RUN: %ACC_RUN_PLACEHOLDER %t.exe
18-
//
19-
// Linking issues with HIP AMD
20-
// XFAIL: hip_amd
2118

2219
#include <iostream>
2320
#include <sycl/sycl.hpp>

0 commit comments

Comments
 (0)