mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-01 23:30:35 +00:00
Move tvm pipeline to Github Actions (#11721)
This commit is contained in:
parent
b0e027c661
commit
a93ebd2503
5 changed files with 43 additions and 53 deletions
28
.github/workflows/linux.yml
vendored
Normal file
28
.github/workflows/linux.yml
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
name: Linux_CI
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
Onnxruntime-TVM:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: '3.8.x'
|
||||
architecture: 'x64'
|
||||
- name: 'Setup TVM EP requirements'
|
||||
run: |
|
||||
set -e -x
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libtinfo-dev zlib1g-dev build-essential libedit-dev libxml2-dev
|
||||
python3 -m pip install -r ${{ github.workspace }}/tools/ci_build/github/linux/tvm/requirements.txt
|
||||
- name: 'Build and Test'
|
||||
run: |
|
||||
python3 ${{ github.workspace }}/tools/ci_build/build.py --build_dir build --config Release --skip_submodule_sync --parallel --enable_pybind --disable_contrib_ops --disable_ml_ops --skip_onnx_tests --use_tvm --ctest_path ""
|
||||
|
|
@ -12,6 +12,7 @@ import shutil
|
|||
import subprocess
|
||||
import sys
|
||||
from distutils.version import LooseVersion
|
||||
from pathlib import Path
|
||||
|
||||
from amd_hipify import amd_hipify
|
||||
|
||||
|
|
@ -1800,7 +1801,7 @@ def run_onnxruntime_tests(args, source_dir, ctest_path, build_dir, configs):
|
|||
|
||||
python_path = None
|
||||
if args.use_tvm:
|
||||
python_path = os.path.join(build_dir, config, "_deps", "tvm-src", "python")
|
||||
python_path = str((Path(build_dir) / config / "_deps" / "tvm-src" / "python").resolve())
|
||||
|
||||
# Disable python tests in a reduced build as we don't know which ops have been included and which
|
||||
# models can run.
|
||||
|
|
|
|||
|
|
@ -1,47 +0,0 @@
|
|||
jobs:
|
||||
- job: Linux_TVM_CI
|
||||
timeoutInMinutes: 180
|
||||
workspace:
|
||||
clean: all
|
||||
pool: Linux-CPU-2019
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
submodules: recursive
|
||||
|
||||
- template: templates/get-docker-image-steps.yml
|
||||
parameters:
|
||||
Dockerfile: tools/ci_build/github/linux/docker/Dockerfile.ubuntu
|
||||
Context: tools/ci_build/github/linux/docker
|
||||
DockerBuildArgs: "--build-arg BUILD_UID=$( id -u )"
|
||||
Repository: onnxruntimecpubuild
|
||||
|
||||
- task: CmdLine@2
|
||||
inputs:
|
||||
script: |
|
||||
mkdir -p $HOME/.onnx
|
||||
docker run --rm \
|
||||
--volume /data/onnx:/data/onnx:ro \
|
||||
--volume $(Build.SourcesDirectory):/onnxruntime_src \
|
||||
--volume $(Build.BinariesDirectory):/build \
|
||||
--volume /data/models:/build/models:ro \
|
||||
--volume $HOME/.onnx:/home/onnxruntimedev/.onnx \
|
||||
-e NIGHTLY_BUILD \
|
||||
-e BUILD_BUILDNUMBER \
|
||||
onnxruntimecpubuild \
|
||||
/bin/bash -c \
|
||||
"/onnxruntime_src/tools/ci_build/github/linux/tvm/install_tvm_test_dependencies.sh \
|
||||
python3 && \
|
||||
python3 /onnxruntime_src/tools/ci_build/build.py \
|
||||
--build_dir /build \
|
||||
--config Release \
|
||||
--skip_submodule_sync \
|
||||
--parallel \
|
||||
--enable_pybind \
|
||||
--disable_contrib_ops \
|
||||
--disable_ml_ops \
|
||||
--skip_onnx_tests \
|
||||
--use_tvm"
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
||||
|
||||
- template: templates/clean-agent-build-directory-step.yml
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -e -x
|
||||
|
||||
PYTHON_EXE=$1
|
||||
${PYTHON_EXE} -m pip install decorator scipy
|
||||
13
tools/ci_build/github/linux/tvm/requirements.txt
Normal file
13
tools/ci_build/github/linux/tvm/requirements.txt
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
numpy
|
||||
decorator
|
||||
scipy
|
||||
wheel
|
||||
setuptools
|
||||
onnx==1.11.0
|
||||
protobuf==3.18.1
|
||||
flatbuffers
|
||||
tornado
|
||||
psutil
|
||||
xgboost
|
||||
cloudpickle
|
||||
pytest
|
||||
Loading…
Reference in a new issue