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

Commit 26f1816

Browse files
committed
Merge branch 'intel' of https://github.com/intel/llvm-test-suite into l20
2 parents 77b177c + fff3672 commit 26f1816

File tree

147 files changed

+2500
-441
lines changed

Some content is hidden

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

147 files changed

+2500
-441
lines changed

SYCL/Basic/device_event.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
// TODO: nd_item::barrier() is not implemented on HOST
66
// RUNx: %HOST_RUN_PLACEHOLDER %t.run
77
//
8-
// Crashes on AMD
9-
// XFAIL: hip_amd
8+
// Crashes on AMD, returns error "Barrier is not supported on the host device
9+
// yet." with Nvidia.
10+
// XFAIL: hip_amd || hip_nvidia
1011

1112
//==--------device_event.cpp - SYCL class device_event test ----------------==//
1213
//

SYCL/Basic/diagnostics/handler.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
22
// RUN: %BE_RUN_PLACEHOLDER %t.out | FileCheck %s
3+
//
4+
// Appears to fail on HIP Nvidia because 'no device of requested type available'
5+
// when constructing a queue with an exception_list.
6+
// XFAIL: hip_nvidia
37
//==------------------- handler.cpp ----------------------------------------==//
48
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
59
// See https://llvm.org/LICENSE.txt for license information.

SYCL/Basic/group_async_copy.cpp

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.run
1+
// RUN: %clangxx -fsycl -std=c++17 -fsycl-targets=%sycl_triple %s -o %t.run
22
// RUN: %GPU_RUN_PLACEHOLDER %t.run
33
// RUN: %CPU_RUN_PLACEHOLDER %t.run
44
// RUN: %ACC_RUN_PLACEHOLDER %t.run
@@ -13,7 +13,11 @@
1313

1414
using namespace cl::sycl;
1515

16-
template <typename T> class KernelName;
16+
template <typename T> class TypeHelper;
17+
18+
template <typename T>
19+
using KernelName = class TypeHelper<typename std::conditional<
20+
std::is_same<T, std::byte>::value, unsigned char, T>::type>;
1721

1822
// Define the number of work items to enqueue.
1923
const size_t NElems = 32;
@@ -24,14 +28,14 @@ template <typename T> void initInputBuffer(buffer<T, 1> &Buf, size_t Stride) {
2428
auto Acc = Buf.template get_access<access::mode::write>();
2529
for (size_t I = 0; I < Buf.get_count(); I += WorkGroupSize) {
2630
for (size_t J = 0; J < WorkGroupSize; J++)
27-
Acc[I + J] = I + J + ((J % Stride == 0) ? 100 : 0);
31+
Acc[I + J] = static_cast<T>(I + J + ((J % Stride == 0) ? 100 : 0));
2832
}
2933
}
3034

3135
template <typename T> void initOutputBuffer(buffer<T, 1> &Buf) {
3236
auto Acc = Buf.template get_access<access::mode::write>();
3337
for (size_t I = 0; I < Buf.get_count(); I++)
34-
Acc[I] = 0;
38+
Acc[I] = static_cast<T>(0);
3539
}
3640

3741
template <typename T> struct is_vec : std::false_type {};
@@ -48,9 +52,8 @@ template <typename T> bool checkEqual(vec<T, 4> A, size_t B) {
4852
}
4953

5054
template <typename T>
51-
typename std::enable_if<!is_vec<T>::value, bool>::type checkEqual(T A,
52-
size_t B) {
53-
T TB = B;
55+
typename std::enable_if_t<!is_vec<T>::value, bool> checkEqual(T A, size_t B) {
56+
T TB = static_cast<T>(B);
5457
return A == TB;
5558
}
5659

@@ -67,7 +70,16 @@ template <typename T> std::string toString(vec<T, 4> A) {
6770
}
6871

6972
template <typename T = void>
70-
typename std::enable_if<!is_vec<T>::value, std::string>::type toString(T A) {
73+
typename std::enable_if_t<
74+
!is_vec<T>::value && std::is_same<T, std::byte>::value, std::string>
75+
toString(T A) {
76+
return std::to_string((unsigned char)A);
77+
}
78+
79+
template <typename T = void>
80+
typename std::enable_if_t<
81+
!is_vec<T>::value && !std::is_same<T, std::byte>::value, std::string>
82+
toString(T A) {
7183
return std::to_string(A);
7284
}
7385

@@ -156,6 +168,8 @@ int main() {
156168
return 1;
157169
if (test<cl::sycl::cl_bool>(Stride))
158170
return 1;
171+
if (test<std::byte>(Stride))
172+
return 1;
159173
}
160174

161175
std::cout << "Test passed.\n";

SYCL/Basic/handler/interop_task.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
//
1212
//===----------------------------------------------------------------------===//
1313

14-
#include "CL/sycl/access/access.hpp"
1514
#include <CL/sycl.hpp>
1615
#include <CL/sycl/backend/opencl.hpp>
1716

SYCL/Basic/handler/run_on_host_intel.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#include "CL/sycl/access/access.hpp"
1413
#include <CL/sycl.hpp>
1514

1615
#include "../../helpers.hpp"

SYCL/Basic/host-task-dependency.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//
66
// TODO: Behaviour is unstable for level zero on Windows. Enable when fixed.
77
// TODO: The test is sporadically fails on CUDA. Enable when fixed.
8-
// UNSUPPORTED: (windows && level_zero) || cuda
8+
// UNSUPPORTED: (windows && level_zero) || cuda || hip_nvidia
99

1010
#define SYCL2020_DISABLE_DEPRECATION_WARNINGS
1111

SYCL/Basic/image/image_max_size.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
// RUN: %CPU_RUN_PLACEHOLDER %t.out
44
// RUN: %GPU_RUN_PLACEHOLDER %t.out
55

6-
// UNSUPPORTED: cuda || hip
6+
// UNSUPPORTED: cuda || hip || (windows && opencl && gpu)
77
// CUDA does not support info::device::image3d_max_width query.
8+
// TODO: Irregular runtime fails on Windows/opencl:gpu require analysis.
89

910
// The test checks that 'image' with max allowed sizes is handled correctly.
1011

SYCL/Basic/kernel_bundle/kernel_bundle_api.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,7 @@ int main() {
330330
sycl::link({KernelBundleObject1, KernelBundleObject2},
331331
std::vector<sycl::device>{});
332332
},
333-
"Not all devices are in the set of associated devices for input "
334-
"bundles or vector of devices is empty");
333+
"Vector of devices is empty");
335334

336335
std::cerr << "Mismatched contexts for join" << std::endl;
337336
checkException(

SYCL/Basic/kernel_info.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
// Fail is flaky for level_zero, enable when fixed.
77
// UNSUPPORTED: level_zero
88
//
9-
// Failing on HIP AMD
10-
// XFAIL: hip_amd
9+
// Failing on HIP AMD and HIP Nvidia
10+
// XFAIL: hip_amd || hip_nvidia
1111

1212
//==--- kernel_info.cpp - SYCL kernel info test ----------------------------==//
1313
//
@@ -32,7 +32,6 @@ int main() {
3232
kernel krn = KB.get_kernel(KernelID);
3333

3434
q.submit([&](handler &cgh) {
35-
cgh.use_kernel_bundle(KB);
3635
auto acc = buf.get_access<access::mode::read_write>(cgh);
3736
cgh.single_task<class SingleTask>(krn, [=]() { acc[0] = acc[0] + 1; });
3837
});

SYCL/Basic/memory-consumption.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// RUN: %clangxx -fsycl %s -o %t.out
22
// RUN: %GPU_RUN_PLACEHOLDER %t.out
33
//
4+
// XFAIL: hip_nvidia
45
// Issue #106: The test failing sporadically on OpenCL platform due to
56
// processing OCL_ICD_FILENAMES debug environment variable which causes
67
// extra memory allocation on device creation.

SYCL/Basic/partition_supported.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
// RUN: %CPU_RUN_PLACEHOLDER %t.out
33
// RUN: %GPU_RUN_PLACEHOLDER %t.out
44
// RUN: %ACC_RUN_PLACEHOLDER %t.out
5-
5+
//
6+
// Nvidia should not allow sub_devices but does not throw corresponding error.
7+
// XFAIL: hip_nvidia
68
/* Check that:
79
1) [info::device::partition_properties]: returns the partition properties
810
supported by this SYCL device; a vector of info::partition_property. If this

SYCL/Basic/queue/queue.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
22
// RUN: %BE_RUN_PLACEHOLDER %t.out
3+
//
4+
// XFAIL: hip_nvidia
35
//==--------------- queue.cpp - SYCL queue test ----------------------------==//
46
//
57
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.

SYCL/Basic/queue/release.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// RUN: env SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out %GPU_CHECK_PLACEHOLDER
33
// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER
44
// RUN: env SYCL_PI_TRACE=2 %ACC_RUN_PLACEHOLDER %t.out %ACC_CHECK_PLACEHOLDER
5+
//
6+
// XFAIL: hip_nvidia
57

68
#include <CL/sycl.hpp>
79
int main() {

SYCL/Basic/stream/auto_flush.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
// RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER
44
// RUN: %GPU_RUN_ON_LINUX_PLACEHOLDER %t.out %GPU_CHECK_ON_LINUX_PLACEHOLDER
55
// RUN: %ACC_RUN_PLACEHOLDER %t.out %ACC_CHECK_PLACEHOLDER
6+
//
7+
// XFAIL: hip_nvidia
68
//==-------------- copy.cpp - SYCL stream obect auto flushing test ---------==//
79
//
810
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.

SYCL/Config/kernel_from_file.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33

44
// FIXME Disabled fallback assert as it'll require either online linking or
55
// explicit offline linking step here
6-
// RUN: %clangxx -DSYCL_DISABLE_FALLBACK_ASSERT %cxx_std_optionc++17 -fsycl-device-only -fno-sycl-use-bitcode -Xclang -fsycl-int-header=%t.h -c %s -o %t.spv -Xclang -verify-ignore-unexpected=note,warning -Wno-sycl-strict
7-
// RUN: %clangxx -DSYCL_DISABLE_FALLBACK_ASSERT %cxx_std_optionc++17 %include_option %t.h %s -o %t.out %sycl_options -Xclang -verify-ignore-unexpected=note,warning
6+
// FIXME separate compilation requires -fno-sycl-dead-args-optimization
7+
// RUN: %clangxx -DSYCL_DISABLE_FALLBACK_ASSERT %cxx_std_optionc++17 -fsycl-device-only -fno-sycl-use-bitcode -fno-sycl-dead-args-optimization -Xclang -fsycl-int-header=%t.h -c %s -o %t.spv -Xclang -verify-ignore-unexpected=note,warning -Wno-sycl-strict
8+
// RUN: %clangxx -DSYCL_DISABLE_FALLBACK_ASSERT %cxx_std_optionc++17 %include_option %t.h %s -o %t.out %sycl_options -fno-sycl-dead-args-optimization -Xclang -verify-ignore-unexpected=note,warning
89
// RUN: %BE_RUN_PLACEHOLDER env SYCL_USE_KERNEL_SPV=%t.spv %t.out | FileCheck %s
910
// CHECK: Passed
1011

0 commit comments

Comments
 (0)