File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed
.github/actions/setup-build Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 40
40
- name : Install PyTorch nightly depends
41
41
if : ${{ runner.os != 'Linux' }}
42
42
run : |
43
- python -m pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu
43
+ python -m pip install -r build-requirements.txt
44
44
shell : bash
45
45
46
46
- name : Install prerequisites (Linux)
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ case $torch_version in
19
19
;;
20
20
stable)
21
21
echo " ::group::installing stable torch"
22
- python3 -m pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu
22
+ # python3 -m pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu
23
23
python3 -m pip install --no-cache-dir -r $repo_root /build-requirements.txt
24
24
echo " ::endgroup::"
25
25
;;
Original file line number Diff line number Diff line change @@ -23,6 +23,22 @@ repo_root="$(cd "$this_dir"/../../ && pwd)"
23
23
python_versions=" ${TORCH_MLIR_PYTHON_VERSIONS:- 3.9 3.10 3.11} "
24
24
output_dir=" ${output_dir:- ${this_dir} / wheelhouse} "
25
25
packages=" ${packages:- torch-mlir} "
26
+ cache_dir=" ${cache_dir:- } "
27
+
28
+ # Setup cache dir.
29
+ if [ -z " ${cache_dir} " ]; then
30
+ cache_dir=" ${repo_root} /.build-cache"
31
+ mkdir -p " ${cache_dir} "
32
+ cache_dir=" $( cd ${cache_dir} && pwd) "
33
+ fi
34
+ echo " Caching to ${cache_dir} "
35
+ mkdir -p " ${cache_dir} /ccache"
36
+ mkdir -p " ${cache_dir} /pip"
37
+
38
+ export CCACHE_DIR=" ${cache_dir} /ccache"
39
+ export CCACHE_MAXSIZE=" 350M"
40
+ export CMAKE_C_COMPILER_LAUNCHER=ccache
41
+ export CMAKE_CXX_COMPILER_LAUNCHER=ccache
26
42
27
43
PKG_VER_FILE=" ${repo_root} " /torch_mlir_package_version ; [ -f " $PKG_VER_FILE " ] && . " $PKG_VER_FILE "
28
44
export TORCH_MLIR_PYTHON_PACKAGE_VERSION=" ${TORCH_MLIR_PYTHON_PACKAGE_VERSION:- 0.0.1} "
You can’t perform that action at this time.
0 commit comments