mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-15 20:50:42 +00:00
* update java API for STVM EP. Issue is from PR#10019 * use_stvm -> use_tvm * rename stvm worktree * STVMAllocator -> TVMAllocator * StvmExecutionProviderInfo -> TvmExecutionProviderInfo * stvm -> tvm for cpu_targets. resolve onnxruntime::tvm and origin tvm namespaces conflict * STVMRunner -> TVMRunner * StvmExecutionProvider -> TvmExecutionProvider * tvm::env_vars * StvmProviderFactory -> TvmProviderFactory * rename factory funcs * StvmCPUDataTransfer -> TvmCPUDataTransfer * small clean * STVMFuncState -> TVMFuncState * USE_TVM -> NUPHAR_USE_TVM * USE_STVM -> USE_TVM * python API: providers.stvm -> providers.tvm. clean TVM_EP.md * clean build scripts #1 * clean build scripts, java frontend and others #2 * once more clean #3 * fix build of nuphar tvm test * final transfer stvm namespace to onnxruntime::tvm * rename stvm->tvm * NUPHAR_USE_TVM -> USE_NUPHAR_TVM * small fixes for correct CI tests * clean after rebase. Last renaming stvm to tvm, separate TVM and Nuphar in cmake and build files * update CUDA support for TVM EP * roll back CudaNN home check * ERROR for not positive input shape dimension instead of WARNING * update documentation for CUDA * small corrections after review * update GPU description * update GPU description * misprints were fixed * cleaned up error msgs Co-authored-by: Valery Chernov <valery.chernov@deelvin.com> Co-authored-by: KJlaccHoeUM9l <wotpricol@mail.ru> Co-authored-by: Thierry Moreau <tmoreau@octoml.ai>
71 lines
3.4 KiB
Bash
Executable file
71 lines
3.4 KiB
Bash
Executable file
#!/bin/bash
|
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
# Licensed under the MIT License.
|
|
|
|
# This file is used by Linux Multi GPU TensorRT CI Pipeline,Linux Nuphar CI Pipeline,Linux OpenVINO CI Pipeline,orttraining-linux-gpu-ci-pipeline
|
|
set -e -o -x
|
|
|
|
id
|
|
|
|
SCRIPT_DIR="$( dirname "${BASH_SOURCE[0]}" )"
|
|
YOCTO_VERSION="4.19"
|
|
|
|
while getopts d:x:o:y: parameter_Option
|
|
do case "${parameter_Option}"
|
|
in
|
|
d) BUILD_DEVICE=${OPTARG};;
|
|
x) BUILD_EXTR_PAR=${OPTARG};;
|
|
o) BUILD_OS=${OPTARG};;
|
|
# YOCTO 4.19 + ACL 19.05, YOCTO 4.14 + ACL 19.02
|
|
y) YOCTO_VERSION=${OPTARG};;
|
|
esac
|
|
done
|
|
|
|
export PATH=$PATH:/usr/local/gradle/bin
|
|
|
|
if [ $BUILD_OS = "yocto" ]; then
|
|
YOCTO_FOLDER="4.19-warrior"
|
|
if [ $YOCTO_VERSION = "4.14" ]; then
|
|
YOCTO_FOLDER="4.14-sumo"
|
|
fi
|
|
pushd /onnxruntime_src
|
|
if [ ! -d build ]; then
|
|
mkdir build
|
|
fi
|
|
cd build
|
|
. /opt/fsl-imx-xwayland/$YOCTO_FOLDER/environment-setup-aarch64-poky-linux
|
|
alias cmake="/usr/bin/cmake -DCMAKE_TOOLCHAIN_FILE=$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake"
|
|
cmake ../cmake -Donnxruntime_RUN_ONNX_TESTS=OFF -Donnxruntime_GENERATE_TEST_REPORTS=ON -Donnxruntime_DEV_MODE=ON -DPYTHON_EXECUTABLE=/usr/bin/python3 -Donnxruntime_USE_CUDA=OFF -Donnxruntime_USE_NSYNC=OFF -Donnxruntime_CUDNN_HOME= -Donnxruntime_USE_JEMALLOC=OFF -Donnxruntime_ENABLE_PYTHON=OFF -Donnxruntime_BUILD_CSHARP=OFF -Donnxruntime_USE_EIGEN_FOR_BLAS=ON -Donnxruntime_USE_OPENBLAS=OFF -Donnxruntime_USE_ACL=ON -Donnxruntime_USE_MKLDNN=OFF -Donnxruntime_USE_MKLML=OFF -Donnxruntime_USE_NUPHAR_TVM=OFF -Donnxruntime_USE_LLVM=OFF -Donnxruntime_ENABLE_MICROSOFT_INTERNAL=OFF -Donnxruntime_USE_NUPHAR=OFF -Donnxruntime_USE_EIGEN_THREADPOOL=OFF -Donnxruntime_BUILD_UNIT_TESTS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES:PATH=/opt/fsl-imx-xwayland/$YOCTO_FOLDER/sysroots/aarch64-poky-linux/usr/include -DCMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES:PATH=/opt/fsl-imx-xwayland/$YOCTO_FOLDER/sysroots/aarch64-poky-linux/usr/include -DONNX_CUSTOM_PROTOC_EXECUTABLE=/usr/bin/protoc
|
|
|
|
make -j$(nproc)
|
|
else
|
|
COMMON_BUILD_ARGS="--skip_submodule_sync --enable_onnx_tests --parallel --cmake_path /usr/bin/cmake --ctest_path /usr/bin/ctest"
|
|
|
|
if [ $BUILD_DEVICE = "gpu" ]; then
|
|
_CUDNN_VERSION=$(echo $CUDNN_VERSION | cut -d. -f1-2)
|
|
python3 $SCRIPT_DIR/../../build.py --build_dir /build \
|
|
--config Release $COMMON_BUILD_ARGS \
|
|
--use_cuda \
|
|
--cuda_home /usr/local/cuda \
|
|
--cudnn_home /usr/local/cudnn-$_CUDNN_VERSION/cuda $BUILD_EXTR_PAR
|
|
elif [[ $BUILD_DEVICE = "tensorrt"* ]]; then
|
|
if [ $BUILD_DEVICE = "tensorrt-v7.1" ]; then
|
|
CUR_PWD=$(pwd)
|
|
cd $SCRIPT_DIR/../../../../cmake/external/onnx-tensorrt/
|
|
git remote update
|
|
git checkout 7.1
|
|
cd $CUR_PWD
|
|
COMMON_BUILD_ARGS=${COMMON_BUILD_ARGS/"--skip_submodule_sync"}
|
|
fi
|
|
_CUDNN_VERSION=$(echo $CUDNN_VERSION | cut -d. -f1-2)
|
|
python3 $SCRIPT_DIR/../../build.py --build_dir /build \
|
|
--config Release $COMMON_BUILD_ARGS \
|
|
--use_tensorrt --tensorrt_home /workspace/tensorrt \
|
|
--cuda_home /usr/local/cuda \
|
|
--cudnn_home /usr/local/cuda $BUILD_EXTR_PAR
|
|
else #cpu and openvino
|
|
python3 $SCRIPT_DIR/../../build.py --build_dir /build \
|
|
--config Release $COMMON_BUILD_ARGS $BUILD_EXTR_PAR
|
|
fi
|
|
fi
|
|
|