Skip to content

Commit a7b2fdc

Browse files
author
Hugh Delaney
committed
Merge main into branch
2 parents 37a18d7 + 29b64f2 commit a7b2fdc

File tree

137 files changed

+7710
-6619
lines changed

Some content is hidden

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

137 files changed

+7710
-6619
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ libdevice/ @intel/llvm-reviewers-runtime
2222
sycl/ @intel/llvm-reviewers-runtime
2323

2424
# Documentation
25-
sycl/ReleaseNotes.md @intel/dpcpp-doc-reviewers
25+
sycl/ReleaseNotes.md @intel/dpcpp-doc-reviewers @tfzhu
2626
sycl/doc/ @intel/dpcpp-doc-reviewers
2727
sycl/doc/design/ @intel/dpcpp-specification-reviewers
2828
sycl/doc/design/spirv-extensions/ @intel/dpcpp-spirv-doc-reviewers
@@ -50,5 +50,6 @@ clang/tools/clang-offload-*/ @intel/dpcpp-tools-reviewers
5050
# Explicit SIMD
5151
ESIMD/ @intel/dpcpp-esimd-reviewers
5252
esimd/ @intel/dpcpp-esimd-reviewers
53-
sycl/include/sycl/ext/intel/experimental/esimd.hpp @intel/dpcpp-esimd-reviewers
53+
sycl/include/sycl/ext/intel/esimd.hpp @intel/dpcpp-esimd-reviewers
5454
sycl/doc/extensions/experimental/sycl_ext_intel_esimd/ @intel/dpcpp-esimd-reviewers
55+
llvm/lib/SYCLLowerIR/CMakeLists.txt @intel/dpcpp-tools-reviewers @intel/dpcpp-esimd-reviewers

.github/workflows/sycl_containers.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,15 @@ on:
1010
paths:
1111
- 'devops/containers/**'
1212
- 'devops/dependencies.json'
13+
- 'devops/scripts/install_drivers.sh'
14+
- 'devops/scripts/install_build_tools.sh'
1315
- '.github/workflows/sycl_containers.yaml'
1416
pull_request:
1517
paths:
1618
- 'devops/containers/**'
1719
- 'devops/dependencies.json'
20+
- 'devops/scripts/install_drivers.sh'
21+
- 'devops/scripts/install_build_tools.sh'
1822
- '.github/workflows/sycl_containers.yaml'
1923

2024
jobs:

.github/workflows/sycl_linux_build_and_test.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ on:
1515
type: string
1616
required: false
1717
default: "ghcr.io/intel/llvm/ubuntu2004_build:latest"
18-
build_runs_on:
19-
type: string
20-
required: false
21-
default: "build"
2218
build_ref:
2319
type: string
2420
required: false
@@ -43,7 +39,7 @@ on:
4339
intel_drivers_image:
4440
type: string
4541
required: false
46-
default: "ghcr.io/intel/llvm/ubuntu2004_intel_drivers:latest"
42+
default: "ghcr.io/intel/llvm/ubuntu2004_intel_drivers:unstable"
4743
lts_config:
4844
type: string
4945
required: false
@@ -68,7 +64,7 @@ on:
6864
jobs:
6965
build:
7066
name: Build + LIT
71-
runs-on: ${{ inputs.build_runs_on }}
67+
runs-on: [Linux, build]
7268
container:
7369
image: ${{ inputs.build_image }}
7470
options: -u 1001:1001

.github/workflows/sycl_nightly.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ jobs:
6464
if: github.repository == 'intel/llvm'
6565
uses: ./.github/workflows/sycl_linux_build_and_test.yml
6666
with:
67-
build_runs_on: build
6867
build_cache_root: "/__w/"
6968
build_cache_suffix: new_pm
7069
build_artifact_suffix: new_pm

.github/workflows/sycl_post_commit.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@ jobs:
1515
name: Linux Default
1616
uses: ./.github/workflows/sycl_linux_build_and_test.yml
1717
with:
18-
build_runs_on: build
1918
build_cache_root: "/__w/llvm"
2019
build_artifact_suffix: default
2120
linux_no_assert:
2221
name: Linux (no assert)
2322
uses: ./.github/workflows/sycl_linux_build_and_test.yml
2423
with:
25-
build_runs_on: build
2624
build_cache_root: "/__w/llvm"
2725
build_cache_suffix: gcc_no_assertions
2826
build_artifact_suffix: gcc_no_assertions

.github/workflows/sycl_precommit.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ on:
44
pull_request:
55
branches:
66
- sycl
7+
# Do not run builds if changes are only in the following locations
8+
paths-ignore:
9+
- 'devops/containers/**'
10+
- 'devops/scripts/install_drivers.sh'
11+
- 'devops/scripts/install_build_tools.sh'
12+
- 'sycl/doc/**'
13+
- 'sycl/gdb/**'
14+
- 'clang/docs/**'
15+
- '**.md'
16+
- '**.rst'
717

818
jobs:
919
lint:
@@ -25,7 +35,6 @@ jobs:
2535
if: always() && (success() || contains(github.event.pull_request.labels.*.name, 'ignore-lint'))
2636
uses: ./.github/workflows/sycl_linux_build_and_test.yml
2737
with:
28-
build_runs_on: "build"
2938
build_cache_root: "/__w/"
3039
build_cache_size: "8G"
3140
build_artifact_suffix: "default"

clang/include/clang/Basic/BuiltinsNVPTX.def

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ BUILTIN(__nvvm_saturate_d, "dd", "")
205205
BUILTIN(__nvvm_ex2_approx_ftz_f, "ff", "")
206206
BUILTIN(__nvvm_ex2_approx_f, "ff", "")
207207
BUILTIN(__nvvm_ex2_approx_d, "dd", "")
208+
TARGET_BUILTIN(__nvvm_ex2_approx_f16, "hh", "", AND(SM_75, PTX70))
209+
TARGET_BUILTIN(__nvvm_ex2_approx_f16x2, "V2hV2h", "", AND(SM_75, PTX70))
208210

209211
BUILTIN(__nvvm_lg2_approx_ftz_f, "ff", "")
210212
BUILTIN(__nvvm_lg2_approx_f, "ff", "")
@@ -218,6 +220,12 @@ BUILTIN(__nvvm_sin_approx_f, "ff", "")
218220
BUILTIN(__nvvm_cos_approx_ftz_f, "ff", "")
219221
BUILTIN(__nvvm_cos_approx_f, "ff", "")
220222

223+
// Tanh
224+
225+
TARGET_BUILTIN(__nvvm_tanh_approx_f, "ff", "", AND(SM_75,PTX70))
226+
TARGET_BUILTIN(__nvvm_tanh_approx_f16, "hh", "", AND(SM_75, PTX70))
227+
TARGET_BUILTIN(__nvvm_tanh_approx_f16x2, "V2hV2h", "", AND(SM_75, PTX70))
228+
221229
// Fma
222230

223231
BUILTIN(__nvvm_fma_rn_ftz_f, "ffff", "")

clang/lib/Driver/Driver.cpp

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2992,9 +2992,10 @@ static SmallVector<const char *, 16>
29922992
getLinkerArgs(Compilation &C, DerivedArgList &Args, bool IncludeObj = false) {
29932993
SmallVector<const char *, 16> LibArgs;
29942994
SmallVector<std::string, 8> LibPaths;
2995-
// Add search directories from LIBRARY_PATH env variable
2995+
bool IsMSVC = C.getDefaultToolChain().getTriple().isWindowsMSVCEnvironment();
2996+
// Add search directories from LIBRARY_PATH/LIB env variable
29962997
llvm::Optional<std::string> LibPath =
2997-
llvm::sys::Process::GetEnv("LIBRARY_PATH");
2998+
llvm::sys::Process::GetEnv(IsMSVC ? "LIB" : "LIBRARY_PATH");
29982999
if (LibPath) {
29993000
SmallVector<StringRef, 8> SplitPaths;
30003001
const char EnvPathSeparatorStr[] = {llvm::sys::EnvPathSeparator, '\0'};
@@ -3028,12 +3029,36 @@ getLinkerArgs(Compilation &C, DerivedArgList &Args, bool IncludeObj = false) {
30283029
};
30293030
for (const auto *A : Args) {
30303031
std::string FileName = A->getAsString(Args);
3032+
auto addLibArg = [&](StringRef LibName) -> bool {
3033+
if (isStaticArchiveFile(LibName) ||
3034+
(IncludeObj && isObjectFile(LibName.str()))) {
3035+
LibArgs.push_back(Args.MakeArgString(LibName));
3036+
return true;
3037+
}
3038+
return false;
3039+
};
30313040
if (A->getOption().getKind() == Option::InputClass) {
3032-
StringRef Value(A->getValue());
3033-
if (isStaticArchiveFile(Value) ||
3034-
(IncludeObj && isObjectFile(Value.str()))) {
3035-
LibArgs.push_back(Args.MakeArgString(FileName));
3041+
if (addLibArg(FileName))
30363042
continue;
3043+
}
3044+
// Evaluate any libraries passed along after /link. These are typically
3045+
// ignored by the driver and sent directly to the linker. When performing
3046+
// offload, we should evaluate them at the driver level.
3047+
if (A->getOption().matches(options::OPT__SLASH_link)) {
3048+
for (const std::string &Value : A->getValues()) {
3049+
// Add any libpath values.
3050+
StringRef OptCheck(Value);
3051+
if (OptCheck.startswith_insensitive("-libpath:") ||
3052+
OptCheck.startswith_insensitive("/libpath:"))
3053+
LibPaths.emplace_back(Value.substr(std::string("-libpath:").size()));
3054+
if (addLibArg(Value))
3055+
continue;
3056+
for (auto LPath : LibPaths) {
3057+
SmallString<128> FullLib(LPath);
3058+
llvm::sys::path::append(FullLib, Value);
3059+
if (addLibArg(FullLib))
3060+
continue;
3061+
}
30373062
}
30383063
}
30393064
if (A->getOption().matches(options::OPT_Wl_COMMA) ||
@@ -3075,9 +3100,8 @@ getLinkerArgs(Compilation &C, DerivedArgList &Args, bool IncludeObj = false) {
30753100
llvm::StringSaver S(A);
30763101
llvm::cl::ExpandResponseFiles(
30773102
S,
3078-
C.getDefaultToolChain().getTriple().isWindowsMSVCEnvironment()
3079-
? llvm::cl::TokenizeWindowsCommandLine
3080-
: llvm::cl::TokenizeGNUCommandLine,
3103+
IsMSVC ? llvm::cl::TokenizeWindowsCommandLine
3104+
: llvm::cl::TokenizeGNUCommandLine,
30813105
ExpandArgs);
30823106
for (StringRef EA : ExpandArgs)
30833107
addKnownValues(EA);
@@ -8311,7 +8335,7 @@ bool clang::driver::isStaticArchiveFile(const StringRef &FileName) {
83118335
llvm::file_magic Magic;
83128336
llvm::identify_magic(FileName, Magic);
83138337
// Only .lib and archive files are to be considered.
8314-
return (Ext == "lib" || Magic == llvm::file_magic::archive);
8338+
return (Magic == llvm::file_magic::archive);
83158339
}
83168340

83178341
bool clang::driver::willEmitRemarks(const ArgList &Args) {

clang/test/Driver/sycl-offload-win.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,32 @@
1414
// RUN: | FileCheck %s -check-prefix=FOFFLOAD_STATIC_LIB
1515
// RUN: %clang_cl --target=x86_64-pc-windows-msvc -fsycl -fno-sycl-device-lib=all %t-orig.lib %t-orig.obj -### 2>&1 \
1616
// RUN: | FileCheck %s -check-prefix=FOFFLOAD_STATIC_LIB
17+
// RUN: %clang_cl --target=x86_64-pc-windows-msvc -fsycl -fno-sycl-device-lib=all %t-orig.obj -### /link %t-orig.lib 2>&1 \
18+
// RUN: | FileCheck %s -check-prefix=FOFFLOAD_STATIC_LIB
1719
// FOFFLOAD_STATIC_LIB: clang-offload-bundler{{(.exe)?}}{{.+}} "-type=o" "-targets=host-x86_64-pc-windows-msvc,sycl-spir64-unknown-unknown" "-inputs={{.*}}-orig.obj" "-outputs={{.+}}.{{(o|obj)}},{{.+}}.{{(o|obj)}}" "-unbundle"
1820
// FOFFLOAD_STATIC_LIB: clang-offload-bundler{{(.exe)?}}{{.+}} "-type=aoo" "-targets=sycl-spir64-{{.+}}" "-inputs={{.*}}-orig.lib" "-outputs=[[OUTLIB:.+\.txt]]" "-unbundle"
1921
// FOFFLOAD_STATIC_LIB: llvm-foreach{{.*}} "--out-ext=txt" "--in-file-list=[[OUTLIB]]" "--in-replace=[[OUTLIB]]" "--out-file-list=[[OUTLIST:.+\.txt]]" "--out-replace=[[OUTLIST]]" "--" {{.*}}spirv-to-ir-wrapper{{.*}} "[[OUTLIB]]" "-o" "[[OUTLIST]]"
2022
// FOFFLOAD_STATIC_LIB: llvm-link{{(.exe)?}}{{.*}} "@[[OUTLIST]]"
2123
// FOFFLOAD_STATIC_LIB: link{{(.exe)?}}{{.+}} "{{.*}}-orig.lib"
2224

25+
// RUN: mkdir -p %t_dir
26+
// RUN: llvm-ar cr %t_dir/%basename_t-orig2.lib %t-orig.obj
27+
// RUN: %clang --target=x86_64-pc-windows-msvc -fsycl -fno-sycl-device-lib=all %t_dir/%basename_t-orig2.lib %t-orig.obj -### 2>&1 \
28+
// RUN: | FileCheck %s -check-prefix=FOFFLOAD_STATIC_LIB2
29+
// RUN: %clang_cl --target=x86_64-pc-windows-msvc -fsycl -fno-sycl-device-lib=all %t_dir/%basename_t-orig2.lib %t-orig.obj -### 2>&1 \
30+
// RUN: | FileCheck %s -check-prefix=FOFFLOAD_STATIC_LIB2
31+
// RUN: %clang_cl --target=x86_64-pc-windows-msvc -fsycl -fno-sycl-device-lib=all %t-orig.obj -### /link %t_dir/%basename_t-orig2.lib 2>&1 \
32+
// RUN: | FileCheck %s -check-prefix=FOFFLOAD_STATIC_LIB2
33+
// RUN: %clang_cl --target=x86_64-pc-windows-msvc -fsycl -fno-sycl-device-lib=all %t-orig.obj -### /link -libpath:%t_dir %basename_t-orig2.lib 2>&1 \
34+
// RUN: | FileCheck %s -check-prefix=FOFFLOAD_STATIC_LIB2
35+
// RUN: env LIB=%t_dir %clang_cl --target=x86_64-pc-windows-msvc -fsycl -fno-sycl-device-lib=all %t-orig.obj -### /link %basename_t-orig2.lib 2>&1 \
36+
// RUN: | FileCheck %s -check-prefix=FOFFLOAD_STATIC_LIB2
37+
// FOFFLOAD_STATIC_LIB2: clang-offload-bundler{{(.exe)?}}{{.+}} "-type=o" "-targets=host-x86_64-pc-windows-msvc,sycl-spir64-unknown-unknown" "-inputs={{.*}}-orig.obj" "-outputs={{.+}}.{{(o|obj)}},{{.+}}.{{(o|obj)}}" "-unbundle"
38+
// FOFFLOAD_STATIC_LIB2: clang-offload-bundler{{(.exe)?}}{{.+}} "-type=aoo" "-targets=sycl-spir64-{{.+}}" "-inputs={{.*}}-orig2.lib" "-outputs=[[OUTLIB:.+\.txt]]" "-unbundle"
39+
// FOFFLOAD_STATIC_LIB2: llvm-foreach{{.*}} "--out-ext=txt" "--in-file-list=[[OUTLIB]]" "--in-replace=[[OUTLIB]]" "--out-file-list=[[OUTLIST:.+\.txt]]" "--out-replace=[[OUTLIST]]" "--" {{.*}}spirv-to-ir-wrapper{{.*}} "[[OUTLIB]]" "-o" "[[OUTLIST]]"
40+
// FOFFLOAD_STATIC_LIB2: llvm-link{{(.exe)?}}{{.*}} "@[[OUTLIST]]"
41+
// FOFFLOAD_STATIC_LIB2: link{{(.exe)?}}{{.+}} "{{.*}}-orig2.lib"
42+
2343
/// ###########################################################################
2444

2545
/// Test behaviors of -foffload-static-lib=<lib> with multiple objects.

devops/containers/ubuntu2004_base.Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ RUN /install.sh
1515
RUN groupadd -g 1001 sycl && useradd sycl -u 1001 -g 1001 -m -s /bin/bash
1616
# Add sycl user to video group so that it can access GPU
1717
RUN usermod -aG video sycl
18+
# Allow sycl user to run as sudo
19+
RUN echo "sycl ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
1820

1921
COPY actions/cached_checkout /actions/cached_checkout
2022
COPY actions/cleanup /actions/cleanup
2123
COPY scripts/docker_entrypoint.sh /docker_entrypoint.sh
24+
COPY scripts/install_drivers.sh /opt/install_drivers.sh
2225

2326
ENTRYPOINT ["/docker_entrypoint.sh"]

devops/dependencies.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"linux": {
33
"compute_runtime": {
4-
"github_tag": "22.05.22297",
5-
"version": "22.05.22297",
6-
"url": "https://github.com/intel/compute-runtime/releases/tag/22.05.22297",
4+
"github_tag": "22.09.22577",
5+
"version": "22.09.22577",
6+
"url": "https://github.com/intel/compute-runtime/releases/tag/22.09.22577",
77
"root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu"
88
},
99
"igc": {
10-
"github_tag": "igc-1.0.9933",
11-
"version": "1.0.9933",
12-
"url": "https://github.com/intel/intel-graphics-compiler/releases/tag/igc-1.0.9933",
10+
"github_tag": "igc-1.0.10409",
11+
"version": "1.0.10409",
12+
"url": "https://github.com/intel/intel-graphics-compiler/releases/tag/igc-1.0.10409",
1313
"root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu"
1414
},
1515
"cm": {
@@ -42,15 +42,15 @@
4242
},
4343
"linux_staging": {
4444
"compute_runtime": {
45-
"github_tag": "22.07.22465",
46-
"version": "22.07.22465",
47-
"url": "https://github.com/intel/compute-runtime/releases/tag/22.07.22465",
45+
"github_tag": "22.09.22577",
46+
"version": "22.09.22577",
47+
"url": "https://github.com/intel/compute-runtime/releases/tag/22.09.22577",
4848
"root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu"
4949
},
5050
"igc": {
51-
"github_tag": "igc-1.0.10200",
52-
"version": "1.0.10200",
53-
"url": "https://github.com/intel/intel-graphics-compiler/releases/tag/igc-1.0.10200",
51+
"github_tag": "igc-1.0.10409",
52+
"version": "1.0.10409",
53+
"url": "https://github.com/intel/intel-graphics-compiler/releases/tag/igc-1.0.10409",
5454
"root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu"
5555
},
5656
"cm": {

devops/scripts/install_build_tools.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ apt update && apt install -yqq \
1515
vim \
1616
libffi-dev \
1717
libva-dev \
18-
libtool
18+
libtool \
19+
sudo
1920

2021
pip3 install psutil
2122

devops/test_configs.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"config": "l0_gen9",
55
"name": "L0 GEN9 LLVM Test Suite",
66
"runs-on": [
7+
"Linux",
78
"gen9"
89
],
910
"image": "${{ inputs.intel_drivers_image }}",
@@ -15,6 +16,7 @@
1516
"config": "ocl_gen9",
1617
"name": "OCL GEN9 LLVM Test Suite",
1718
"runs-on": [
19+
"Linux",
1820
"gen9"
1921
],
2022
"image": "${{ inputs.intel_drivers_image }}",
@@ -26,6 +28,7 @@
2628
"config": "ocl_x64",
2729
"name": "OCL x64 LLVM Test Suite",
2830
"runs-on": [
31+
"Linux",
2932
"x64"
3033
],
3134
"image": "${{ inputs.intel_drivers_image }}",
@@ -37,6 +40,7 @@
3740
"config": "hip_amdgpu",
3841
"name": "HIP AMDGPU LLVM Test Suite",
3942
"runs-on": [
43+
"Linux",
4044
"amdgpu"
4145
],
4246
"image": "${{ inputs.amdgpu_image }}",

0 commit comments

Comments
 (0)