Skip to content

Commit

Permalink
[MERGE] Merge main into unity 2023-10-29
Browse files Browse the repository at this point in the history
  • Loading branch information
tqchen committed Oct 29, 2023
2 parents 6408cc4 + 7eedea5 commit 3184a80
Show file tree
Hide file tree
Showing 105 changed files with 1,576 additions and 568 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,7 @@ add_library(tvm_objs OBJECT ${COMPILER_SRCS})
add_library(tvm_runtime_objs OBJECT ${RUNTIME_SRCS})
add_library(tvm_libinfo_objs OBJECT ${LIBINFO_FILE})

include(GNUInstallDirs)
if(NOT BUILD_DUMMY_LIBTVM)
add_library(tvm SHARED $<TARGET_OBJECTS:tvm_objs> $<TARGET_OBJECTS:tvm_runtime_objs> $<TARGET_OBJECTS:tvm_libinfo_objs>)
else()
Expand Down Expand Up @@ -800,7 +801,6 @@ else(INSTALL_DEV)
)
endif(INSTALL_DEV)

include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
set(PROJECT_CONFIG_CONTENT "@PACKAGE_INIT@\n")
string(APPEND PROJECT_CONFIG_CONTENT "include(CMakeFindDependencyMacro)\n")
Expand Down
2 changes: 1 addition & 1 deletion apps/cpp_clml/scripts/clml_codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def main():
f_src = open("../clml_models.cc", "w")
f_src.write("\n".join(gen_src))
f_src.close()
os.popen("clang-format-10 -i ../clml_models.cc")
os.popen("clang-format-15 -i ../clml_models.cc")


if __name__ == "__main__":
Expand Down
30 changes: 20 additions & 10 deletions apps/microtvm/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ci/jenkins/docker-images.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# This data file is read during when Jenkins runs job to determine docker images.
[jenkins]
ci_arm: tlcpack/ci-arm:20230615-060132-62a5e7acf
ci_arm: tlcpack/ci-arm:20231013-060139-71caa19f9
ci_cortexm: tlcpack/ci-cortexm:20230710-060128-a60cd0fec
ci_cpu: tlcpack/ci-cpu:20230604-060130-0af9ff90e
ci_gpu: tlcpack/ci-gpu:20231004-111300-7a1f7d0b
Expand Down
2 changes: 1 addition & 1 deletion conda/recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

{% set version = '0.14.dev0' %}
{% set version = '0.15.dev0' %}
{% set pkg_name = 'tvm' %}
{% set cuda_tag = cuda_version | replace('.', '') %} # [cuda]
{% set pkg_name = pkg_name + '-cu' + cuda_tag %} # [cuda]
Expand Down
8 changes: 6 additions & 2 deletions docker/Dockerfile.ci_adreno
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# under the License.

# CI docker GPU env
FROM tlcpack/ci-gpu:20220908-060034-62bdc91b1
FROM tlcpack/ci-gpu

COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear

Expand All @@ -26,4 +26,8 @@ RUN bash /install/ubuntu_install_androidsdk.sh 25.2.9519653 3.22.1 33.0.2 33
ENV PATH /opt/android-sdk-linux/platform-tools:$PATH

# Clang tool for CLML source codegen
RUN apt-get update && apt-install-and-clear -y clang-format-10
RUN apt-get update && apt-install-and-clear -y clang-format-15

#Google Test
COPY install/ubuntu_install_googletest.sh /install/ubuntu_install_googletest.sh
RUN bash install/ubuntu_install_googletest.sh
22 changes: 8 additions & 14 deletions docker/install/ubuntu2204_install_llvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,6 @@ set -e
set -u
set -o pipefail

echo deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-13 main\
>> /etc/apt/sources.list.d/llvm.list
echo deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-13 main\
>> /etc/apt/sources.list.d/llvm.list

echo deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-14 main\
>> /etc/apt/sources.list.d/llvm.list
echo deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-14 main\
>> /etc/apt/sources.list.d/llvm.list

echo deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main\
>> /etc/apt/sources.list.d/llvm.list
echo deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main\
Expand All @@ -40,15 +30,19 @@ echo deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main\
echo deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main\
>> /etc/apt/sources.list.d/llvm.list

echo deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main\
>> /etc/apt/sources.list.d/llvm.list
echo deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main\
>> /etc/apt/sources.list.d/llvm.list

echo deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main\
>> /etc/apt/sources.list.d/llvm.list
echo deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy main\
>> /etc/apt/sources.list.d/llvm.list

wget -q -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
apt-get update && apt-install-and-clear -y \
llvm-13 llvm-14 llvm-15 llvm-16 \
clang-13 libclang-13-dev \
clang-14 libclang-14-dev \
llvm-15 llvm-16 llvm-17\
clang-15 libclang-15-dev \
clang-16 libclang-16-dev libpolly-16-dev
clang-16 libclang-16-dev libpolly-16-dev \
clang-17 libclang-17-dev libpolly-17-dev libzstd-dev
2 changes: 1 addition & 1 deletion docker/install/ubuntu_download_arm_compute_lib_binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if [ "$architecture_type" != "aarch64" ]; then
gcc-aarch64-linux-gnu
fi

compute_lib_version="v23.05.1"
compute_lib_version="v23.08"
compute_lib_variant="arm64-v8a-neon"
compute_lib_full_name="arm_compute-${compute_lib_version}-bin-linux-${compute_lib_variant}"
compute_lib_base_url="https://github.com/ARM-software/ComputeLibrary/releases/download/${compute_lib_version}"
Expand Down
20 changes: 7 additions & 13 deletions docker/install/ubuntu_install_cmsis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,15 @@ fi
INSTALLATION_PATH=$1
shift

# Create installation path directory
mkdir -p "${INSTALLATION_PATH}"

# Download and extract CMSIS
CMSIS_SHA="51263182d16c92649a48144ba56c0945f9fce60e"
CMSIS_SHASUM="d02573e5a8908c741d8558f01be2939aae6e940933ccb58123fa972864947759eefe5d554688db3910c8ed665a248b477b5e4458e12773385c67f8a2136b3b34"
CMSIS_URL="http://github.com/ARM-software/CMSIS_5/archive/${CMSIS_SHA}.tar.gz"
DOWNLOAD_PATH="/tmp/${CMSIS_SHA}.tar.gz"
CMSIS_TAG="5.9.0"
CMSIS_NN_TAG="v4.1.0"

wget ${CMSIS_URL} -O "${DOWNLOAD_PATH}"
echo "$CMSIS_SHASUM" ${DOWNLOAD_PATH} | sha512sum -c
tar -xf "${DOWNLOAD_PATH}" -C "${INSTALLATION_PATH}" --strip-components=1
touch "${INSTALLATION_PATH}"/"${CMSIS_SHA}".sha
CMSIS_URL="https://github.com/ARM-software/CMSIS_5.git"
git clone ${CMSIS_URL} --branch ${CMSIS_TAG} --single-branch ${INSTALLATION_PATH}

CMSIS_NN_TAG="v4.1.0"
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"
5 changes: 3 additions & 2 deletions docker/python/bootstrap-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ six==1.16.0 \
--hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254
tomlkit==0.10.2 \
--hash=sha256:905cf92c2111ef80d355708f47ac24ad1b6fc2adc5107455940088c9bbecaedb
urllib3==1.26.9 \
--hash=sha256:44ece4d53fb1706f667c9bd1c648f5469a2ec925fcf3a776667042d645472c14
urllib3==1.26.18 \
--hash=sha256:34b97092d7e0a3a8cf7cd10e386f401b3737364026c45e622aa02903dffe0f07 \
--hash=sha256:f8ecc1bba5667413457c529ab955bf8c67b45db799d159066261719e328580a0
virtualenv==20.14.1 \
--hash=sha256:e617f16e25b42eb4f6e74096b9c9e37713cf10bf30168fb4a739f3fa8f898a3a
webencodings==0.5.1 \
Expand Down
50 changes: 49 additions & 1 deletion include/tvm/runtime/c_runtime_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
#endif

// TVM version
#define TVM_VERSION "0.14.dev0"
#define TVM_VERSION "0.15.dev0"

// TVM Runtime is DLPack compatible.
#include <dlpack/dlpack.h>
Expand Down Expand Up @@ -251,6 +251,18 @@ TVM_DLL void TVMAPISetLastError(const char* msg);
*/
TVM_DLL void TVMAPISetLastPythonError(void* py_object);

/*! \brief Return the previous python error, if any.
*
* Used to propagate the original Python exception to a python
* try/except, when there are C++ stack frames between the location thro
*
* \return The previous argument passed during the most recent call to
* TVMAPISetLastPythonError. If TVMAPISetLastPythonError has not
* been called, or if TVMDropLastPythonError has been called since
* the most recent to TVMAPISetLastPythonError, returns nullptr.
*/
TVM_DLL void* TVMGetLastPythonError();

/*!
* \brief return str message of the last error
* all function in this file will return 0 when success
Expand All @@ -261,6 +273,42 @@ TVM_DLL void TVMAPISetLastPythonError(void* py_object);
* \return error info
*/
TVM_DLL const char* TVMGetLastError(void);

/*!
* \brief Return the backtrace of the most recent error
*
* Returns the backtrace of the most recent error, if an error exists,
* and the error contains a backtrace. If no error exists or the
* error does not contain a backtrace, returns nullptr.
*
* \return The backtrace of the most recent error
*/
TVM_DLL const char* TVMGetLastBacktrace();

/*!
* \brief Remove the propagated python error, if any
*
* Removes the TVM-held reference to a thrown python exception object.
* Because these objects contain references to the stack frames from
* which the exception was thrown, maintaining a reference to an
* exception object prevents any local python variables from being
* garbage-collected. After retrieving the object using
* TVMGetLastPythonError, the Python FFI interface uses this method to
* clear the TVM-held reference to the exception, to allow garbage
* collection to continue.
*/
TVM_DLL void TVMDropLastPythonError();

/*! \brief Re-throw the most recent error.
*
* If an error was previously set using TVMAPISetLastError or
* TVMAPISetLastPythonError, re-throw the error. This is similar to
* `LOG(FATAL) << TVMGetLastError()`, but includes handling to
* propagate a python exception across C++ stack frames, or to append
* a stack trace to an error message.
*/
TVM_DLL void TVMThrowLastError();

/*!
* \brief Load module from file.
* \param file_name The file name to load the module from.
Expand Down
2 changes: 1 addition & 1 deletion python/tvm/_ffi/libinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,4 +233,4 @@ def find_include_path(name=None, search_path=None, optional=False):
# We use the version of the incoming release for code
# that is under development.
# The following line is set by tvm/python/update_version.py
__version__ = "0.14.dev0"
__version__ = "0.15.dev0"
Loading

0 comments on commit 3184a80

Please sign in to comment.