Skip to content

Commit fe49581

Browse files
committed
Merge remote-tracking branch 'upstream/sycl' into device-config-consistency
2 parents 2135b30 + 9457ac2 commit fe49581

File tree

145 files changed

+3723
-2159
lines changed

Some content is hidden

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

145 files changed

+3723
-2159
lines changed

.github/workflows/coverity.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
cd $GITHUB_WORKSPACE/build
4646
python3 $GITHUB_WORKSPACE/src/buildbot/configure.py -w $GITHUB_WORKSPACE \
4747
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release \
48-
--ci-defaults --hip --cuda \
48+
--ci-defaults --use-zstd --hip --cuda \
4949
-DNATIVECPU_USE_OCK=Off \
5050
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=SPIRV
5151

.github/workflows/libcxx-check-generated-files.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1616

1717
- name: Install dependencies
18-
uses: aminya/setup-cpp@9dc9c217f497fe7342eed97e6f200bf101c9cc04 # v1.6.2
18+
uses: aminya/setup-cpp@004edc19527a83d56cda032658aab55c5e2ed48f # v1.7.0
1919
with:
2020
clangformat: 17.0.1
2121
ninja: true

.github/workflows/pr-code-format.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
echo "$CHANGED_FILES"
5656
5757
- name: Install clang-format
58-
uses: aminya/setup-cpp@9dc9c217f497fe7342eed97e6f200bf101c9cc04 # v1.6.2
58+
uses: aminya/setup-cpp@004edc19527a83d56cda032658aab55c5e2ed48f # v1.7.0
5959
with:
6060
clangformat: 19.1.6
6161

.github/workflows/release-lit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --user ${{ github.actor }} --user-token "$USER_TOKEN" check-permissions
4646
4747
- name: Setup Cpp
48-
uses: aminya/setup-cpp@9dc9c217f497fe7342eed97e6f200bf101c9cc04 # v1.6.2
48+
uses: aminya/setup-cpp@004edc19527a83d56cda032658aab55c5e2ed48f # v1.7.0
4949
with:
5050
compiler: llvm-16.0.6
5151
cmake: true

.github/workflows/sycl-containers-igc-dev.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ jobs:
3535
imagefile: ubuntu2404_intel_drivers
3636
tag: devigc
3737
build_args: |
38-
"use_unstable_driver=false"
3938
"use_igc_dev=true"
4039
steps:
4140
- name: Checkout

.github/workflows/sycl-containers.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,29 +54,23 @@ jobs:
5454
- name: Intel Drivers Ubuntu 22.04 Docker image
5555
file: ubuntu2204_intel_drivers
5656
tag: latest
57-
build_args: "use_unstable_driver=false"
57+
build_args: ""
5858
- name: Intel Drivers Ubuntu 24.04 Docker image
5959
file: ubuntu2404_intel_drivers
6060
tag: latest
61-
build_args: "use_unstable_driver=false"
62-
- name: Intel Drivers (unstable) Ubuntu 24.04 Docker image
63-
file: ubuntu2404_intel_drivers
64-
tag: unstable
65-
build_args: "use_unstable_driver=true"
61+
build_args: ""
6662
- name: Build + Intel Drivers Ubuntu 22.04 Docker image
6763
file: ubuntu2204_intel_drivers
6864
tag: alldeps
6965
build_args: |
7066
base_image=ghcr.io/intel/llvm/ubuntu2204_build
7167
base_tag=latest
72-
use_unstable_driver=false
7368
- name: Build + Intel Drivers Ubuntu 24.04 Docker image
7469
file: ubuntu2404_intel_drivers
7570
tag: alldeps
7671
build_args: |
7772
base_image=ghcr.io/intel/llvm/ubuntu2404_build
7873
base_tag=latest
79-
use_unstable_driver=false
8074
steps:
8175
- name: Checkout
8276
uses: actions/checkout@v4

.github/workflows/sycl-linux-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ jobs:
173173
cd $GITHUB_WORKSPACE/build
174174
python3 $GITHUB_WORKSPACE/src/buildbot/configure.py -w $GITHUB_WORKSPACE \
175175
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release \
176-
--ci-defaults ${{ inputs.build_configure_extra_args }} \
176+
--ci-defaults --use-zstd ${{ inputs.build_configure_extra_args }} \
177177
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
178178
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
179179
-DLLVM_INSTALL_UTILS=ON \

.github/workflows/sycl-macos-build-and-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
cd $GITHUB_WORKSPACE/build
5050
python3 $GITHUB_WORKSPACE/src/buildbot/configure.py -w $GITHUB_WORKSPACE \
5151
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release \
52-
--ci-defaults $ARGS \
52+
--ci-defaults --use-zstd $ARGS \
5353
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
5454
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
5555
-DLLVM_INSTALL_UTILS=ON

.github/workflows/sycl-nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ jobs:
287287
fail-fast: false
288288
matrix:
289289
runner: ['["PVC_PERF"]', '["BMG_PERF"]']
290-
backend: ['level_zero:gpu']
290+
backend: ['level_zero:gpu', 'level_zero_v2:gpu']
291291
include:
292292
- ref: ${{ github.sha }}
293293
save_name: 'Baseline'

.github/workflows/sycl-windows-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ jobs:
140140
IF NOT EXIST D:\github\_work\cache MKDIR D:\github\_work\cache
141141
IF NOT EXIST D:\github\_work\cache\${{inputs.build_cache_suffix}} MKDIR D:\github\_work\cache\${{inputs.build_cache_suffix}}
142142
python.exe src/buildbot/configure.py -o build ^
143-
--ci-defaults %ARGS% ^
143+
--ci-defaults --use-zstd %ARGS% ^
144144
"-DCMAKE_C_COMPILER=${{inputs.cxx}}" ^
145145
"-DCMAKE_CXX_COMPILER=${{inputs.cxx}}" ^
146146
"-DCMAKE_INSTALL_PREFIX=%GITHUB_WORKSPACE%\install" ^

clang/include/clang/Driver/Driver.h

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -775,25 +775,6 @@ class Driver {
775775
/// Get the specific kind of offload LTO being performed.
776776
LTOKind getOffloadLTOMode() const { return OffloadLTOMode; }
777777

778-
// FPGA Offload Modes.
779-
enum DeviceMode {
780-
UnsetDeviceMode,
781-
FPGAHWMode,
782-
FPGAEmulationMode
783-
} OffloadCompileMode = UnsetDeviceMode;
784-
785-
bool IsFPGAHWMode() const { return OffloadCompileMode == FPGAHWMode; }
786-
787-
bool IsFPGAEmulationMode() const {
788-
return OffloadCompileMode == FPGAEmulationMode;
789-
}
790-
791-
void setOffloadCompileMode(DeviceMode ModeValue) {
792-
OffloadCompileMode = ModeValue;
793-
}
794-
795-
DeviceMode getOffloadCompileMode() { return OffloadCompileMode; }
796-
797778
/// Get the CUID option.
798779
const CUIDOptions &getCUIDOpts() const { return CUIDOpts; }
799780

@@ -893,9 +874,6 @@ class Driver {
893874
void checkForOffloadMismatch(Compilation &C,
894875
llvm::opt::DerivedArgList &Args) const;
895876

896-
/// Track filename used for the FPGA dependency info.
897-
mutable llvm::StringMap<const std::string> FPGATempDepFiles;
898-
899877
/// A list of inputs and their corresponding integration headers. These
900878
/// files are generated during the device compilation and are consumed
901879
/// by the host compilation.
@@ -948,18 +926,6 @@ class Driver {
948926
/// getUseNewOffloadingDriver - use the new offload driver for OpenMP.
949927
bool getUseNewOffloadingDriver() const { return UseNewOffloadingDriver; };
950928

951-
/// addFPGATempDepFile - Add a file to be added to the bundling step of
952-
/// an FPGA object.
953-
void addFPGATempDepFile(const std::string &DepName,
954-
const std::string &FileName) const {
955-
FPGATempDepFiles.insert({FileName, DepName});
956-
}
957-
/// getFPGATempDepFile - Get a file to be added to the bundling step of
958-
/// an FPGA object.
959-
const std::string getFPGATempDepFile(const std::string &FileName) const {
960-
return FPGATempDepFiles[FileName];
961-
}
962-
963929
/// isSYCLDefaultTripleImplied - The default SYCL triple (spir64) has been
964930
/// added or should be added given proper criteria.
965931
bool isSYCLDefaultTripleImplied() const { return SYCLDefaultTripleImplied; };

clang/lib/Sema/SPIRVBuiltins.td

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,8 @@ class ConstOCLSPVBuiltin<string _Name, list<Type> _Signature> :
322322
// OpenCL v1.0/1.2/2.0 s6.1.1: Built-in Scalar Data Types.
323323
def Bool : IntType<"bool", QualType<"Context.BoolTy">, 1>;
324324
def TrueChar : IntType<"_char", QualType<"Context.CharTy", 0, 1>, 8>;
325-
def Char : IntType<"char", QualTypeFromFunction<"GetCharType", 0, 1>, 8>;
325+
def Char : IntType<"char", QualType<"Context.SignedCharTy", 0, 1>, 8>;
326+
def SChar : IntType<"schar", QualType<"Context.SignedCharTy", 0, 1>, 8>;
326327
def UChar : UIntType<"uchar", QualType<"Context.UnsignedCharTy">, 8>;
327328
def Short : IntType<"short", QualType<"Context.ShortTy", 0, 1>, 16>;
328329
def UShort : UIntType<"ushort", QualType<"Context.UnsignedShortTy">, 16>;
@@ -411,7 +412,7 @@ def IntLongFloatGenType1 : GenericType<"IntLongFloatGenType1", TLIntLongFloats
411412

412413
// GenType definitions for every single base type (e.g. fp32 only).
413414
// Names are like: GenTypeFloatVecAndScalar.
414-
foreach Type = [Char, UChar, Short, UShort,
415+
foreach Type = [Char, UChar, SChar, Short, UShort,
415416
Int, UInt, Long, ULong,
416417
Float, Double, Half] in {
417418
foreach VecSizes = [VecAndScalar, VecNoScalar] in {
@@ -871,16 +872,16 @@ foreach name = ["Dot"] in {
871872
}
872873

873874
foreach name = ["Any", "All"] in {
874-
def : SPVBuiltin<name, [Bool, GenTypeCharVecNoScalar], Attr.Const>;
875+
def : SPVBuiltin<name, [Bool, GenTypeSCharVecNoScalar], Attr.Const>;
875876
}
876877

877878
foreach name = ["IsNan", "IsInf", "IsFinite", "IsNormal", "SignBitSet"] in {
878879
def : SPVBuiltin<name, [Bool, Float], Attr.Const>;
879880
def : SPVBuiltin<name, [Bool, Double], Attr.Const>;
880881
def : SPVBuiltin<name, [Bool, Half], Attr.Const>;
881-
def : SPVBuiltin<name, [GenTypeCharVecNoScalar, GenTypeFloatVecNoScalar], Attr.Const>;
882-
def : SPVBuiltin<name, [GenTypeCharVecNoScalar, GenTypeDoubleVecNoScalar], Attr.Const>;
883-
def : SPVBuiltin<name, [GenTypeCharVecNoScalar, GenTypeHalfVecNoScalar], Attr.Const>;
882+
def : SPVBuiltin<name, [GenTypeSCharVecNoScalar, GenTypeFloatVecNoScalar], Attr.Const>;
883+
def : SPVBuiltin<name, [GenTypeSCharVecNoScalar, GenTypeDoubleVecNoScalar], Attr.Const>;
884+
def : SPVBuiltin<name, [GenTypeSCharVecNoScalar, GenTypeHalfVecNoScalar], Attr.Const>;
884885
}
885886

886887
foreach name = ["LessOrGreater",
@@ -894,9 +895,9 @@ foreach name = ["LessOrGreater",
894895
def : SPVBuiltin<name, [Bool, Float, Float], Attr.Const>;
895896
def : SPVBuiltin<name, [Bool, Double, Double], Attr.Const>;
896897
def : SPVBuiltin<name, [Bool, Half, Half], Attr.Const>;
897-
def : SPVBuiltin<name, [GenTypeCharVecNoScalar, GenTypeFloatVecNoScalar, GenTypeFloatVecNoScalar], Attr.Const>;
898-
def : SPVBuiltin<name, [GenTypeCharVecNoScalar, GenTypeDoubleVecNoScalar, GenTypeDoubleVecNoScalar], Attr.Const>;
899-
def : SPVBuiltin<name, [GenTypeCharVecNoScalar, GenTypeHalfVecNoScalar, GenTypeHalfVecNoScalar], Attr.Const>;
898+
def : SPVBuiltin<name, [GenTypeSCharVecNoScalar, GenTypeFloatVecNoScalar, GenTypeFloatVecNoScalar], Attr.Const>;
899+
def : SPVBuiltin<name, [GenTypeSCharVecNoScalar, GenTypeDoubleVecNoScalar, GenTypeDoubleVecNoScalar], Attr.Const>;
900+
def : SPVBuiltin<name, [GenTypeSCharVecNoScalar, GenTypeHalfVecNoScalar, GenTypeHalfVecNoScalar], Attr.Const>;
900901
}
901902

902903
foreach name = ["BitCount"] in {

clang/lib/Sema/SemaLookup.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
#include <utility>
5252
#include <vector>
5353

54-
static inline clang::QualType GetCharType(clang::ASTContext &Context);
5554
static inline clang::QualType GetFloat16Type(clang::ASTContext &Context);
5655

5756
#include "OpenCLBuiltins.inc"
@@ -702,10 +701,6 @@ LLVM_DUMP_METHOD void LookupResult::dump() {
702701
D->dump();
703702
}
704703

705-
static inline QualType GetCharType(clang::ASTContext &Context) {
706-
return Context.getLangOpts().OpenCL ? Context.CharTy : Context.SignedCharTy;
707-
}
708-
709704
static inline QualType GetFloat16Type(clang::ASTContext &Context) {
710705
return Context.getLangOpts().OpenCL ? Context.HalfTy : Context.Float16Ty;
711706
}

clang/test/CodeGenSPIRV/spirv-builtin-lookup-group.cl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ bool group_any(bool predicate) {
2727

2828
char group_broad_cast(char a) {
2929
// CHECK-LABEL: @group_broad_cast(
30-
// CHECK: call spir_func signext i8 @_Z22__spirv_GroupBroadcasticj(
30+
// CHECK: call spir_func i32 @_Z22__spirv_GroupBroadcastiij(
3131
return __spirv_GroupBroadcast(2, a, 0u);
3232
}
3333

@@ -87,7 +87,7 @@ unsigned long group_umax(unsigned long a) {
8787

8888
char group_smin(char a) {
8989
// CHECK-LABEL: @group_smin(
90-
// CHECK: call spir_func signext i8 @_Z17__spirv_GroupSMiniic(
90+
// CHECK: call spir_func i32 @_Z17__spirv_GroupSMiniii(
9191
return __spirv_GroupSMin(2, 0, a);
9292
}
9393

devops/containers/ubuntu2204_intel_drivers.Dockerfile

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ FROM $base_image:$base_tag
55

66
ENV DEBIAN_FRONTEND=noninteractive
77

8-
ARG use_unstable_driver=true
9-
108
USER root
119

1210
RUN apt update && apt install -yqq wget
@@ -18,12 +16,7 @@ COPY dependencies.json /
1816
RUN mkdir /runtimes
1917
ENV INSTALL_LOCATION=/runtimes
2018
RUN --mount=type=secret,id=github_token \
21-
if [ "$use_unstable_driver" = "true" ]; then \
22-
install_driver_opt=" --use-latest"; \
23-
else \
24-
install_driver_opt=" dependencies.json"; \
25-
fi && \
26-
GITHUB_TOKEN=$(cat /run/secrets/github_token) /install_drivers.sh $install_driver_opt --all
19+
GITHUB_TOKEN=$(cat /run/secrets/github_token) /install_drivers.sh dependencies.json --all
2720

2821
COPY scripts/drivers_entrypoint.sh /drivers_entrypoint.sh
2922

devops/containers/ubuntu2404_intel_drivers.Dockerfile

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ FROM $base_image:$base_tag
55

66
ENV DEBIAN_FRONTEND=noninteractive
77

8-
ARG use_unstable_driver=true
9-
108
USER root
119

1210
RUN apt update && apt install -yqq wget
@@ -18,12 +16,7 @@ COPY dependencies.json /
1816
RUN mkdir /runtimes
1917
ENV INSTALL_LOCATION=/runtimes
2018
RUN --mount=type=secret,id=github_token \
21-
if [ "$use_unstable_driver" = "true" ]; then \
22-
install_driver_opt=" --use-latest"; \
23-
else \
24-
install_driver_opt=" dependencies.json"; \
25-
fi && \
26-
GITHUB_TOKEN=$(cat /run/secrets/github_token) /install_drivers.sh $install_driver_opt --all
19+
GITHUB_TOKEN=$(cat /run/secrets/github_token) /install_drivers.sh dependencies.json --all
2720

2821
COPY scripts/drivers_entrypoint.sh /drivers_entrypoint.sh
2922

devops/scripts/benchmarks/benches/compute.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ def bin_args(self) -> list[str]:
466466
f"--src={self.destination}",
467467
f"--dst={self.destination}",
468468
f"--size={self.size}",
469+
"--withCopyOffload=0",
469470
]
470471

471472

@@ -501,6 +502,7 @@ def bin_args(self) -> list[str]:
501502
f"--destinationPlacement={self.destination}",
502503
f"--size={self.size}",
503504
"--count=100",
505+
"--withCopyOffload=0",
504506
]
505507

506508

devops/scripts/benchmarks/options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class Options:
6565
build_compute_runtime: bool = False
6666
extra_ld_libraries: list[str] = field(default_factory=list)
6767
extra_env_vars: dict = field(default_factory=dict)
68-
compute_runtime_tag: str = "25.13.33276.18"
68+
compute_runtime_tag: str = "25.22.33944.4"
6969
build_igc: bool = False
7070
current_run_name: str = "This PR"
7171
preset: str = "Full"

devops/scripts/benchmarks/utils/oneapi.py

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from options import options
99
import os
1010
import hashlib
11+
import glob
1112

1213

1314
class OneAPI:
@@ -18,6 +19,7 @@ def __init__(self):
1819

1920
self.install_package(
2021
"base",
22+
"2025.1.0+627",
2123
"https://registrationcenter-download.intel.com/akdlm/IRC_NAS/cca951e1-31e7-485e-b300-fe7627cb8c08/intel-oneapi-base-toolkit-2025.1.0.651_offline.sh",
2224
"98cad2489f2c90a2b328568a59371cf35855a3338643f61a9fc2d16a265d29f22feb2d673916dd7be18fa12a5e6d2475",
2325
)
@@ -27,26 +29,41 @@ def generate_unique_oneapi_id(self, path):
2729
hash_object = hashlib.md5(path.encode())
2830
return hash_object.hexdigest()
2931

30-
def install_package(self, name, url, checksum):
31-
package_path = os.path.join(self.oneapi_dir, name)
32+
def check_install(self, version):
33+
logs_dir = os.path.join(self.oneapi_dir, "logs")
34+
pattern = f"{logs_dir}/installer.install.intel.oneapi.lin.basekit.product,v={version}*.log"
35+
log_files = glob.glob(pattern)
36+
success_line = f"Operation 'intel.oneapi.lin.basekit.product,v={version}' execution is finished with status Success."
37+
for log_file in log_files:
38+
try:
39+
with open(log_file, "r") as f:
40+
for line in f:
41+
if success_line in line:
42+
return True
43+
except Exception:
44+
continue
45+
return False
46+
47+
def install_package(self, name, version, url, checksum):
48+
if self.check_install(version):
49+
print(f"{name} version {version} already installed, skipping.")
50+
return
51+
package_name = f"package_{name}_{version}.sh"
52+
package_path = os.path.join(self.oneapi_dir, f"{package_name}")
3253
if Path(package_path).exists():
33-
print(
34-
f"{package_path} exists, skipping installing oneAPI package {name}..."
54+
print(f"{package_path} exists, skipping download of oneAPI package...")
55+
else:
56+
package = download(
57+
self.oneapi_dir, url, f"{package_name}", checksum=checksum
3558
)
36-
return
37-
38-
package = download(
39-
self.oneapi_dir, url, f"package_{name}.sh", checksum=checksum
40-
)
4159
try:
42-
print(f"installing {name}")
4360
run(
44-
f"sh {package} -a -s --eula accept --install-dir {self.oneapi_dir} --instance {self.oneapi_instance_id}"
61+
f"sh {package_path} -a -s --eula accept --install-dir {self.oneapi_dir} --instance {self.oneapi_instance_id}"
4562
)
4663
except:
47-
print("oneAPI installation likely exists already")
64+
print(f"OneAPI {name} version {version} installation likely exists already")
4865
return
49-
print(f"{name} installation complete")
66+
print(f"OneAPI {name} version {version} installation complete")
5067

5168
def package_dir(self, package, dir):
5269
return os.path.join(self.oneapi_dir, package, "latest", dir)

0 commit comments

Comments
 (0)