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

Commit 2ad0979

Browse files
committed
Merge branch 'intel' into ptx_atomic_ldst
2 parents 8d56f06 + 0eae0ff commit 2ad0979

File tree

384 files changed

+11340
-3471
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

384 files changed

+11340
-3471
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@
1414
/SYCL/SubGroupMask/ @Pennycook @intel/llvm-reviewers-runtime
1515

1616
# Plugin interface for Level Zero
17-
/SYCL/Plugin/*level[-_]zero* @intel/dpcpp-l0-pi-reviewers
17+
/SYCL/Plugin/*level-zero* @intel/dpcpp-l0-pi-reviewers
18+
/SYCL/Plugin/*level_zero* @intel/dpcpp-l0-pi-reviewers
1819

1920
# Explicit SIMD
2021
/SYCL/ESIMD/ @intel/dpcpp-esimd-reviewers
2122

2223
# BFloat16 conversion
23-
/SYCL/BFloat16/ @AlexeySotkin @intel/dpcpp-tools-reviewers
24+
/SYCL/BFloat16/ @intel/dpcpp-tools-reviewers
2425

2526
# Compiler tests
2627
/SYCL/AOT/ @intel/dpcpp-tools-reviewers

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
# External/*
33
/test-suite-externals
44
*.pyc
5+
/build*

SYCL/AOT/accelerator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
//==--- accelerator.cpp - AOT compilation for fpga devices using aoc ------==//
1+
//=-- accelerator.cpp - compilation for fpga emulator dev using opencl-aot --=//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===---------------------------------------------------------------------===//
88

9-
// REQUIRES: aoc, accelerator
9+
// REQUIRES: opencl-aot, accelerator
1010

1111
// RUN: %clangxx -fsycl -fsycl-targets=spir64_fpga %S/Inputs/aot.cpp -o %t.out
1212
// RUN: %ACC_RUN_PLACEHOLDER %t.out

SYCL/AOT/multiple-devices.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
// REQUIRES: opencl-aot, ocloc, aoc, cpu, gpu, accelerator
9+
// REQUIRES: opencl-aot, ocloc, cpu, gpu, accelerator
1010
// UNSUPPORTED: cuda
1111
// CUDA is not compatible with SPIR.
1212

SYCL/Assert/assert_in_kernels.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// REQUIRES: linux
22
// FIXME unsupported on CUDA and HIP until fallback libdevice becomes available
33
// UNSUPPORTED: cuda || hip
4-
// RUN: %clangxx -DSYCL_ENABLE_FALLBACK_ASSERT -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
4+
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
55
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
66
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
77
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true

SYCL/Assert/assert_in_kernels_win.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// REQUIRES: windows
22
// UNSUPPORTED: cuda || hip
3-
// RUN: %clangxx -DSYCL_ENABLE_FALLBACK_ASSERT -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
3+
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
44
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
55
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
66
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true

SYCL/Assert/assert_in_multiple_tus.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// REQUIRES: linux
22
// FIXME unsupported on CUDA and HIP until fallback libdevice becomes available
33
// UNSUPPORTED: cuda || hip
4-
// RUN: %clangxx -DSYCL_ENABLE_FALLBACK_ASSERT -fsycl -fsycl-targets=%sycl_triple -I %S/Inputs %s %S/Inputs/kernels_in_file2.cpp -o %t.out
4+
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple -I %S/Inputs %s %S/Inputs/kernels_in_file2.cpp -o %t.out
55
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
66
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
77
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true

SYCL/Assert/assert_in_multiple_tus_one_ndebug.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// REQUIRES: linux
22
// FIXME unsupported on CUDA and HIP until fallback libdevice becomes available
33
// UNSUPPORTED: cuda || hip
4-
// RUN: %clangxx -DSYCL_ENABLE_FALLBACK_ASSERT -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
4+
// 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
55
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
66
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
77
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true

SYCL/Assert/assert_in_multiple_tus_one_ndebug_win.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// REQUIRES: windows
22
// UNSUPPORTED: cuda || hip
3-
// RUN: %clangxx -DSYCL_ENABLE_FALLBACK_ASSERT -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
3+
// 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
44
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
55
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
66
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true

SYCL/Assert/assert_in_multiple_tus_win.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// REQUIRES: windows
22
// UNSUPPORTED: cuda || hip
3-
// RUN: %clangxx -DSYCL_ENABLE_FALLBACK_ASSERT -fsycl -fsycl-targets=%sycl_triple -I %S/Inputs %s %S/Inputs/kernels_in_file2.cpp -o %t.out
3+
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple -I %S/Inputs %s %S/Inputs/kernels_in_file2.cpp -o %t.out
44
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
55
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
66
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true

SYCL/Assert/assert_in_one_kernel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// REQUIRES: linux
22
// FIXME unsupported on CUDA and HIP until fallback libdevice becomes available
33
// UNSUPPORTED: cuda || hip
4-
// RUN: %clangxx -DSYCL_ENABLE_FALLBACK_ASSERT -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
4+
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
55
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
66
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
77
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true

SYCL/Assert/assert_in_one_kernel_win.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// REQUIRES: windows
22
// UNSUPPORTED: cuda || hip
3-
// RUN: %clangxx -DSYCL_ENABLE_FALLBACK_ASSERT -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
3+
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
44
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
55
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
66
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true

SYCL/Assert/assert_in_simultaneous_kernels.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// REQUIRES: linux
22
// FIXME unsupported on CUDA and HIP until fallback libdevice becomes available
33
// UNSUPPORTED: cuda || hip
4-
// RUN: %clangxx -DSYCL_ENABLE_FALLBACK_ASSERT -fsycl -fsycl-targets=%sycl_triple %s -o %t.out %threads_lib
4+
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple %s -o %t.out %threads_lib
55
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
66
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
77
//

SYCL/Assert/assert_in_simultaneous_kernels_win.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// REQUIRES: windows
22
// UNSUPPORTED: cuda || hip
3-
// RUN: %clangxx -DSYCL_ENABLE_FALLBACK_ASSERT -fsycl -fsycl-targets=%sycl_triple %s -o %t.out %threads_lib
3+
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple %s -o %t.out %threads_lib
44
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
55
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
66
//

SYCL/Assert/assert_in_simultaneously_multiple_tus.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// FIXME unsupported on CUDA and HIP until fallback libdevice becomes available
22
// UNSUPPORTED: cuda || hip
3-
// RUN: %clangxx -DSYCL_ENABLE_FALLBACK_ASSERT -fsycl -fsycl-targets=%sycl_triple -I %S/Inputs %s %S/Inputs/kernels_in_file2.cpp -o %t.out %threads_lib
3+
// 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
44
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
55
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
66
//

SYCL/Assert/assert_in_simultaneously_multiple_tus_one_ndebug.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// FIXME unsupported on CUDA and HIP until fallback libdevice becomes available
22
// UNSUPPORTED: cuda || hip
3-
// RUN: %clangxx -DSYCL_ENABLE_FALLBACK_ASSERT -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
3+
// 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
44
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
55
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
66
//

SYCL/AtomicRef/add.cpp

Lines changed: 5 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,12 @@
1-
// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t.out \
2-
// RUN: -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_60
1+
// See https://github.com/intel/llvm-test-suite/issues/867 for detailed status
2+
// UNSUPPORTED: hip
3+
4+
// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-device-code-split=per_kernel -fsycl-targets=%sycl_triple %s -o %t.out -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_70
35
// RUN: %HOST_RUN_PLACEHOLDER %t.out
46
// RUN: %GPU_RUN_PLACEHOLDER %t.out
57
// RUN: %CPU_RUN_PLACEHOLDER %t.out
68
// RUN: %ACC_RUN_PLACEHOLDER %t.out
79

810
#include "add.h"
9-
#include <iostream>
10-
using namespace sycl;
11-
12-
// Floating-point types do not support pre- or post-increment
13-
template <> void add_test<float>(queue q, size_t N) {
14-
add_fetch_test<::sycl::ext::oneapi::atomic_ref,
15-
access::address_space::global_space, float>(q, N);
16-
add_fetch_test<::sycl::atomic_ref, access::address_space::global_space,
17-
float>(q, N);
18-
add_plus_equal_test<::sycl::ext::oneapi::atomic_ref,
19-
access::address_space::global_space, float>(q, N);
20-
add_plus_equal_test<::sycl::atomic_ref, access::address_space::global_space,
21-
float>(q, N);
22-
}
23-
24-
int main() {
25-
queue q;
26-
27-
constexpr int N = 32;
28-
add_test<int>(q, N);
29-
add_test<unsigned int>(q, N);
30-
add_test<float>(q, N);
31-
32-
// Include long tests if they are 32 bits wide
33-
if constexpr (sizeof(long) == 4) {
34-
add_test<long>(q, N);
35-
add_test<unsigned long>(q, N);
36-
}
37-
38-
// Include pointer tests if they are 32 bits wide
39-
if constexpr (sizeof(char *) == 4) {
40-
add_test<char *, ptrdiff_t>(q, N);
41-
}
4211

43-
std::cout << "Test passed." << std::endl;
44-
}
12+
int main() { add_test_all<access::address_space::global_space>(); }

0 commit comments

Comments
 (0)