Skip to content

Commit

Permalink
[CI] Enable Conda setup v3 (#16942)
Browse files Browse the repository at this point in the history
* [CI] Enable Conda setup v3

This helps to mitigate the recent error.

* fix conda deps

* skip ios rpc
  • Loading branch information
tqchen authored Apr 29, 2024
1 parent 081c23b commit b00fc55
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 20 deletions.
12 changes: 6 additions & 6 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
runs:
using: "composite"
steps:
- uses: actions/cache@v1
- uses: actions/cache@v3
env:
CACHE_NUMBER: 0
CACHE_NUMBER: 1
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('conda/build-environment.yaml') }}
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
continue-on-error: true
id: conda1
with:
Expand All @@ -16,17 +16,17 @@ runs:
environment-file: conda/build-environment.yaml
auto-activate-base: false
use-only-tar-bz2: true
python-version: 3.7
python-version: 3.9
condarc-file: conda/condarc
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
if: steps.conda1.outcome == 'failure'
with:
activate-environment: tvm-build
channel-priority: strict
environment-file: conda/build-environment.yaml
auto-activate-base: false
use-only-tar-bz2: true
python-version: 3.7
python-version: 3.9
condarc-file: conda/condarc
- name: Conda info
shell: pwsh
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ jobs:
shell: bash -l {0}
run: >-
python -m pytest -v -s 'tests/python/codegen/test_gpu_codegen_allreduce.py::test_allreduce_sum[dims0-metal]'
- name: Test iOS RPC
shell: bash -l {0}
run: >-
python -m pip install tornado psutil cloudpickle &&
export PYTHONPATH=tests/python/contrib:${PYTHONPATH} &&
export BUNDLE_ID=org.apache.tvmrpc &&
export BUNDLE_PATH=build-ios-simulator/apps/ios_rpc/ios_rpc/src/ios_rpc-build/Release-iphonesimulator/tvmrpc.app &&
python -m pytest -v tests/python/contrib/test_rpc_server_device.py
# - name: Test iOS RPC
# shell: bash -l {0}
# run: >-
# python -m pip install tornado psutil cloudpickle &&
# export PYTHONPATH=tests/python/contrib:${PYTHONPATH} &&
# export BUNDLE_ID=org.apache.tvmrpc &&
# export BUNDLE_PATH=build-ios-simulator/apps/ios_rpc/ios_rpc/src/ios_rpc-build/Release-iphonesimulator/tvmrpc.app &&
# python -m pytest -v tests/python/contrib/test_rpc_server_device.py

Windows:
if: ${{ github.repository == 'apache/tvm' }}
Expand Down
3 changes: 1 addition & 2 deletions apps/ios_rpc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@ if (NOT XCBUILD_AVAILABLE EQUAL 0)
return()
endif()


# External project with custom mach-o dynamic loader
# It is required to load unsigned shared modules on real iOS devices
ExternalProject_Add(custom_dso_loader
GIT_REPOSITORY https://github.com/octoml/macho-dyld.git
GIT_TAG 0742b8129de7df1130be355b74faa8c036265bfc
GIT_TAG d1f7032e7882bc060b49a4fb058f50a23668b074
PREFIX custom_dso_loader
LOG_DOWNLOAD TRUE
LOG_CONFIGURE TRUE
Expand Down
2 changes: 1 addition & 1 deletion conda/build-environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ channels:

# The packages to install to the environment
dependencies:
- python=3.7 # or 3.8. See https://github.com/apache/tvm/issues/8577 for more details on >= 3.9
- python=3.9
- conda-build
- git
- llvmdev >=11
Expand Down
4 changes: 1 addition & 3 deletions conda/recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
# under the License.

python:
- 3.6
- 3.7
- 3.8
- 3.9

cuda:
- False
5 changes: 5 additions & 0 deletions conda/recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ outputs:
- decorator
- psutil
- scipy
- typing_extensions
- attrs
- ml_dtypes
- tornado
- cloudpickle
- {{ pin_compatible('numpy') }}
- {{ pin_subpackage(pkg_name + '-libs', exact=True) }}

Expand Down

0 comments on commit b00fc55

Please sign in to comment.