This is an automated email from the ASF dual-hosted git repository. tqchen pushed a commit to branch refactor in repository https://gitbox.apache.org/repos/asf/tvm.git
commit e298f3c41bab81a80252faa938921ba1b8c5811b Author: Siyuan Feng <[email protected]> AuthorDate: Mon Feb 17 14:54:10 2025 +0800 remove frontends --- docker/Dockerfile.ci_arm | 4 -- docker/Dockerfile.ci_cpu | 12 ----- docker/Dockerfile.ci_gpu | 16 ------- docker/Dockerfile.ci_hexagon | 4 -- docker/Dockerfile.demo_cpu | 2 +- docker/install/ubuntu_install_caffe.sh | 69 --------------------------- docker/install/ubuntu_install_caffe2.sh | 39 ---------------- docker/install/ubuntu_install_cmsis.sh | 49 ------------------- docker/install/ubuntu_install_darknet.sh | 29 ------------ docker/install/ubuntu_install_mxnet.sh | 23 --------- docker/install/ubuntu_install_nnef.sh | 25 ---------- docker/install/ubuntu_install_oneflow.sh | 25 ---------- docker/install/ubuntu_install_paddle.sh | 23 --------- docker/python/ci-constraints.txt | 10 ---- python/gen_requirements.py | 39 ---------------- python/tvm/contrib/mxnet.py | 78 ------------------------------- tests/python/conftest.py | 9 ---- tests/python/contrib/test_mxnet_bridge.py | 63 ------------------------- tests/scripts/release/make_notes.py | 5 -- 19 files changed, 1 insertion(+), 523 deletions(-) diff --git a/docker/Dockerfile.ci_arm b/docker/Dockerfile.ci_arm index 16ffecb315..2be887079e 100644 --- a/docker/Dockerfile.ci_arm +++ b/docker/Dockerfile.ci_arm @@ -75,10 +75,6 @@ RUN bash /install/ubuntu_install_tflite.sh COPY install/ubuntu_install_onnx.sh /install/ubuntu_install_onnx.sh RUN bash /install/ubuntu_install_onnx.sh -# NNEF -COPY install/ubuntu_install_nnef.sh /install/ubuntu_install_nnef.sh -RUN bash /install/ubuntu_install_nnef.sh - # AutoTVM deps COPY install/ubuntu_install_redis.sh /install/ubuntu_install_redis.sh RUN bash /install/ubuntu_install_redis.sh diff --git a/docker/Dockerfile.ci_cpu b/docker/Dockerfile.ci_cpu index 18b4d7baab..7a95ebff8e 100644 --- a/docker/Dockerfile.ci_cpu +++ b/docker/Dockerfile.ci_cpu @@ -53,10 +53,6 @@ RUN bash /install/ubuntu_install_dnnl.sh COPY install/ubuntu_install_papi.sh /install/ubuntu_install_papi.sh RUN bash /install/ubuntu_install_papi.sh "" -# Install MxNet for access to Gluon Model Zoo. -COPY install/ubuntu_install_mxnet.sh /install/ubuntu_install_mxnet.sh -RUN bash /install/ubuntu_install_mxnet.sh - # Rust env (build early; takes a while) COPY install/ubuntu_install_rust.sh /install/ubuntu_install_rust.sh RUN bash /install/ubuntu_install_rust.sh @@ -97,10 +93,6 @@ RUN bash /install/ubuntu_install_jax.sh "cpu" COPY install/ubuntu_download_arm_compute_lib_binaries.sh /install/ubuntu_download_arm_compute_lib_binaries.sh RUN bash /install/ubuntu_download_arm_compute_lib_binaries.sh -# PaddlePaddle deps -COPY install/ubuntu_install_paddle.sh /install/ubuntu_install_paddle.sh -RUN bash /install/ubuntu_install_paddle.sh - # sccache COPY install/ubuntu_install_sccache.sh /install/ubuntu_install_sccache.sh RUN bash /install/ubuntu_install_sccache.sh @@ -114,10 +106,6 @@ RUN bash /install/ubuntu_install_libxsmm.sh COPY install/ubuntu_install_onnx.sh /install/ubuntu_install_onnx.sh RUN bash /install/ubuntu_install_onnx.sh -# NNEF -COPY install/ubuntu_install_nnef.sh /install/ubuntu_install_nnef.sh -RUN bash /install/ubuntu_install_nnef.sh - # AArch64 Architecture Envelope Model (AEM) COPY install/ubuntu_install_aprofile_aem.sh /install RUN bash /install/ubuntu_install_aprofile_aem.sh diff --git a/docker/Dockerfile.ci_gpu b/docker/Dockerfile.ci_gpu index cc9e488317..5fa0df9231 100644 --- a/docker/Dockerfile.ci_gpu +++ b/docker/Dockerfile.ci_gpu @@ -76,9 +76,6 @@ COPY install/ubuntu_install_rocm.sh /install/ubuntu_install_rocm.sh RUN bash /install/ubuntu_install_rocm.sh # DL Frameworks -COPY install/ubuntu_install_mxnet.sh /install/ubuntu_install_mxnet.sh -RUN bash /install/ubuntu_install_mxnet.sh - COPY install/ubuntu_install_gluoncv.sh /install/ubuntu_install_gluoncv.sh RUN bash /install/ubuntu_install_gluoncv.sh @@ -91,9 +88,6 @@ RUN bash /install/ubuntu_install_tensorflow.sh COPY install/ubuntu_install_jax.sh /install/ubuntu_install_jax.sh RUN bash /install/ubuntu_install_jax.sh "cuda" -COPY install/ubuntu_install_darknet.sh /install/ubuntu_install_darknet.sh -RUN bash /install/ubuntu_install_darknet.sh - COPY install/ubuntu_install_onnx.sh /install/ubuntu_install_onnx.sh RUN bash /install/ubuntu_install_onnx.sh @@ -103,9 +97,6 @@ RUN bash /install/ubuntu_install_libtorch.sh COPY install/ubuntu_install_tflite.sh /install/ubuntu_install_tflite.sh RUN bash /install/ubuntu_install_tflite.sh -COPY install/ubuntu_install_nnef.sh /install/ubuntu_install_nnef.sh -RUN bash /install/ubuntu_install_nnef.sh - COPY install/ubuntu_install_dgl.sh /install/ubuntu_install_dgl.sh RUN bash /install/ubuntu_install_dgl.sh @@ -113,13 +104,6 @@ ENV NVIDIA_DRIVER_CAPABILITIES compute,graphics,utility COPY install/ubuntu_install_vulkan.sh /install/ubuntu_install_vulkan.sh RUN bash /install/ubuntu_install_vulkan.sh -COPY install/ubuntu_install_paddle.sh /install/ubuntu_install_paddle.sh -RUN bash /install/ubuntu_install_paddle.sh - -# OneFlow deps -COPY install/ubuntu_install_oneflow.sh /install/ubuntu_install_oneflow.sh -RUN bash /install/ubuntu_install_oneflow.sh - # Rust env (build early; takes a while) COPY install/ubuntu_install_rust.sh /install/ubuntu_install_rust.sh RUN bash /install/ubuntu_install_rust.sh diff --git a/docker/Dockerfile.ci_hexagon b/docker/Dockerfile.ci_hexagon index 4410bfacb3..0d0c6c034f 100644 --- a/docker/Dockerfile.ci_hexagon +++ b/docker/Dockerfile.ci_hexagon @@ -80,10 +80,6 @@ RUN bash /install/ubuntu_install_tflite.sh COPY install/ubuntu_install_onnx.sh /install/ubuntu_install_onnx.sh RUN bash /install/ubuntu_install_onnx.sh -# NNEF -COPY install/ubuntu_install_nnef.sh /install/ubuntu_install_nnef.sh -RUN bash /install/ubuntu_install_nnef.sh - # xgboost (for tuning) COPY install/ubuntu_install_redis.sh /install/ubuntu_install_redis.sh RUN bash /install/ubuntu_install_redis.sh diff --git a/docker/Dockerfile.demo_cpu b/docker/Dockerfile.demo_cpu index d081f26423..778d21ea78 100644 --- a/docker/Dockerfile.demo_cpu +++ b/docker/Dockerfile.demo_cpu @@ -25,7 +25,7 @@ COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear RUN pip3 install matplotlib Image Pillow jupyter[notebook] # Deep learning frameworks -RUN pip3 install mxnet tensorflow keras gluoncv dgl +RUN pip3 install tensorflow keras gluoncv dgl # Build TVM COPY install/install_tvm_cpu.sh /install/install_tvm_cpu.sh diff --git a/docker/install/ubuntu_install_caffe.sh b/docker/install/ubuntu_install_caffe.sh deleted file mode 100755 index 1e42270e26..0000000000 --- a/docker/install/ubuntu_install_caffe.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -set -euxo pipefail - -if [ -z "${TVM_VENV+x}" ]; then - echo "ERROR: expect TVM_VENV env var to be set" - exit 2 -fi - -apt-get update --fix-missing - -# # Install dependencies -apt-install-and-clear -y --no-install-recommends protobuf-compiler \ - libprotobuf-dev libhdf5-serial-dev libopenblas-dev libgflags-dev libgoogle-glog-dev - - -# install python packages -pip install "numpy" "protobuf" "scikit-image" "six" - -# Build the Caffe and the python wrapper -echo "Downloading Caffe" -CAFFE_HOME="/opt/caffe" -git clone --branch=ssd --depth 1 https://github.com/weiliu89/caffe /caffe_src -cd /caffe_src - - -echo "Building Caffe" -mkdir /caffe_src/build && cd /caffe_src/build -cmake -DCMAKE_INSTALL_PREFIX=${CAFFE_HOME}\ - -DCMAKE_BUILD_TYPE=Release \ - -DCPU_ONLY=1 \ - -Dpython_version=3 \ - -DUSE_OPENCV=OFF \ - -DUSE_LEVELDB=OFF \ - -DUSE_LMDB=OFF \ - -DBUILD_docs=OFF \ - -DBLAS=open \ - .. - -make all -j$(expr $(nproc) - 1) -make pycaffe -j$(expr $(nproc) - 1) -make test -j$(expr $(nproc) - 1) - -echo "Installing Caffe to /opt/caffe" -make install - -echo "Removing build directory" -cd / && rm -rf /caffe_src - -PYCAFFE_ROOT=${CAFFE_HOME}/python -echo "${CAFFE_HOME}/lib" >> /etc/ld.so.conf.d/caffe.conf && ldconfig -site_packages=$("${TVM_VENV}/bin/python3" -c 'import site; print(site.getsitepackages()[0])') -ln -s ${PYCAFFE_ROOT}/caffe "${site_packages}/caffe" diff --git a/docker/install/ubuntu_install_caffe2.sh b/docker/install/ubuntu_install_caffe2.sh deleted file mode 100755 index 1a27bc44ad..0000000000 --- a/docker/install/ubuntu_install_caffe2.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -set -e -set -u -set -o pipefail - -# caffe2.python.module.download generates a progress bar. in non -# interactive use this results in huge progress debris in the log -# files. There is no option to disable the progress bar so work -# around it by stripping the progress bar output - -filter_progress_bar() -{ - # Progress bars are the 'goto start of line' escape sequence - # ESC[1000D[ repeated, the end of the progress bar is the end of - # line. We can selectively remove progress bars by dropping lines - # that beging with the escape sequence. - sed "/^\x1b\[1000D/d" -} - -python3 -m caffe2.python.models.download -i -f squeezenet | filter_progress_bar -python3 -m caffe2.python.models.download -i -f resnet50 | filter_progress_bar -python3 -m caffe2.python.models.download -i -f vgg19 | filter_progress_bar diff --git a/docker/install/ubuntu_install_cmsis.sh b/docker/install/ubuntu_install_cmsis.sh deleted file mode 100755 index 91e0a94197..0000000000 --- a/docker/install/ubuntu_install_cmsis.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -set -e -set -u -set -o pipefail - -function show_usage() { - cat <<EOF -Usage: docker/install/ubuntu_install_cmsis.sh <INSTALLATION_PATH> -INSTALLATION_PATH is the installation path for the CMSIS. -EOF -} - -if [ "$#" -lt 1 -o "$1" == "--help" -o "$1" == "-h" ]; then - show_usage - exit -1 -fi - -INSTALLATION_PATH=$1 -shift - -CMSIS_TAG="5.9.0" -CMSIS_NN_TAG="v4.1.0" - -CMSIS_URL="https://github.com/ARM-software/CMSIS_5.git" -git clone ${CMSIS_URL} --branch ${CMSIS_TAG} --single-branch ${INSTALLATION_PATH} - -CMSIS_NN_URL="https://github.com/ARM-software/CMSIS-NN.git" -git clone ${CMSIS_NN_URL} --branch ${CMSIS_NN_TAG} --single-branch ${INSTALLATION_PATH}/CMSIS-NN - -touch "${INSTALLATION_PATH}"/"CMSIS_${CMSIS_TAG}".sha -touch "${INSTALLATION_PATH}"/"CMSIS_NN_${CMSIS_NN_TAG}".sha -echo "SUCCESS" diff --git a/docker/install/ubuntu_install_darknet.sh b/docker/install/ubuntu_install_darknet.sh deleted file mode 100755 index 8020899f8b..0000000000 --- a/docker/install/ubuntu_install_darknet.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -set -e -set -u -set -o pipefail - -#install the necessary dependancies, cffi, opencv -wget -q 'https://github.com/siju-samuel/darknet/blob/master/lib/libdarknet.so?raw=true' -O libdarknet.so -debian_version=`cat /etc/debian_version` - -pip3 install \ - cffi \ - opencv-python diff --git a/docker/install/ubuntu_install_mxnet.sh b/docker/install/ubuntu_install_mxnet.sh deleted file mode 100755 index aa04d4c191..0000000000 --- a/docker/install/ubuntu_install_mxnet.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -set -e -set -u -set -o pipefail - -pip3 install mxnet==1.6.0 diff --git a/docker/install/ubuntu_install_nnef.sh b/docker/install/ubuntu_install_nnef.sh deleted file mode 100644 index 6cd4761787..0000000000 --- a/docker/install/ubuntu_install_nnef.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -set -e -set -u -set -o pipefail - -pip3 install \ - nnef_tools==1.0.6 \ - nnef==1.0.7 diff --git a/docker/install/ubuntu_install_oneflow.sh b/docker/install/ubuntu_install_oneflow.sh deleted file mode 100755 index da2943e2f9..0000000000 --- a/docker/install/ubuntu_install_oneflow.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -set -e -set -u -set -o pipefail - -pip3 install \ - oneflow==0.9.0 \ - flowvision==0.1.0 diff --git a/docker/install/ubuntu_install_paddle.sh b/docker/install/ubuntu_install_paddle.sh deleted file mode 100755 index 6cbd6289a1..0000000000 --- a/docker/install/ubuntu_install_paddle.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -set -e -set -u -set -o pipefail - -pip install paddlepaddle==2.4.2 diff --git a/docker/python/ci-constraints.txt b/docker/python/ci-constraints.txt index 5b0a4da23f..d28e815997 100644 --- a/docker/python/ci-constraints.txt +++ b/docker/python/ci-constraints.txt @@ -4,25 +4,18 @@ # migration tasks if a new version of these packages were to be released. Holding packages back # here allows us to decide when to tackle such migration work. #keras = "^2.6.0" -#mxnet = "^1.6.0" #black = "<21.8b0" # Breaks tensorflow-gpu. Revisit when tensorflow is upgraded. blocklint = "==0.2.3" -#commonmark = ">=0.7.3" cpplint = "==1.6.0" -#docutils = ">=0.11,<0.17" flake8 = "==3.9.2" flowvision = "==0.1.0" -#h5py = "==3.1.0" keras = "==2.7" jinja2 = "==3.0.3" -mxnet = "==1.6.0" mypy = "==0.902" -oneflow = "==0.7.0" onnx = "==1.10.2" onnxruntime = "==1.9.0" numpy = "==1.19.3" -paddlepaddle = "==2.4.1" pillow = "==9.1.0" pylint = "==2.4.4" scipy = "==1.7.3" @@ -35,6 +28,3 @@ tensorflow-gpu = "==2.7.2" tflite = "==2.4.0" torch = "==1.11.0" torchvision = "==0.12.0+cpu" -#xgboost = "==1.4.2" -nnef = "==1.0.7" -nnef_tools = "==1.0.6" diff --git a/python/gen_requirements.py b/python/gen_requirements.py index aafa35d08f..dc776324bf 100644 --- a/python/gen_requirements.py +++ b/python/gen_requirements.py @@ -75,41 +75,8 @@ REQUIREMENTS_BY_PIECE: RequirementsByPieceType = [ ], ), ), - # Provide support for Arm(R) Ethos(TM)-U NPU. - ( - "ethosu", - ( - "Requirements for using Arm(R) Ethos(TM)-U NPU", - [ - "ethos-u-vela", - ], - ), - ), # Relay frontends. - ( - "importer-caffe", - ( - "Requirements for the Caffe importer", - [ - "numpy", - "protobuf", - "scikit-image", - "six", - ], - ), - ), - ( - "importer-caffe2", - ( - "Requirements for the Caffe2 importer", - [ - "future", # Hidden dependency of torch. - "torch", - ], - ), - ), ("importer-coreml", ("Requirements for the CoreML importer", ["coremltools"])), - ("importer-darknet", ("Requirements for the DarkNet importer", ["opencv-python"])), ( "importer-keras", ("Requirements for the Keras importer", ["tensorflow", "tensorflow-estimator"]), @@ -128,10 +95,6 @@ REQUIREMENTS_BY_PIECE: RequirementsByPieceType = [ ], ), ), - ( - "importer-paddle", - ("Requirements for the PaddlePaddle importer", ["paddlepaddle"]), - ), ( "importer-pytorch", ( @@ -161,7 +124,6 @@ REQUIREMENTS_BY_PIECE: RequirementsByPieceType = [ "onnx", "onnxoptimizer", "onnxruntime", - "paddlepaddle", "tensorflow", "tflite", "torch", @@ -245,7 +207,6 @@ CONSTRAINTS = [ ("onnxoptimizer", None), ("onnxruntime", None), ("opencv-python", None), - ("paddlepaddle", None), ("pillow", None), ("progressbar", None), ("protobuf", None), diff --git a/python/tvm/contrib/mxnet.py b/python/tvm/contrib/mxnet.py deleted file mode 100644 index 6e551dfe46..0000000000 --- a/python/tvm/contrib/mxnet.py +++ /dev/null @@ -1,78 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -"""MXNet bridge wrap Function MXNet's async function.""" -from __future__ import absolute_import as _abs - -import tvm._ffi.registry -import tvm.runtime._ffi_api -from tvm.runtime import Module - -# pylint: disable=invalid-name -_wrap_async = None - - -def to_mxnet_func(func, const_loc=None): - """Wrap a TVM function as MXNet function - - MXNet function runs asynchrously via its engine. - - Parameters - ---------- - func : Function - A TVM function that can take positional arguments - - const_loc : list of int - List of integers indicating the argument position - of read only NDArray argument. - The NDArray argument location that are not annotated - will be viewed as mutable arrays in MXNet's engine. - - Returns - ------- - async_func : Function - A function that can take MXNet NDArray as argument - in places that used to expect TVM NDArray. - Run asynchrously in MXNet's async engine. - """ - # only import mxnet when wrap get called. - # pylint: disable=import-self, import-outside-toplevel - import mxnet - - if isinstance(func, Module): - func = func.entry_func - - def _get_bridge_func(): - """Get MXNet bridge function""" - if not mxnet.base._LIB.MXTVMBridge: - raise RuntimeError( - "MXTVMBridge not exist in mxnet package," " please update to latest version" - ) - - fdict = tvm._ffi.registry.extract_ext_funcs(mxnet.base._LIB.MXTVMBridge) - ret = fdict["WrapAsyncCall"] - ret.is_global = True - return ret - - global _wrap_async - - if _wrap_async is None: - # Register extension type in first time - _wrap_async = _get_bridge_func() - tvm._ffi.registry.register_extension(mxnet.nd.NDArray) - - const_loc = const_loc if const_loc else [] - return _wrap_async(func, tvm.runtime._ffi_api.TVMSetStream, len(const_loc), *const_loc) diff --git a/tests/python/conftest.py b/tests/python/conftest.py index 9c5cd8ac22..530a9fce3c 100644 --- a/tests/python/conftest.py +++ b/tests/python/conftest.py @@ -19,20 +19,11 @@ import sys COLLECT_IGNORE = [] if sys.platform.startswith("win"): - COLLECT_IGNORE.append("frontend/caffe") - COLLECT_IGNORE.append("frontend/caffe2") COLLECT_IGNORE.append("frontend/coreml") - COLLECT_IGNORE.append("frontend/darknet") COLLECT_IGNORE.append("frontend/keras") - COLLECT_IGNORE.append("frontend/mxnet") COLLECT_IGNORE.append("frontend/pytorch") COLLECT_IGNORE.append("frontend/tensorflow") COLLECT_IGNORE.append("frontend/tflite") COLLECT_IGNORE.append("frontend/onnx") - COLLECT_IGNORE.append("driver/tvmc/test_autoscheduler.py") - COLLECT_IGNORE.append("auto_scheduler/test_auto_scheduler_cost_model.py") # stack overflow - # COLLECT_IGNORE.append("auto_scheduler/test_auto_scheduler_measure.py") # exception ignored - COLLECT_IGNORE.append("auto_scheduler/test_auto_scheduler_search_policy.py") # stack overflow - # COLLECT_IGNORE.append("auto_scheduler/test_auto_scheduler_measure.py") # exception ignored COLLECT_IGNORE.append("tir_base/test_tir_intrin.py") diff --git a/tests/python/contrib/test_mxnet_bridge.py b/tests/python/contrib/test_mxnet_bridge.py deleted file mode 100644 index 920e3649f3..0000000000 --- a/tests/python/contrib/test_mxnet_bridge.py +++ /dev/null @@ -1,63 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -def mxnet_check(): - """This is a simple test function for MXNet bridge - - It is not included as pytests, because of its dependency on mxnet - - User can directly run this script to verify correctness. - """ - import mxnet as mx - from tvm import topi - import tvm - from tvm import te - import numpy as np - from tvm.contrib.mxnet import to_mxnet_func - - # build a TVM function through topi - n = 20 - shape = (20,) - scale = te.var("scale", dtype="float32") - x = te.placeholder(shape) - y = te.placeholder(shape) - z = topi.broadcast_add(x, y) - zz = te.compute(shape, lambda *i: z(*i) * scale) - - target = tvm.target.cuda() - - # build the function - with target: - s = topi.generic.schedule_injective(zz) - f = tvm.build(s, [x, y, zz, scale]) - - # get a mxnet version - mxf = to_mxnet_func(f, const_loc=[0, 1]) - - dev = mx.gpu(0) - xx = mx.nd.uniform(shape=shape, device=dev) - yy = mx.nd.uniform(shape=shape, device=dev) - zz = mx.nd.empty(shape=shape, device=dev) - - # invoke myf: this runs in mxnet engine - mxf(xx, yy, zz, 10.0) - mxf(xx, yy, zz, 10.0) - - tvm.testing.assert_allclose(zz.numpy(), (xx.numpy() + yy.numpy()) * 10) - - -if __name__ == "__main__": - mxnet_check() diff --git a/tests/scripts/release/make_notes.py b/tests/scripts/release/make_notes.py index 704e2eedbd..9045accace 100644 --- a/tests/scripts/release/make_notes.py +++ b/tests/scripts/release/make_notes.py @@ -38,7 +38,6 @@ TAG_DICT = { "hexagon": "Hexagon", "metal": "Metal", "vulkan": "Vulkan", - "cmsis-nn": "CMSIS-NN", "clml": "OpenCL & CLML", "opencl": "OpenCL & CLML", "openclml": "OpenCL & CLML", @@ -46,8 +45,6 @@ TAG_DICT = { "acl": "ArmComputeLibrary", "rocm": "ROCm", "crt": "CRT", - "micronpu": "micoNPU", - "microtvm": "microTVM", "web": "web", "wasm": "web", "runtime": "Runtime", @@ -59,8 +56,6 @@ TAG_DICT = { "tir": "TIR", "tensorflow": "Frontend", "tflite": "Frontend", - "paddle": "Frontend", - "oneflow": "Frontend", "pytorch": "Frontend", "torch": "Frontend", "keras": "Frontend",
