Skip to content

Commit

Permalink
Use delvewheel to package windows DLLs (#1820)
Browse files Browse the repository at this point in the history
  • Loading branch information
powderluv authored Jan 22, 2023
1 parent 1cf09a6 commit 556620e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build_tools/python_deploy/build_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Write-Host "Installing Build Dependencies"
python -m venv .\mlir_venv\
.\mlir_venv\Scripts\Activate.PS1
pip install -r .\requirements.txt
pip install delvewheel
Write-Host "Build Deps installation completed successfully"

Write-Host "Building torch-mlir"
Expand All @@ -22,3 +23,7 @@ $env:TORCH_MLIR_ENABLE_LTC='0'
python -m pip wheel -v -w wheelhouse ./ -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html -r whl-requirements.txt

Write-Host "Build completed successfully"

Write-Host "Fixing up wheel dependencies"
delvewheel repair --add-path .\build\cmake_build\tools\torch-mlir\python_packages\torch_mlir\torch_mlir\_mlir_libs --add-dll TorchMLIRAggregateCAPI.dll --no-dll 'c10.dll;torch_python.dll;torch_cpu.dll' -v (get-item .\wheelhouse\torch_mlir*.whl).FullName
Write-Host "All Done."

0 comments on commit 556620e

Please sign in to comment.