Skip to content

Commit ea38efd

Browse files
committed
Merge branch 'sycl' into georgi/test-hip-usm-copy2d
2 parents 0e813aa + 38c5524 commit ea38efd

File tree

11 files changed

+58
-51
lines changed

11 files changed

+58
-51
lines changed

.github/workflows/sycl-linux-run-tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,9 @@ jobs:
307307
if: inputs.tests_selector == 'cts'
308308
env:
309309
ONEAPI_DEVICE_SELECTOR: ${{ inputs.target_devices }}
310+
# This job takes ~100min usually. But sometimes some test isn't
311+
# responding, so the job reaches the 360min limit. Setting a lower one.
312+
timeout-minutes: 150
310313
# By-default GitHub actions execute the "run" shell script with -e option,
311314
# so the execution terminates if any command returns a non-zero status.
312315
# Since we're using a loop to run all test-binaries separately, some test
@@ -340,6 +343,7 @@ jobs:
340343
done
341344
if [ -n "$status" ]; then
342345
echo "Failed suite(s): $failed_suites"
346+
echo "Failed suite(s): $failed_suites" >> $GITHUB_STEP_SUMMARY
343347
exit 1
344348
fi
345349
exit 0

clang-tools-extra/clangd/test/sycl.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
# CHECK-NEXT: "range": {
2626
# CHECK-NEXT: "end": {
2727
# CHECK-NEXT: "character": 16,
28-
# CHECK-NEXT: "line": 124
28+
# CHECK-NEXT: "line": 116
2929
# CHECK-NEXT: },
3030
# CHECK-NEXT: "start": {
3131
# CHECK-NEXT: "character": 11,
32-
# CHECK-NEXT: "line": 124
32+
# CHECK-NEXT: "line": 116
3333
# CHECK-NEXT: }
3434
# CHECK-NEXT: },
3535
# CHECK-NEXT: "uri": "file://{{.*}}/include/sycl/queue.hpp"

clang/lib/Driver/ToolChains/MSVC.cpp

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -135,23 +135,18 @@ void visualstudio::Linker::ConstructJob(Compilation &C, const JobAction &JA,
135135
CmdArgs.push_back("-defaultlib:oldnames");
136136
}
137137

138-
if ((Args.hasArg(options::OPT_fsycl) &&
138+
if ((!C.getDriver().IsCLMode() && Args.hasArg(options::OPT_fsycl) &&
139139
!Args.hasArg(options::OPT_nolibsycl)) ||
140140
Args.hasArg(options::OPT_fsycl_host_compiler_EQ)) {
141141
CmdArgs.push_back(Args.MakeArgString(std::string("-libpath:") +
142142
TC.getDriver().Dir + "/../lib"));
143-
if (!Args.hasArg(options::OPT__SLASH_MDd) &&
144-
!isDependentLibAdded(Args, "msvcrtd")) {
143+
// When msvcrtd is added via --dependent-lib, we add the sycld
144+
// equivalent. Do not add the -defaultlib as it conflicts.
145+
if (!isDependentLibAdded(Args, "msvcrtd")) {
145146
if (Args.hasArg(options::OPT_fpreview_breaking_changes))
146147
CmdArgs.push_back("-defaultlib:sycl" SYCL_MAJOR_VERSION "-preview.lib");
147148
else
148149
CmdArgs.push_back("-defaultlib:sycl" SYCL_MAJOR_VERSION ".lib");
149-
} else {
150-
if (Args.hasArg(options::OPT_fpreview_breaking_changes))
151-
CmdArgs.push_back("-defaultlib:sycl" SYCL_MAJOR_VERSION
152-
"-previewd.lib");
153-
else
154-
CmdArgs.push_back("-defaultlib:sycl" SYCL_MAJOR_VERSION "d.lib");
155150
}
156151
CmdArgs.push_back("-defaultlib:sycl-devicelib-host.lib");
157152
}

clang/test/Driver/sycl-offload.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@
486486
// RUN: %clang -fsycl -target x86_64-unknown-windows-msvc %s -o %t -### 2>&1 | FileCheck -check-prefix=CHECK-LINK-SYCL %s
487487
// RUN: %clang_cl -fsycl %s -o %t -### 2>&1 | FileCheck -check-prefix=CHECK-LINK-SYCL-CL %s
488488
// CHECK-LINK-SYCL-CL: "--dependent-lib=sycl{{[0-9]*}}"
489-
// CHECK-LINK-SYCL-CL: "-defaultlib:sycl{{[0-9]*}}.lib"
489+
// CHECK-LINK-SYCL-CL-NOT: "-defaultlib:sycl{{[0-9]*}}.lib"
490490
// CHECK-LINK-SYCL: "-defaultlib:sycl{{[0-9]*}}.lib"
491491

492492
/// Check no SYCL runtime is linked with -nolibsycl
@@ -837,16 +837,3 @@
837837
// FSYCL-PREVIEW-BREAKING-CHANGES-DEBUG-CHECK: --dependent-lib=sycl{{[0-9]*}}-previewd
838838
// FSYCL-PREVIEW-BREAKING-CHANGES-DEBUG-CHECK-NOT: -defaultlib:sycl{{[0-9]*}}.lib
839839
// FSYCL-PREVIEW-BREAKING-CHANGES-DEBUG-CHECK-NOT: -defaultlib:sycl{{[0-9]*}}-preview.lib
840-
841-
842-
/// Check that at link step of "clang-cl -fsycl" we pull in sycl.lib even if at the compilation step sycl libraries were not provided (this is possible if user compiles manually without -fsycl by provided paths to the headers).
843-
// RUN: %clang_cl -### -fsycl -nolibsycl -target x86_64-unknown-windows-msvc -c %s 2>&1 | FileCheck -check-prefix FSYCL-CL-COMPILE-NOLIBS-CHECK %s
844-
// RUN: %clang_cl -### -fsycl %s 2>&1 | FileCheck -check-prefix FSYCL-CL-LINK-CHECK %s
845-
// FSYCL-CL-COMPILE-NOLIBS-CHECK-NOT: "--dependent-lib=sycl{{[0-9]*}}"
846-
// FSYCL-CL-LINK-CHECK: "-defaultlib:sycl{{[0-9]*}}.lib"
847-
848-
/// Check that at link step of "clang-cl -fsycl /MDd" we pull in sycld.lib even if at the compilation step sycl libraries were not provided (this is possible if user compiles manually without -fsycl by provided paths to the headers).
849-
// RUN: %clang_cl -### -fsycl -nolibsycl /MDd -target x86_64-unknown-windows-msvc -c %s 2>&1 | FileCheck -check-prefix FSYCL-CL-COMPILE-NOLIBS-MDd-CHECK %s
850-
// RUN: %clang_cl -### -fsycl /MDd %s 2>&1 | FileCheck -check-prefix FSYCL-CL-LINK--MDd-CHECK %s
851-
// FSYCL-CL-COMPILE-NOLIBS-MDd-CHECK-NOT: "--dependent-lib=sycl{{[0-9]*}}d"
852-
// FSYCL-CL-LINK--MDd-CHECK: "-defaultlib:sycl{{[0-9]*}}d.lib"

devops/cts_exclude_filter

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# These two take too much time
22
kernel_bundle
33
marray
4-
# https://github.com/intel/llvm/issues/12926
5-
h_item
4+
# https://github.com/intel/llvm/issues/13332
5+
hierarchical

llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1328,7 +1328,7 @@ static bool isUnsupportedSPIRAccess(Value *Addr, Function *Func) {
13281328
}
13291329

13301330
// All the rest address spaces: skip SPIR-V built-in varibles
1331-
auto *OrigValue = Addr->stripPointerCasts();
1331+
auto *OrigValue = Addr->stripInBoundsOffsets();
13321332
return OrigValue->getName().starts_with("__spirv_BuiltIn");
13331333
}
13341334

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
; RUN: opt < %s -passes=asan -asan-instrumentation-with-call-threshold=0 -asan-stack=0 -asan-globals=0 -S | FileCheck %s
2+
3+
target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64"
4+
target triple = "spir64-unknown-unknown"
5+
6+
@__spirv_BuiltInGlobalInvocationId = external addrspace(1) constant <3 x i64>
7+
8+
; Function Attrs: sanitize_address
9+
define spir_kernel void @_ZTSN4sycl3_V16detail19__pf_kernel_wrapperIZZ4mainENKUlRNS0_7handlerEE_clES4_E19bufferByRange2_initEE() #0 {
10+
entry:
11+
; CHECK-NOT: {{ __asan_load8.*__spirv_BuiltInGlobalInvocationId }}
12+
%0 = load i64, ptr addrspace(1) getelementptr inbounds (i8, ptr addrspace(1) @__spirv_BuiltInGlobalInvocationId, i64 8), align 8
13+
ret void
14+
}
15+
16+
attributes #0 = { sanitize_address }
17+

sycl/plugins/unified_runtime/CMakeLists.txt

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,23 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT)
110110

111111
fetch_adapter_source(opencl
112112
${UNIFIED_RUNTIME_REPO}
113-
# Merge: e60c3c22 9287547e
113+
# commit 85b7559033e329389452cb87615ad42fbb644d59 (HEAD -> main, origin/main, origin/HEAD)
114+
# Merge: a7c202b4 5c300799
114115
# Author: Kenneth Benzie (Benie) <[email protected]>
115-
# Date: Thu Apr 4 10:23:33 2024 +0200
116-
# Merge pull request #1448 from steffenlarsen/steffen/make_ext_func_fail_unsupported
117-
# [OpenCL] Make extension function lookup return unusupported error
118-
3609afc7f8781f2eae5de74deaf50ba52b1bb344
116+
# Date: Tue Apr 9 14:06:49 2024 +0100
117+
# Merge pull request #1496 from steffenlarsen/steffen/revert_memory_lookup_error
118+
# [OpenCL] Revert urMemBufferCreate extension function lookup error
119+
85b7559033e329389452cb87615ad42fbb644d59
119120
)
120121

121122
fetch_adapter_source(cuda
122123
${UNIFIED_RUNTIME_REPO}
123-
${UNIFIED_RUNTIME_TAG}
124+
# Merge: ecdd159f c02d137e
125+
# Author: Kenneth Benzie (Benie) <[email protected]>
126+
# Date: Wed Apr 10 11:04:28 2024 +0100
127+
# Merge pull request #1181 from DuncanMcBain/cuda-mem-size-fix
128+
# Return device total global memory for MaxAllocSize
129+
05b5899202f7e3b3f12f4c5b8fc8f01451d08105
124130
)
125131

126132
fetch_adapter_source(hip

sycl/test-e2e/ESIMD/srnd.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <sycl/ext/intel/esimd.hpp>
1515
#include <sycl/sycl.hpp>
1616

17+
#include <cmath>
1718
#include <iostream>
1819

1920
using namespace sycl;

sycl/test-e2e/Matrix/element_wise_all_ops.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
//
77
//===----------------------------------------------------------------------===//
88
// REQUIRES: aspect-ext_intel_matrix
9-
// Test is flaky/timeouts on some variants of DG2 and temporary disabled. Needs
10-
// to be investigated.
11-
// UNSUPPORTED: gpu-intel-dg2
129

1310
// RUN: %{build} -o %t.out
1411
// RUN: %{run} %t.out

sycl/test-e2e/Matrix/joint_matrix_apply_two_matrices_impl.hpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ bool apply_verify(Tc *C, Tc *D, Ta *A, Ta *Ar) {
2828
return true;
2929
}
3030
template <typename Tc, typename Ta, size_t TM, size_t TN, size_t TK, size_t M,
31-
size_t N, class kernel_name>
31+
size_t N, size_t K, class kernel_name>
3232
bool apply_two_matrices(Tc *C, Tc *D, Ta *A, Ta *Ar, queue q) {
3333
size_t NDRangeM = M / TM;
3434
size_t NDRangeN = N / TN;
@@ -76,13 +76,13 @@ bool apply_two_matrices(Tc *C, Tc *D, Ta *A, Ta *Ar, queue q) {
7676
sg, sub_d, pD + (sg_startx * TM) * N + sg_starty / sg_size * TN,
7777
N, layout::row_major);
7878
joint_matrix_load(
79-
sg, sub_a, pA + (sg_startx * TM) * N + sg_starty / sg_size * TK,
80-
N);
79+
sg, sub_a, pA + (sg_startx * TM) * K + sg_starty / sg_size * TK,
80+
K);
8181
joint_matrix_apply(sg, sub_a, sub_ar,
8282
[](const Ta &x, Ta &y) { y = x + 42; });
8383
ext::intel::experimental::matrix::joint_matrix_store(
8484
sg, sub_ar,
85-
pAr + (sg_startx * TM) * N + sg_starty / sg_size * TK, N);
85+
pAr + (sg_startx * TM) * K + sg_starty / sg_size * TK, K);
8686
}); // parallel for
8787
}).wait();
8888
return apply_verify<Tc, Ta, M, N>(C, D, A, Ar);
@@ -91,27 +91,27 @@ bool apply_two_matrices(Tc *C, Tc *D, Ta *A, Ta *Ar, queue q) {
9191
template <typename Ta, typename Tc, size_t TM, size_t TN, size_t TK,
9292
class kernel_name>
9393
bool test() {
94-
9594
static constexpr size_t M = TM * 2;
9695
static constexpr size_t N = TN * 2;
96+
static constexpr size_t K = TK * 2;
9797
queue q;
9898

9999
Tc *C = malloc_shared<Tc>(M * N, q);
100100
Tc *D = malloc_shared<Tc>(M * N, q);
101-
Ta *A = malloc_shared<Ta>(M * N, q);
102-
Ta *Ar = malloc_shared<Ta>(M * N, q);
101+
Ta *A = malloc_shared<Ta>(M * K, q);
102+
Ta *Ar = malloc_shared<Ta>(M * K, q);
103103

104104
matrix_rand(M, N, (Tc *)C, (Tc)100);
105-
matrix_rand(M, N, (Ta *)A, (Ta)100);
105+
matrix_rand(M, K, (Ta *)A, (Ta)100);
106106

107-
bool res =
108-
apply_two_matrices<Tc, Ta, TM, TN, TK, M, N, kernel_name>(C, D, A, Ar, q);
107+
bool res = apply_two_matrices<Tc, Ta, TM, TN, TK, M, N, K, kernel_name>(
108+
C, D, A, Ar, q);
109109

110110
if constexpr (std::is_same_v<Ta, bfloat16>)
111-
std::cout << "bfloat16 " << TM << "x" << TN << ": "
111+
std::cout << "bfloat16 " << TM << "x" << TN << "x" << TK << ": "
112112
<< (res ? "passed" : "failed") << std::endl;
113113
else if constexpr (std::is_same_v<Ta, int8_t>)
114-
std::cout << "int8_t " << TM << "x" << TN << ": "
114+
std::cout << "int8_t " << TM << "x" << TN << "x" << TK << ": "
115115
<< (res ? "passed" : "failed") << std::endl;
116116
return res;
117117
}
@@ -126,8 +126,8 @@ int main() {
126126
bool passed = true;
127127
for (unsigned int i = 0; i < combinations.size(); i++) {
128128
if (combinations[i].nsize == 0) { // Intel AMX
129-
passed &= test<int8_t, int32_t, 8, 16, 32, class amx_int_8x16x32>();
130-
passed &= test<bfloat16, float, 8, 16, 32, class amx_bf16_8x16x32>();
129+
passed &= test<int8_t, int32_t, 16, 16, 64, class amx_int_16x16x64>();
130+
passed &= test<bfloat16, float, 16, 16, 32, class amx_bf16_16x16x32>();
131131
break;
132132
}
133133

0 commit comments

Comments
 (0)