Skip to content

Commit

Permalink
Revert "Bump ONNXRuntime and flatbuffers (alisw#5452)"
Browse files Browse the repository at this point in the history
This reverts commit 31f875e.
  • Loading branch information
aalkin committed Jun 3, 2024
1 parent 9f79b94 commit e76eb71
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
8 changes: 7 additions & 1 deletion flatbuffers.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package: flatbuffers
version: v23.5.26
version: v1.12.0
source: https://github.com/google/flatbuffers
requires:
- zlib
Expand All @@ -22,6 +22,12 @@ cmake "$SOURCEDIR" \
make ${JOBS:+-j $JOBS}
make install

# Work around potentially faulty CMake (missing `install` for binaries)
mkdir -p "$INSTALLROOT/bin"
for bin in flathash flatc; do
[ -e "$INSTALLROOT/bin/$bin" ] || cp -p "$bin" "$INSTALLROOT/bin/"
done

# Modulefile
mkdir -p "$INSTALLROOT/etc/modulefiles"
alibuild-generate-module --bin --lib > "$INSTALLROOT/etc/modulefiles/$PKGNAME"
20 changes: 15 additions & 5 deletions onnxruntime.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package: ONNXRuntime
version: "%(tag_basename)s"
tag: v1.18.0
source: https://github.com/microsoft/onnxruntime
tag: v1.12.1-alice1
source: https://github.com/alisw/onnxruntime.git
requires:
- protobuf
- re2
- flatbuffers
- boost
build_requires:
- CMake
Expand All @@ -14,6 +15,16 @@ build_requires:
---
#!/bin/bash -e

pushd $SOURCEDIR
git submodule update --init -- cmake/external/date
git submodule update --init -- cmake/external/onnx
git submodule update --init -- cmake/external/eigen
git submodule update --init -- cmake/external/nsync
git submodule update --init -- cmake/external/SafeInt
git submodule update --init -- cmake/external/json
git submodule update --init -- cmake/external/pytorch_cpuinfo
popd

mkdir -p $INSTALLROOT

cmake "$SOURCEDIR/cmake" \
Expand All @@ -31,9 +42,8 @@ cmake "$SOURCEDIR/cmake"
${PROTOBUF_ROOT:+-DProtobuf_INCLUDE_DIR=$PROTOBUF_ROOT/include} \
${PROTOBUF_ROOT:+-DProtobuf_PROTOC_EXECUTABLE=$PROTOBUF_ROOT/bin/protoc} \
${RE2_ROOT:+-DRE2_INCLUDE_DIR=${RE2_ROOT}/include} \
${BOOST_ROOT:+-DBOOST_INCLUDE_DIR=${BOOST_ROOT}/include} \
-DCMAKE_CXX_FLAGS="$CXXFLAGS -Wno-unknown-warning -Wno-unknown-warning-option -Wno-error=unused-but-set-variable" \
-DCMAKE_C_FLAGS="$CFLAGS -Wno-unknown-warning -Wno-unknown-warning-option -Wno-error=unused-but-set-variable"
${FLATBUFFERS_ROOT:+-DFLATBUFFERS_INCLUDE_DIR=${FLATBUFFERS_ROOT}/include} \
${BOOST_ROOT:+-DBOOST_INCLUDE_DIR=${BOOST_ROOT}/include}

cmake --build . -- ${JOBS:+-j$JOBS} install

Expand Down

0 comments on commit e76eb71

Please sign in to comment.