Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion abseil.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package: abseil
version: "%(tag_basename)s"
tag: "20240722.0"
tag: "20250814.0"
requires:
- "GCC-Toolchain:(?!osx)"
license: Apache v2
Expand Down
46 changes: 13 additions & 33 deletions autotools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ build_requires:
#!/bin/bash -e

unset CXXFLAGS
unset CFLAGS
# Not unset: GCC 14 turns implicit declarations, implicit int and mismatched
# pointers into errors, and these sources predate that. gettext 0.20.1 calls
# free() without <stdlib.h>, for one.
export CFLAGS="-Wno-implicit-function-declaration -Wno-implicit-int -Wno-int-conversion -Wno-incompatible-pointer-types"
export EMACS=no

case $ARCHITECTURE in
Expand Down Expand Up @@ -81,22 +84,15 @@ pushd libtool*
hash -r
popd

# Do not judge me. I am simply trying to float.
# Apparently slc6 needs a different order compared
# to the rest.
case $ARCHITECTURE in
slc6*|ubuntu14*)
# automake -- requires: m4, autoconf, gettext
pushd automake*
$USE_AUTORECONF && [ -e bootstrap ] && sh ./bootstrap
./configure --prefix $INSTALLROOT
make MAKEINFO=true ${JOBS+-j $JOBS}
make MAKEINFO=true install
hash -r
popd
;;
*) ;;
esac
# automake -- requires: m4, autoconf. Must come before gettext, whose
# autoreconf needs our aclocal rather than the host's.
pushd automake*
if $USE_AUTORECONF && [ -e bootstrap ]; then sh ./bootstrap; fi
./configure --prefix $INSTALLROOT
make MAKEINFO=true ${JOBS+-j $JOBS}
make MAKEINFO=true install
hash -r
popd


# gettext -- requires: nothing special
Expand All @@ -121,22 +117,6 @@ pushd gettext*
hash -r
popd

# Do not judge me. I am simply trying to float.
case $ARCHITECTURE in
slc6*|ubuntu14*) ;;
*)
# automake -- requires: m4, autoconf, gettext
pushd automake*
$USE_AUTORECONF && [ -e bootstrap ] && sh ./bootstrap
./configure --prefix $INSTALLROOT
make MAKEINFO=true ${JOBS+-j $JOBS}
make MAKEINFO=true install
hash -r
popd
;;
esac


# pkgconfig -- requires: nothing special
pushd pkg-config*
OLD_LDFLAGS="$LDFLAGS"
Expand Down
21 changes: 21 additions & 0 deletions cudnn_frontend.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package: cudnn_frontend
version: "%(tag_basename)s"
tag: v1.24.0
license: MIT
source: https://github.com/NVIDIA/cudnn-frontend
build_requires:
- alibuild-recipe-tools
---
#!/bin/bash -e

# ONNXRuntime's CUDA provider pulls this in with FetchContent, which aliBuild
# forbids from downloading (-DFETCHCONTENT_FULLY_DISCONNECTED=ON). It is handed
# $CUDNN_FRONTEND_ROOT as FETCHCONTENT_SOURCE_DIR_CUDNN_FRONTEND and calls
# add_subdirectory() on it, so install the source tree rather than headers.
# Version from onnxruntime's cmake/deps.txt at the tag we build.
rsync -a --chmod=ug=rwX --exclude '**/.git' --delete --delete-excluded \
"$SOURCEDIR"/ "$INSTALLROOT"/

MODULEDIR="$INSTALLROOT/etc/modulefiles"
mkdir -p "$MODULEDIR"
alibuild-generate-module --cmake > "$MODULEDIR/$PKGNAME"
20 changes: 20 additions & 0 deletions cutlass.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package: cutlass
version: "%(tag_basename)s"
tag: v4.4.2
license: BSD-3-Clause
source: https://github.com/NVIDIA/cutlass
build_requires:
- alibuild-recipe-tools
---
#!/bin/bash -e

# Source tree, not an install: ONNXRuntime receives $CUTLASS_ROOT as
# FETCHCONTENT_SOURCE_DIR_CUTLASS and add_subdirectory()s it. See
# cudnn_frontend.sh, which exists for the same reason.
# Version from onnxruntime's cmake/deps.txt at the tag we build.
rsync -a --chmod=ug=rwX --exclude '**/.git' --delete --delete-excluded \
"$SOURCEDIR"/ "$INSTALLROOT"/

MODULEDIR="$INSTALLROOT/etc/modulefiles"
mkdir -p "$MODULEDIR"
alibuild-generate-module --cmake > "$MODULEDIR/$PKGNAME"
33 changes: 30 additions & 3 deletions gpu-system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,22 @@
add_feature - miopen
fi

if [[ $ALIBUILD_O2_FORCE_GPU_MIGRAPHX == 1 ]] || [[ $GPU_FEATURES =~ (^|-)"miopen"(-|_|$) && ${ALIBUILD_O2_FORCE_GPU_MIGRAPHX} != 0 && -d /opt/rocm/lib/migraphx ]]; then
# MIGraphX has to be new enough for the ONNXRuntime we build, not merely
# present: its provider references migraphx_shape_fp4x2_type, which appears
# in MIGraphX 7.1 (bf16 and fp8e5m2fnuz arrived in 6.4). On anything older
# every other file compiles and the build then dies on three enum cases, so
# gate on the API itself -- this turns MIGraphX back on by itself once the
# host is upgraded, with no disable left behind to forget about.
#
# ROCm 6.x keeps these headers in a self-contained prefix under lib/, which
# is on no default include path; onnxruntime.sh finds the prefix and passes
# it. Look in both places.
MIGRAPHX_C_API=
for _hdr in /opt/rocm/lib/migraphx/include/migraphx/migraphx.h \
/opt/rocm/include/migraphx/migraphx.h; do
if [[ -f $_hdr ]] && grep -q fp4x2 "$_hdr"; then MIGRAPHX_C_API=$_hdr; break; fi
done
if [[ $ALIBUILD_O2_FORCE_GPU_MIGRAPHX == 1 ]] || [[ $GPU_FEATURES =~ (^|-)"miopen"(-|_|$) && ${ALIBUILD_O2_FORCE_GPU_MIGRAPHX} != 0 && -n $MIGRAPHX_C_API ]]; then

Check warning on line 220 in gpu-system.sh

View workflow job for this annotation

GitHub Actions / alidistlint

line too long (166 > 120 characters) [yl:line-length]

Check warning on line 220 in gpu-system.sh

View workflow job for this annotation

GitHub Actions / alidistlint

line too long (166 > 120 characters) [yl:line-length]
add_feature - migraphx
fi

Expand All @@ -214,8 +229,20 @@
add_feature - tensorrt
fi

if [[ $ALIBUILD_O2_FORCE_GPU == "1" ]] && ! [[ $GPU_FEATURES =~ (^|-)"miopen"(-|_|$) && ${GPU_FEATURES} =~ (^|-)"migraphx"(-|_|$) && ${GPU_FEATURES} =~ (^|-)"cudnn"(-|_|$) && ${GPU_FEATURES} =~ (^|-)"tensorrt"(-|_|$) ]]; then
GPU_FEATURES="error-ALIBUILD_O2_FORCE_GPU=1 set, but not all ML libraries detected"
# MIGraphX is gated on the C API above, so it is legitimately absent when the
# host ROCm is older than the ONNXRuntime needs -- demand it only when it
# could have been enabled, otherwise FORCE_GPU=1 makes that state unreachable
# and even ALIBUILD_O2_FORCE_GPU_MIGRAPHX=0 cannot opt out.
_ml_required="miopen cudnn tensorrt"
if [[ ${ALIBUILD_O2_FORCE_GPU_MIGRAPHX} == 1 ]] || [[ ${ALIBUILD_O2_FORCE_GPU_MIGRAPHX} != 0 && -n $MIGRAPHX_C_API ]]; then

Check warning on line 237 in gpu-system.sh

View workflow job for this annotation

GitHub Actions / alidistlint

line too long (127 > 120 characters) [yl:line-length]

Check warning on line 237 in gpu-system.sh

View workflow job for this annotation

GitHub Actions / alidistlint

line too long (127 > 120 characters) [yl:line-length]
_ml_required="$_ml_required migraphx"
fi
_ml_missing=
for _ml in $_ml_required; do
[[ $GPU_FEATURES =~ (^|-)"$_ml"(-|_|$) ]] || _ml_missing="$_ml_missing $_ml"
done
if [[ $ALIBUILD_O2_FORCE_GPU == "1" && -n $_ml_missing ]]; then
GPU_FEATURES="error-ALIBUILD_O2_FORCE_GPU=1 set, but not all ML libraries detected:$_ml_missing"
break
fi

Expand Down
2 changes: 1 addition & 1 deletion grpc.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package: grpc
version: "%(tag_basename)s"
tag: v1.71.0
tag: v1.74.0
requires:
- protobuf
- c-ares
Expand Down
2 changes: 1 addition & 1 deletion mesos.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package: mesos
version: v1.11.0
tag: 1.11.0-alice5
tag: 1.11.0-alice6
source: https://github.com/AliceO2Group/mesos.git
requires:
- zlib
Expand Down
6 changes: 3 additions & 3 deletions onnx.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package: onnx
version: "v1.17.0-alice2"
tag: v1.17.0-alice2
source: https://github.com/alisw/onnx
version: "v1.22.0"
tag: v1.22.0
source: https://github.com/onnx/onnx
license: ApacheV2+BSD2C+CC0
requires:
- "GCC-Toolchain:(?!osx)"
Expand Down
43 changes: 36 additions & 7 deletions onnxruntime.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package: ONNXRuntime
version: "%(tag_basename)s"
tag: v1.22.0
tag: v1.29.0
license: MIT
source: https://github.com/microsoft/onnxruntime
requires:
Expand All @@ -13,6 +13,8 @@ requires:
- Eigen3
- onnx
- gpu-system
- "cudnn_frontend:(?!osx)"
- "cutlass:(?!osx)"
build_requires:
- date
- safe_int
Expand Down Expand Up @@ -73,13 +75,21 @@ fi

# Optional GPU features
### MIGraphX
if [[ "$ORT_ROCM_BUILD" -eq 1 ]] && [[ ${O2_GPU_MIGRAPHX_AVAILABLE:-0} == 1 ]] && [[ -z "$ORT_MIGRAPHX_BUILD" ]]; then
ORT_MIGRAPHX_BUILD="0" # Disable for now, not working
# Not gated on ORT_ROCM_BUILD: upstream removed the ROCm execution provider
# after v1.22, so MIGraphX is the only remaining AMD path and has to stand on
# its own. It needs hip and migraphx from the ROCm installation.
if [[ ${O2_GPU_MIGRAPHX_AVAILABLE:-0} == 1 ]] && [[ -z "$ORT_MIGRAPHX_BUILD" ]]; then
ORT_MIGRAPHX_BUILD="1"
elif [[ -z "$ORT_MIGRAPHX_BUILD" ]]; then
ORT_MIGRAPHX_BUILD="0"
fi
### TensorRT
if [[ "$ORT_CUDA_BUILD" -eq 1 ]] && [[ ${O2_GPU_TENSORRT_AVAILABLE:-0} == 1 ]] && [[ -z "$ORT_TENSORRT_BUILD" ]]; then
# Also gated on onnx_tensorrt being available. Its provider FetchContents that
# source, which we build with FETCHCONTENT_FULLY_DISCONNECTED=ON and nothing in
# alidist provides -- so on a TensorRT-capable host the configure step fails
# outright. Gating on the root, as with cudnn_frontend and cutlass, turns it
# back on by itself once a recipe supplies one.
if [[ "$ORT_CUDA_BUILD" -eq 1 ]] && [[ ${O2_GPU_TENSORRT_AVAILABLE:-0} == 1 ]] && [[ -n "$ONNX_TENSORRT_ROOT" ]] && [[ -z "$ORT_TENSORRT_BUILD" ]]; then
ORT_TENSORRT_BUILD="1"
elif [[ -z "$ORT_TENSORRT_BUILD" ]]; then
ORT_TENSORRT_BUILD="0"
Expand All @@ -93,6 +103,22 @@ export ORT_MIGRAPHX_BUILD=$ORT_MIGRAPHX_BUILD
export ORT_TENSORRT_BUILD=$ORT_TENSORRT_BUILD
EOF

# MIGraphX installs into a self-contained prefix under lib/ on ROCm 6.x
# (/opt/rocm/lib/migraphx/include/migraphx/version.h), which is on no default
# include path: onnxruntime's provider then fails on <migraphx/version.h> even
# though find_package(migraphx) succeeded. Find the prefix and pass it, rather
# than assuming the headers sit beside ROCm's own.
if [[ "$ORT_MIGRAPHX_BUILD" == 1 ]]; then
for _p in "${O2_GPU_ROCM_HOME:-/opt/rocm}/lib/migraphx" "${O2_GPU_ROCM_HOME:-/opt/rocm}"; do
if [[ -f "$_p/include/migraphx/version.h" ]]; then
MIGRAPHX_HOME=$_p
CXXFLAGS="$CXXFLAGS -isystem $_p/include"
break
fi
done
echo "MIGRAPHX_HOME=${MIGRAPHX_HOME:-<not found>}"
fi

echo "O2_GPU_ROCM_HOME=$O2_GPU_ROCM_HOME"
echo "O2_GPU_CUDA_HOME=$O2_GPU_CUDA_HOME"

Expand Down Expand Up @@ -149,7 +175,9 @@ cmake "cmake"
${PROTOBUF_ROOT:+-DONNX_CUSTOM_PROTOC_EXECUTABLE=$PROTOBUF_ROOT/bin/protoc} \
${RE2_ROOT:+-DRE2_INCLUDE_DIR=${RE2_ROOT}/include} \
${BOOST_ROOT:+-DBOOST_INCLUDE_DIR=${BOOST_ROOT}/include} \
${BOOST_ROOT:+-DFETCHCONTENT_SOURCE_DIR_MP11=${BOOST_ROOT}} \
-Donnxruntime_USE_MIGRAPHX=${ORT_MIGRAPHX_BUILD} \
${MIGRAPHX_HOME:+-DAMD_MIGRAPHX_HOME=${MIGRAPHX_HOME}} \
-Donnxruntime_USE_ROCM=${ORT_ROCM_BUILD} \
-Donnxruntime_ROCM_HOME=${O2_GPU_ROCM_HOME} \
-Donnxruntime_CUDA_HOME=${O2_GPU_CUDA_HOME} \
Expand All @@ -164,12 +192,13 @@ cmake "cmake"
-DMSVC=OFF \
-Donnxruntime_USE_CUDA=${ORT_CUDA_BUILD} \
-Donnxruntime_USE_CUDA_NHWC_OPS=${ORT_CUDA_BUILD} \
-DFETCHCONTENT_SOURCE_DIR_CUDNN_FRONTEND=${CUDNN_FRONTEND_ROOT} \
-DFETCHCONTENT_SOURCE_DIR_CUTLASS=${CUTLASS_ROOT} \
${CUDNN_FRONTEND_ROOT:+-DFETCHCONTENT_SOURCE_DIR_CUDNN_FRONTEND=${CUDNN_FRONTEND_ROOT}} \
${CUTLASS_ROOT:+-DFETCHCONTENT_SOURCE_DIR_CUTLASS=${CUTLASS_ROOT}} \
${ONNX_TENSORRT_ROOT:+-DFETCHCONTENT_SOURCE_DIR_ONNX_TENSORRT=${ONNX_TENSORRT_ROOT}} \
-Donnxruntime_FUZZ_ENABLED=OFF \
-Donnxruntime_USE_FLASH_ATTENTION=OFF \
-Donnxruntime_USE_LEAN_ATTENTION=OFF \
-Donnxruntime_USE_MEMORY_EFFICIENT_ATTENTION=OFF \
-Donnxruntime_USE_MEMORY_EFFICIENT_ATTENTION=ON \
-DCMAKE_CUDA_FLAGS="${CXXFLAGS} -Wno-error=deprecated-enum-float-conversion -Wno-error -Wno-error=missing-requires -w" \
-DCMAKE_HIP_FLAGS="${CXXFLAGS} -Wno-error=deprecated-enum-float-conversion -Wno-error -Wno-error=missing-requires -w" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS} -Wno-unknown-warning -Wno-unknown-warning-option -Wno-pass-failed -Wno-error=unused-but-set-variable -Wno-pass-failed=transform-warning -Wno-error=deprecated -Wno-error=maybe-uninitialized -Wno-error=deprecated-enum-enum-conversion -Wno-error -Wno-error=missing-requires -w" \
Expand Down
4 changes: 2 additions & 2 deletions protobuf.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package: protobuf
version: v29.3
tag: v29.3
version: v31.1
tag: v31.1
source: https://github.com/protocolbuffers/protobuf
license: Google BSD Like
build_requires:
Expand Down
Loading