Skip to content

Commit ed4694f

Browse files
committed
Merge branch 'intel:sycl' into cb_events2
Signed-off-by: Mateusz P. Nowak <[email protected]>
2 parents 3b3d9a5 + 30e1d2f commit ed4694f

File tree

106 files changed

+3426
-358
lines changed

Some content is hidden

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

106 files changed

+3426
-358
lines changed
File renamed without changes.
File renamed without changes.

devops/dependencies.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
"root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu"
2020
},
2121
"level_zero": {
22-
"github_tag": "v1.24.2",
23-
"version": "v1.24.2",
24-
"url": "https://github.com/oneapi-src/level-zero/releases/tag/v1.24.2",
22+
"github_tag": "v1.24.3",
23+
"version": "v1.24.3",
24+
"url": "https://github.com/oneapi-src/level-zero/releases/tag/v1.24.3",
2525
"root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu"
2626
},
2727
"tbb": {

devops/scripts/benchmarks/html/scripts.js

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ let chartObserver; // Intersection observer for lazy loading charts
1616
let annotationsOptions = new Map(); // Global options map for annotations
1717
let archivedDataLoaded = false;
1818
let loadedBenchmarkRuns = []; // Loaded results from the js/json files
19+
let isInitializing = true; // Flag for a proper handling of URLs
1920
// Global variables loaded from data.js/data.json:
2021
// - benchmarkRuns: array of benchmark run data
2122
// - benchmarkMetadata: metadata for benchmarks and groups
@@ -63,7 +64,9 @@ const toggleConfigs = {
6364
document.querySelectorAll('.benchmark-note').forEach(note => {
6465
note.style.display = isEnabled ? 'block' : 'none';
6566
});
66-
updateURL();
67+
if (!isInitializing) {
68+
updateURL();
69+
}
6770
}
6871
},
6972
'show-unstable': {
@@ -97,7 +100,9 @@ const toggleConfigs = {
97100
location.reload();
98101
}
99102
}
100-
updateURL();
103+
if (!isInitializing) {
104+
updateURL();
105+
}
101106
}
102107
}
103108
,
@@ -111,7 +116,9 @@ const toggleConfigs = {
111116
updateFlameGraphTooltip();
112117
// Refresh download buttons to adapt to new mode
113118
refreshDownloadButtons();
114-
updateURL();
119+
if (!isInitializing) {
120+
updateURL();
121+
}
115122
}
116123
}
117124
};
@@ -1016,7 +1023,10 @@ function updateURL() {
10161023
url.searchParams.delete('regex');
10171024
}
10181025

1019-
if (activeSuites.length > 0 && activeSuites.length != suiteNames.size) {
1026+
// Include suites parameter if not all suites are selected
1027+
// OR if the original URL had a suites parameter (preserve user's explicit selection)
1028+
const hadSuitesParam = getQueryParam('suites') !== null;
1029+
if (activeSuites.length > 0 && (activeSuites.length != suiteNames.size || hadSuitesParam)) {
10201030
url.searchParams.set('suites', activeSuites.join(','));
10211031
} else {
10221032
url.searchParams.delete('suites');
@@ -1085,7 +1095,10 @@ function filterCharts() {
10851095
container.classList.toggle('hidden', !shouldShow);
10861096
});
10871097

1088-
updateURL();
1098+
// Don't update URL during initial page load to preserve URL parameters
1099+
if (!isInitializing) {
1100+
updateURL();
1101+
}
10891102
}
10901103

10911104
function getActiveSuites() {
@@ -1746,6 +1759,12 @@ function initializeCharts() {
17461759

17471760
// Draw initial charts
17481761
updateCharts();
1762+
1763+
// Mark initialization as complete - URL parameters have been applied
1764+
isInitializing = false;
1765+
1766+
// Update the URL to ensure it reflects the final state after initialization
1767+
updateURL();
17491768
}
17501769

17511770
// Make functions available globally for onclick handlers

devops/scripts/install_drivers.sh

Lines changed: 17 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
23
set -e
34
set -x
45
set -o pipefail
@@ -51,62 +52,8 @@ function get_pre_release_igfx() {
5152
if [ "$GITHUB_TOKEN" != "" ]; then
5253
HEADER="Authorization: Bearer $GITHUB_TOKEN"
5354
fi
54-
55-
WORK_DIR="/tmp/igc-download"
56-
mkdir -p "$WORK_DIR"
57-
cd "$WORK_DIR"
58-
59-
curl -L -H "$HEADER" -H "Accept: application/vnd.github.v3+json" "$URL" -o "$HASH.zip"
60-
61-
unzip "$HASH.zip"
62-
rm "$HASH.zip"
63-
64-
# Move deb files back to the calling directory if any exist
65-
if ls *.deb 1> /dev/null 2>&1; then
66-
mv *.deb /tmp/
67-
cd /tmp/
68-
fi
69-
70-
# Clean up work directory
71-
rm -rf "$WORK_DIR"
72-
}
73-
74-
function build_level_zero_from_source() {
75-
COMMIT=$1
76-
77-
apt-get update -qq
78-
apt-get install -y build-essential cmake git libc6-dev linux-libc-dev
79-
80-
BUILD_DIR="/tmp/level-zero-build"
81-
INSTALL_DIR="/tmp/level-zero-install"
82-
rm -rf $BUILD_DIR $INSTALL_DIR
83-
mkdir -p $BUILD_DIR $INSTALL_DIR
84-
cd $BUILD_DIR
85-
86-
git clone https://github.com/oneapi-src/level-zero.git
87-
88-
cd level-zero
89-
git checkout $COMMIT
90-
91-
mkdir build
92-
cd build
93-
94-
cmake .. \
95-
-DCMAKE_BUILD_TYPE=Release \
96-
-DCMAKE_INSTALL_PREFIX=/usr/local \
97-
-DLEVEL_ZERO_BUILD_TESTS=OFF \
98-
-DLEVEL_ZERO_BUILD_SAMPLES=OFF
99-
100-
make -j$(nproc)
101-
make install DESTDIR=$INSTALL_DIR
102-
103-
cp -r $INSTALL_DIR/usr/local/* /usr/local/
104-
105-
ldconfig
106-
107-
rm -rf $BUILD_DIR $INSTALL_DIR
108-
109-
echo "Level Zero built and installed successfully from commit $COMMIT"
55+
curl -L -H "$HEADER" -H "Accept: application/vnd.github.v3+json" $URL -o $HASH.zip
56+
unzip $HASH.zip && rm $HASH.zip
11057
}
11158

11259
TBB_INSTALLED=false
@@ -149,15 +96,6 @@ CheckIGCdevTag() {
14996
fi
15097
}
15198

152-
CheckIfCommitHash() {
153-
local arg="$1"
154-
if [[ $arg =~ ^[a-f0-9]{40}$ ]]; then
155-
echo "Yes"
156-
else
157-
echo "No"
158-
fi
159-
}
160-
16199
InstallIGFX () {
162100
echo "Installing Intel Graphics driver..."
163101
echo "Compute Runtime version $CR_TAG"
@@ -184,28 +122,10 @@ InstallIGFX () {
184122
| grep ".*deb" \
185123
| grep -v "u18" \
186124
| wget -qi -
187-
188-
# Check if L0_TAG is a commit hash or a regular tag
189-
IS_L0_COMMIT=$(CheckIfCommitHash $L0_TAG)
190-
if [ "$IS_L0_COMMIT" == "Yes" ]; then
191-
echo "Level Zero is using commit hash, building from source..."
192-
if ! build_level_zero_from_source $L0_TAG; then
193-
exit 1
194-
fi
195-
# Install other packages (Level Zero was already installed from source)
196-
if ls *.deb 1> /dev/null 2>&1; then
197-
dpkg -i --force-all *.deb && rm *.deb
198-
fi
199-
if ls *.sum 1> /dev/null 2>&1; then
200-
rm *.sum
201-
fi
202-
else
203-
get_release oneapi-src/level-zero $L0_TAG \
204-
| grep ".*$UBUNTU_VER.*deb$" \
205-
| wget -qi -
206-
# Install all packages including Level Zero
207-
dpkg -i --force-all *.deb && rm *.deb *.sum
208-
fi
125+
get_release oneapi-src/level-zero $L0_TAG \
126+
| grep ".*$UBUNTU_VER.*deb$" \
127+
| wget -qi -
128+
dpkg -i --force-all *.deb && rm *.deb *.sum
209129
mkdir -p /usr/local/lib/igc/
210130
echo "$IGC_TAG" > /usr/local/lib/igc/IGCTAG.txt
211131
if [ "$IS_IGC_DEV" == "Yes" ]; then
@@ -214,50 +134,22 @@ InstallIGFX () {
214134
# Backup and install it from release igc as a temporarily workaround
215135
# while we working to resolve the issue.
216136
echo "Backup libopencl-clang"
217-
218-
# Ensure we're in a writable directory for backup operations
219-
BACKUP_DIR="/tmp/igc-backup"
220-
mkdir -p "$BACKUP_DIR"
221-
cd "$BACKUP_DIR"
222-
echo "Working in backup directory: $BACKUP_DIR"
223-
224-
if ls /usr/local/lib/libopencl-clang2.so.15* 1> /dev/null 2>&1; then
225-
cp -d /usr/local/lib/libopencl-clang2.so.15* .
226-
LIBOPENCL_BACKED_UP=true
227-
echo "Successfully backed up libopencl-clang files"
228-
else
229-
echo "Warning: libopencl-clang2.so.15* not found, skipping backup"
230-
LIBOPENCL_BACKED_UP=false
231-
fi
137+
cp -d /usr/local/lib/libopencl-clang2.so.15* .
138+
echo "Download IGC dev git hash $IGC_DEV_VER"
232139
get_pre_release_igfx $IGC_DEV_URL $IGC_DEV_VER
233140
echo "Install IGC dev git hash $IGC_DEV_VER"
234141
# New dev IGC packaged iga64 conflicting with iga64 from intel-igc-media
235142
# force overwrite to workaround it first.
236-
if ls *.deb 1> /dev/null 2>&1; then
237-
dpkg -i --force-all *.deb
238-
fi
239-
if [ "$LIBOPENCL_BACKED_UP" == "true" ]; then
240-
echo "Install libopencl-clang"
241-
# Workaround only, will download deb and install with dpkg once fixed.
242-
echo "Copying backed up libopencl-clang files from $BACKUP_DIR"
243-
cp -d "$BACKUP_DIR"/libopencl-clang2.so.15* /usr/local/lib/
244-
fi
245-
if [ -f /usr/local/lib/libigc.so.2 ]; then
246-
rm -f /usr/local/lib/libigc.so /usr/local/lib/libigc.so.1* && \
247-
ln -s /usr/local/lib/libigc.so.2 /usr/local/lib/libigc.so && \
248-
ln -s /usr/local/lib/libigc.so.2 /usr/local/lib/libigc.so.1
249-
fi
143+
dpkg -i --force-all *.deb
144+
echo "Install libopencl-clang"
145+
# Workaround only, will download deb and install with dpkg once fixed.
146+
cp -d libopencl-clang2.so.15* /usr/local/lib/
147+
rm /usr/local/lib/libigc.so /usr/local/lib/libigc.so.1* && \
148+
ln -s /usr/local/lib/libigc.so.2 /usr/local/lib/libigc.so && \
149+
ln -s /usr/local/lib/libigc.so.2 /usr/local/lib/libigc.so.1
250150
echo "Clean up"
251-
if ls *.deb 1> /dev/null 2>&1; then
252-
rm *.deb
253-
fi
151+
rm *.deb libopencl-clang2.so.15*
254152
echo "$IGC_DEV_TAG" > /usr/local/lib/igc/IGCTAG.txt
255-
256-
# Clean up backup directory (this also removes the backed up libopencl-clang files)
257-
if [ -d "$BACKUP_DIR" ]; then
258-
echo "Cleaning up backup directory: $BACKUP_DIR"
259-
rm -rf "$BACKUP_DIR"
260-
fi
261153
fi
262154
}
263155

@@ -277,7 +169,6 @@ InstallCPURT () {
277169
if [ -e $INSTALL_LOCATION/oclcpu/install.sh ]; then \
278170
bash -x $INSTALL_LOCATION/oclcpu/install.sh
279171
else
280-
mkdir -p /etc/OpenCL/vendors
281172
echo $INSTALL_LOCATION/oclcpu/x64/libintelocl.so > /etc/OpenCL/vendors/intel_oclcpu.icd
282173
fi
283174
}

libdevice/cmake/modules/SYCLLibdevice.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -898,3 +898,13 @@ foreach(ftype IN LISTS filetypes)
898898
COMPONENT libsycldevice)
899899
endforeach()
900900

901+
set(libsycldevice_build_targets)
902+
foreach(filetype IN LISTS filetypes)
903+
list(APPEND libsycldevice_build_targets libsycldevice-${filetype})
904+
endforeach()
905+
906+
add_custom_target(install-libsycldevice
907+
COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_COMPONENT=libsycldevice -P ${CMAKE_BINARY_DIR}/cmake_install.cmake
908+
DEPENDS ${libsycldevice_build_targets}
909+
)
910+
add_dependencies(deploy-sycl-toolchain install-libsycldevice)

llvm/include/llvm/SYCLPostLink/ESIMDPostSplitProcessing.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#include "llvm/ADT/SmallVector.h"
1818
#include "llvm/Support/Error.h"
1919

20+
#include <memory>
21+
2022
namespace llvm {
2123
namespace sycl {
2224

@@ -54,8 +56,8 @@ bool lowerESIMDConstructs(llvm::module_split::ModuleDesc &MD,
5456
/// \p Modified value indicates whether the Module has been modified.
5557
/// \p SplitOccurred value indicates whether split has occurred before or during
5658
/// function's invocation.
57-
Expected<SmallVector<module_split::ModuleDesc, 2>>
58-
handleESIMD(llvm::module_split::ModuleDesc MDesc,
59+
Expected<SmallVector<std::unique_ptr<module_split::ModuleDesc>, 2>>
60+
handleESIMD(std::unique_ptr<llvm::module_split::ModuleDesc> MDesc,
5961
const ESIMDProcessingOptions &Options, bool &Modified,
6062
bool &SplitOccurred);
6163

0 commit comments

Comments
 (0)