Skip to content

Commit

Permalink
install ONNX by source
Browse files Browse the repository at this point in the history
  • Loading branch information
Yi Zhang committed Mar 26, 2024
1 parent faff269 commit 9a0fc2e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 36 deletions.
7 changes: 0 additions & 7 deletions tools/ci_build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -2083,13 +2083,6 @@ def run_onnxruntime_tests(args, source_dir, ctest_path, build_dir, configs):
# For CUDA or DML enabled builds test IOBinding feature
if args.use_cuda or args.use_dml:
log.info("Testing IOBinding feature")
if args.use_dml:
run_subprocess(
[sys.executable, "-m", "pip", "uninstall", "--yes", "onnx"], cwd=cwd, dll_path=dll_path
)
run_subprocess(
[sys.executable, "-m", "pip", "install", "-q", "onnx==1.15.0"], cwd=cwd, dll_path=dll_path
)
run_subprocess([sys.executable, "onnxruntime_test_python_iobinding.py"], cwd=cwd, dll_path=dll_path)

if args.use_cuda:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,34 +106,34 @@ steps:
displayName: Install ccache and update PATH to use linked versions of gcc, cc, etc
- ${{ if eq(parameters.WITHCACHE, true) }}:
- task: Cache@2
# machinepool is used to ensure the compiler is same
inputs:
key: '"$(TODAY)" | ${{ parameters.buildArch }} | ${{ parameters.BuildConfig }} | ${{ parameters.MachinePool }} | $(Build.SourcesDirectory)/cmake/deps.txt, $(Build.SourcesDirectory)/tools/ci_build/github/windows/install_third_party_deps.ps1, $(Build.SourcesDirectory)/tools/ci_build/github/windows/helpers.ps1'
path: $(Agent.TempDirectory)/deps_ccache
restoreKeys: |
"$(TODAY)" | ${{ parameters.buildArch }} | ${{ parameters.BuildConfig }} | ${{ parameters.MachinePool }}
displayName: Cache Task

- task: PowerShell@2
displayName: 'Install ONNX'
- ${{ if eq(parameters.WITHCACHE, true) }}:
- task: Cache@2
# machinepool is used to ensure the compiler is same
inputs:
filePath: '$(Build.SourcesDirectory)/tools/ci_build/github/windows/install_third_party_deps.ps1'
workingDirectory: '$(Build.BinariesDirectory)'
${{ if eq(parameters.WITHCACHE, true) }}:
arguments: -cpu_arch ${{ parameters.buildArch }} -install_prefix $(Build.BinariesDirectory)\${{ parameters.BuildConfig }}\installed -build_config ${{ parameters.BuildConfig }} -use_cache
${{ else }}:
arguments: -cpu_arch ${{ parameters.buildArch }} -install_prefix $(Build.BinariesDirectory)\${{ parameters.BuildConfig }}\installed -build_config ${{ parameters.BuildConfig }}
key: '"$(TODAY)" | ${{ parameters.buildArch }} | ${{ parameters.BuildConfig }} | ${{ parameters.MachinePool }} | $(Build.SourcesDirectory)/cmake/deps.txt, $(Build.SourcesDirectory)/tools/ci_build/github/windows/install_third_party_deps.ps1, $(Build.SourcesDirectory)/tools/ci_build/github/windows/helpers.ps1'
path: $(Agent.TempDirectory)/deps_ccache
restoreKeys: |
"$(TODAY)" | ${{ parameters.buildArch }} | ${{ parameters.BuildConfig }} | ${{ parameters.MachinePool }}
displayName: Cache Task

- task: PowerShell@2
displayName: 'Install ONNX'
inputs:
filePath: '$(Build.SourcesDirectory)/tools/ci_build/github/windows/install_third_party_deps.ps1'
workingDirectory: '$(Build.BinariesDirectory)'
${{ if eq(parameters.WITHCACHE, true) }}:
env:
CCACHE_DIR: $(Agent.TempDirectory)/deps_ccache
CCACHE_COMPILERCHECK: content

- ${{ if eq(parameters.WITHCACHE, true) }}:
- powershell: |
ccache -sv
ccache -z
displayName: cache stat
env:
CCACHE_DIR: $(Agent.TempDirectory)/deps_ccache
arguments: -cpu_arch ${{ parameters.buildArch }} -install_prefix $(Build.BinariesDirectory)\${{ parameters.BuildConfig }}\installed -build_config ${{ parameters.BuildConfig }} -use_cache
${{ else }}:
arguments: -cpu_arch ${{ parameters.buildArch }} -install_prefix $(Build.BinariesDirectory)\${{ parameters.BuildConfig }}\installed -build_config ${{ parameters.BuildConfig }}
${{ if eq(parameters.WITHCACHE, true) }}:
env:
CCACHE_DIR: $(Agent.TempDirectory)/deps_ccache
CCACHE_COMPILERCHECK: content

- ${{ if eq(parameters.WITHCACHE, true) }}:
- powershell: |
ccache -sv
ccache -z
displayName: cache stat
env:
CCACHE_DIR: $(Agent.TempDirectory)/deps_ccache

0 comments on commit 9a0fc2e

Please sign in to comment.