Skip to content

Commit 4329292

Browse files
authored
oneAPI: Bump NEO to v25.27.34303.5 (#11720)
1 parent 6208353 commit 4329292

File tree

3 files changed

+112
-7
lines changed

3 files changed

+112
-7
lines changed

N/NEO/build_tarballs.jl

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,27 @@ const YGGDRASIL_DIR = "../.."
77
include(joinpath(YGGDRASIL_DIR, "fancy_toys.jl"))
88

99
name = "NEO"
10-
version = v"24.26.30049"#.6
10+
version = v"25.27.34303"#.5
1111

1212
# Collection of sources required to build this package.
1313
sources = [
1414
GitSource("https://github.com/intel/compute-runtime.git",
15-
"e16f47e375e4324dae07aadbfe953002a1c45195"),
15+
"d0fdeb0339afaa6db37411e10c41f291945aa727"),
16+
# patches
17+
DirectorySource("./bundled"),
1618
]
1719

1820
# Bash recipe for building across all platforms
1921
function get_script(; debug::Bool)
2022
raw"""
23+
# ocloc segfaults after successful build and before exiting. So we wrap
24+
# a script around ocloc that detects when the build is reported
25+
# successful and ignores the segfault.
26+
atomic_patch -p0 ./patches/ocloc.patch
27+
cp ocloc_wrapper.sh compute-runtime/shared/source/built_ins/kernels/ocloc_wrapper.sh
28+
mkdir -p tmpdir
29+
export TMPDIR=$(pwd)/tmpdir
30+
export CCACHE_TEMPDIR=$(pwd)/tmpdir
2131
cd compute-runtime
2232
install_license LICENSE.md
2333
@@ -34,8 +44,14 @@ function get_script(; debug::Bool)
3444
## NO
3545
sed -i '/-Werror/d' CMakeLists.txt
3646
47+
# Fails because C header is used in C++ code
48+
sed -i 's/inttypes\.h/cinttypes/g' level_zero/core/source/mutable_cmdlist/mutable_indirect_data.cpp
49+
3750
CMAKE_FLAGS=()
3851
52+
# Need C++20
53+
CMAKE_FLAGS+=(-DCMAKE_CXX_STANDARD=20)
54+
3955
# Release build for best performance
4056
CMAKE_FLAGS+=(-DCMAKE_BUILD_TYPE=""" * (debug ? "Debug" : "Release") * raw""")
4157
@@ -62,7 +78,12 @@ function get_script(; debug::Bool)
6278
export PKG_CONFIG_PATH=${prefix}/lib64/pkgconfig:${prefix}/lib/pkgconfig
6379
6480
cmake -B build -S . -GNinja ${CMAKE_FLAGS[@]}
65-
ninja -C build -j ${nproc} install"""
81+
ninja -C build -j ${nproc} install
82+
# Create unversioned symlinks
83+
ln -s libze_intel_gpu.so.1 ${libdir}/libze_intel_gpu.so
84+
ln -s ocloc-25.27.1 ${bindir}/ocloc
85+
86+
"""
6687
end
6788

6889
# These are the platforms we will build for by default, unless further
@@ -87,9 +108,9 @@ products = [
87108
# when using a non-public release, refer to the compiled manifest
88109
# https://github.com/intel/compute-runtime/blob/master/manifests/manifest.yml.
89110
dependencies = [
90-
Dependency("gmmlib_jll"; compat="=22.3.20"),
91-
Dependency("libigc_jll"; compat="=1.0.17193"),
92-
Dependency("oneAPI_Level_Zero_Headers_jll"; compat="=1.9.2"),
111+
Dependency("gmmlib_jll"; compat="=22.8.1"),
112+
Dependency("libigc_jll"; compat="=2.14.1"),
113+
Dependency("oneAPI_Level_Zero_Headers_jll"; compat="=1.13"),
93114
]
94115

95116
augment_platform_block = raw"""
@@ -134,7 +155,9 @@ for platform in platforms, debug in (false, true)
134155

135156
# GCC 4 has constexpr incompatibilities
136157
# GCC 7 triggers: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79929
158+
# Needs at least GCC 10 for C++20 support of 'concepts'
159+
# Needs GCC 11 for std::make_unique_for_overwrite
137160
build_tarballs(ARGS, name, version, sources, get_script(; debug), [augmented_platform],
138-
products, dependencies; preferred_gcc_version=v"8", julia_compat = "1.6",
161+
products, dependencies; preferred_gcc_version=v"11", julia_compat = "1.6",
139162
augment_platform_block)
140163
end

N/NEO/bundled/ocloc_wrapper.sh

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/bin/bash
2+
3+
# Run ocloc and capture output and exit code
4+
echo "Running ocloc with args: $@" >&2
5+
output=$("$@" 2>&1)
6+
exit_code=$?
7+
8+
# Print the output for debugging
9+
echo "$output" >&2
10+
11+
# Check if compilation was successful despite segfault
12+
if echo "$output" | grep -q "Build succeeded" || echo "$output" | grep -q "Compilation from IR"; then
13+
echo "ocloc compilation succeeded (ignoring segfault during cleanup)" >&2
14+
exit 0
15+
fi
16+
17+
# Check if output files were created (another indication of success)
18+
if [ "$exit_code" -ne 0 ]; then
19+
# Look for output files that might have been created
20+
for arg in "$@"; do
21+
case "$arg" in
22+
-out_dir)
23+
next_is_outdir=true
24+
;;
25+
-output)
26+
next_is_output=true
27+
;;
28+
*)
29+
if [ "$next_is_outdir" = true ]; then
30+
outdir="$arg"
31+
next_is_outdir=false
32+
elif [ "$next_is_output" = true ]; then
33+
output_name="$arg"
34+
next_is_output=false
35+
fi
36+
;;
37+
esac
38+
done
39+
40+
# Check if output files exist
41+
if [ -n "$outdir" ] && [ -n "$output_name" ]; then
42+
if ls "$outdir"/"$output_name"* 2>/dev/null | grep -q .; then
43+
echo "ocloc output files found, considering compilation successful" >&2
44+
exit 0
45+
fi
46+
fi
47+
fi
48+
49+
# If we get here, the compilation actually failed
50+
echo "ocloc compilation failed" >&2
51+
exit $exit_code

N/NEO/bundled/patches/ocloc.patch

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
diff --git a/shared/source/built_ins/kernels/CMakeLists.txt b/shared/source/built_ins/kernels/CMakeLists.txt
2+
index b86efe3a01..34529921f6 100644
3+
--- compute-runtime/shared/source/built_ins/kernels/CMakeLists.txt
4+
+++ compute-runtime/shared/source/built_ins/kernels/CMakeLists.txt
5+
@@ -80,7 +80,7 @@ function(compile_builtin core_type platform_it builtin bits builtin_options mode
6+
set(INTERNAL_OPTIONS "${${mode}_INTERNAL_OPTIONS}")
7+
add_custom_command(
8+
OUTPUT ${OUTPUT_FILE_SPV}
9+
- COMMAND ${ocloc_cmd_prefix} -q -file ${absolute_filepath} -spv_only -device ${platform_it_lower} -heapless_mode ${heapless_mode} ${builtin_options} -${bits} -output ${mode}_${BASENAME} -out_dir ${OUTPUTDIR} ${INTERNAL_OPTIONS} -options "$<JOIN:${__ocloc__options__}, >"
10+
+ COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ocloc_wrapper.sh ${ocloc_cmd_prefix} -q -file ${absolute_filepath} -spv_only -device ${platform_it_lower} -heapless_mode ${heapless_mode} ${builtin_options} -${bits} -output ${mode}_${BASENAME} -out_dir ${OUTPUTDIR} ${INTERNAL_OPTIONS} -options "$<JOIN:${__ocloc__options__}, >"
11+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
12+
DEPENDS ${builtin} ocloc copy_compiler_files
13+
)
14+
@@ -111,7 +111,7 @@ function(compile_builtin core_type platform_it builtin bits builtin_options mode
15+
get_filename_component(absolute_filepath_spv ${OUTPUT_FILE_SPV} ABSOLUTE)
16+
add_custom_command(
17+
OUTPUT ${OUTPUT_FILES_BINARIES}
18+
- COMMAND ${ocloc_cmd_prefix} -q -file ${absolute_filepath_spv} -spirv_input -device ${RELEASE} -heapless_mode ${heapless_mode} ${builtin_options} -${bits} -stateful_address_mode ${stateful_address_mode} -output ${mode}_${BASENAME}_${RELEASE_FILENAME} -output_no_suffix -out_dir ${OUTPUTDIR} ${INTERNAL_OPTIONS} -options "$<JOIN:${__ocloc__options__}, >"
19+
+ COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ocloc_wrapper.sh ${ocloc_cmd_prefix} -q -file ${absolute_filepath_spv} -spirv_input -device ${RELEASE} -heapless_mode ${heapless_mode} ${builtin_options} -${bits} -stateful_address_mode ${stateful_address_mode} -output ${mode}_${BASENAME}_${RELEASE_FILENAME} -output_no_suffix -out_dir ${OUTPUTDIR} ${INTERNAL_OPTIONS} -options "$<JOIN:${__ocloc__options__}, >"
20+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
21+
DEPENDS ${OUTPUT_FILE_SPV} ocloc copy_compiler_files ${OUTPUT_FILES_BINARIES_PREV}
22+
)
23+
@@ -165,7 +165,7 @@ function(generate_cpp_spirv builtin)
24+
if(NOT NEO_DISABLE_BUILTINS_COMPILATION)
25+
add_custom_command(
26+
OUTPUT ${GENERATED_SPV_INPUT}
27+
- COMMAND ${ocloc_cmd_prefix} -q -spv_only -file ${absolute_filepath} -out_dir ${OUTPUTDIR} -output_no_suffix -options "-cl-kernel-arg-info"
28+
+ COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ocloc_wrapper.sh ${ocloc_cmd_prefix} -q -spv_only -file ${absolute_filepath} -out_dir ${OUTPUTDIR} -output_no_suffix -options "-cl-kernel-arg-info"
29+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
30+
DEPENDS ${INPUT_FILENAME} ocloc copy_compiler_files ${OUTPUT_FILES_SPIRV_PREV}
31+
)

0 commit comments

Comments
 (0)