Skip to content

Commit

Permalink
Merge branch 'main' into with_fields_functions
Browse files Browse the repository at this point in the history
  • Loading branch information
electriclilies committed Jan 21, 2022
2 parents ee9abe1 + 2a91f0d commit 3ec58ff
Show file tree
Hide file tree
Showing 231 changed files with 11,419 additions and 1,492 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/cc_bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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.

# GH actions.
# We use it to cover windows and mac builds
# Jenkins is still the primary CI

name: PR

on:
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target
pull_request_target:
types: [assigned, opened, synchronize, reopened, edited, ready_for_review]

concurrency:
group: PR-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
cc-reviewers:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: "recursive"
- name: Add cc'ed reviewers
env:
PR: ${{ toJson(github.event.pull_request) }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -eux
python tests/scripts/github_cc_reviewers.py || echo step failed
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ import org.jenkinsci.plugins.pipeline.modeldefinition.Utils

// NOTE: these lines are scanned by docker/dev_common.sh. Please update the regex as needed. -->
ci_lint = "tlcpack/ci-lint:v0.67"
ci_gpu = "tlcpack/ci-gpu:v0.79"
ci_gpu = "tlcpack/ci-gpu:v0.80"
ci_cpu = "tlcpack/ci-cpu:v0.80"
ci_wasm = "tlcpack/ci-wasm:v0.71"
ci_i386 = "tlcpack/ci-i386:v0.74"
ci_qemu = "tlcpack/ci-qemu:v0.08"
ci_qemu = "tlcpack/ci-qemu:v0.09"
ci_arm = "tlcpack/ci-arm:v0.06"
// <--- End of regex-scanned config.

Expand Down
3 changes: 0 additions & 3 deletions cmake/modules/Hexagon.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,6 @@ if(USE_HEXAGON_RPC)
${HEXAGON_RPC_OUTPUT} COPYONLY)

set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${HEXAGON_RPC_OUTPUT}")

# Used in `src/target/llvm/llvm_common.h`
add_definitions(-DTVM_USE_HEXAGON_LLVM)
endif()

if(USE_HEXAGON_DEVICE STREQUAL "${PICK_SIM}")
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/HexagonSDK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function(find_hexagon_sdk_root HEXAGON_SDK_PATH HEXAGON_ARCH)

# Initial verification of the Hexagon SDK.
message(STATUS "Checking Hexagon SDK root: ${HEXAGON_SDK_PATH}")
tvm_file_glob(GLOB_RECURSE VERSION_HEADERS "${HEXAGON_SDK_PATH}/*/version.h")
file(GLOB_RECURSE VERSION_HEADERS "${HEXAGON_SDK_PATH}/*/version.h")
if(VERSION_HEADERS)
foreach(HEADER IN LISTS VERSION_HEADERS)
if(HEADER MATCHES "incs/version.h$")
Expand Down
13 changes: 12 additions & 1 deletion docker/Dockerfile.ci_arm
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,25 @@ RUN apt-get install -y ca-certificates gnupg2
COPY install/ubuntu_install_core.sh /install/ubuntu_install_core.sh
RUN bash /install/ubuntu_install_core.sh

# Rust env
COPY install/ubuntu_install_rust.sh /install/ubuntu_install_rust.sh
RUN bash /install/ubuntu_install_rust.sh
ENV RUSTUP_HOME /opt/rust
ENV CARGO_HOME /opt/rust
ENV PATH $PATH:$CARGO_HOME/bin

# sccache
COPY install/ubuntu_install_sccache.sh /install/ubuntu_install_sccache.sh
RUN bash /install/ubuntu_install_sccache.sh

COPY install/ubuntu_install_llvm.sh /install/ubuntu_install_llvm.sh
RUN bash /install/ubuntu_install_llvm.sh

COPY install/ubuntu1804_install_python.sh /install/ubuntu1804_install_python.sh
RUN bash /install/ubuntu1804_install_python.sh

# Globally disable pip cache
RUN pip config set global.cache-dir false
RUN pip config set global.no-cache-dir false

COPY install/ubuntu_install_cmake_source.sh /install/ubuntu_install_cmake_source.sh
RUN bash /install/ubuntu_install_cmake_source.sh
Expand Down
10 changes: 9 additions & 1 deletion docker/Dockerfile.ci_cpu
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ COPY install/ubuntu1804_install_python.sh /install/ubuntu1804_install_python.sh
RUN bash /install/ubuntu1804_install_python.sh

# Globally disable pip cache
RUN pip config set global.cache-dir false
RUN pip config set global.no-cache-dir false

COPY install/ubuntu_install_python_package.sh /install/ubuntu_install_python_package.sh
RUN bash /install/ubuntu_install_python_package.sh
Expand All @@ -53,6 +53,10 @@ ENV RUSTUP_HOME /opt/rust
ENV CARGO_HOME /opt/rust
ENV PATH $PATH:$CARGO_HOME/bin

# wasmtime
COPY install/ubuntu_install_wasmtime.sh /install/ubuntu_install_wasmtime.sh
RUN bash /install/ubuntu_install_wasmtime.sh

# AutoTVM deps
COPY install/ubuntu_install_redis.sh /install/ubuntu_install_redis.sh
RUN bash /install/ubuntu_install_redis.sh
Expand Down Expand Up @@ -126,3 +130,7 @@ ENV PATH /opt/arm/gcc-arm-none-eabi/bin:/opt/arm/FVP_Corstone_SSE-300/models/Lin
# 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
10 changes: 9 additions & 1 deletion docker/Dockerfile.ci_gpu
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ COPY install/ubuntu1804_install_python.sh /install/ubuntu1804_install_python.sh
RUN bash /install/ubuntu1804_install_python.sh

# Globally disable pip cache
RUN pip config set global.cache-dir false
RUN pip config set global.no-cache-dir false

COPY install/ubuntu1804_install_llvm.sh /install/ubuntu1804_install_llvm.sh
RUN bash /install/ubuntu1804_install_llvm.sh
Expand Down Expand Up @@ -101,6 +101,10 @@ ENV RUSTUP_HOME /opt/rust
ENV CARGO_HOME /opt/rust
ENV PATH $PATH:$CARGO_HOME/bin

# wasmtime
COPY install/ubuntu_install_wasmtime.sh /install/ubuntu_install_wasmtime.sh
RUN bash /install/ubuntu_install_wasmtime.sh

# AutoTVM deps
COPY install/ubuntu_install_redis.sh /install/ubuntu_install_redis.sh
RUN bash /install/ubuntu_install_redis.sh
Expand All @@ -117,6 +121,10 @@ RUN bash /install/ubuntu_install_universal.sh
COPY install/ubuntu_install_papi.sh /install/ubuntu_install_papi.sh
RUN bash /install/ubuntu_install_papi.sh "cuda rocm"

# sccache
COPY install/ubuntu_install_sccache.sh /install/ubuntu_install_sccache.sh
RUN bash /install/ubuntu_install_sccache.sh

# Environment variables
ENV PATH=/usr/local/nvidia/bin:${PATH}
ENV PATH=/usr/local/cuda/bin:${PATH}
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.ci_i386
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ COPY install/ubuntu_install_python.sh /install/ubuntu_install_python.sh
RUN bash /install/ubuntu_install_python.sh

# Globally disable pip cache
RUN pip config set global.cache-dir false
RUN pip config set global.no-cache-dir false

COPY install/ubuntu_install_cmake_source.sh /install/ubuntu_install_cmake_source.sh
RUN bash /install/ubuntu_install_cmake_source.sh
Expand Down
6 changes: 5 additions & 1 deletion docker/Dockerfile.ci_lint
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ COPY install/ubuntu1804_install_python.sh /install/ubuntu1804_install_python.sh
RUN bash /install/ubuntu1804_install_python.sh

# Globally disable pip cache
RUN pip config set global.cache-dir false
RUN pip config set global.no-cache-dir false

RUN apt-get update && apt-get install -y doxygen graphviz curl

Expand All @@ -41,6 +41,10 @@ ENV RUSTUP_HOME /opt/rust
ENV CARGO_HOME /opt/rust
ENV PATH $PATH:$CARGO_HOME/bin

# wasmtime
COPY install/ubuntu_install_wasmtime.sh /install/ubuntu_install_wasmtime.sh
RUN bash /install/ubuntu_install_wasmtime.sh

# java deps for rat
COPY install/ubuntu_install_java.sh /install/ubuntu_install_java.sh
RUN bash /install/ubuntu_install_java.sh
Expand Down
7 changes: 6 additions & 1 deletion docker/Dockerfile.ci_qemu
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ RUN bash /install/ubuntu1804_install_python_venv.sh
ENV PATH=/opt/tvm-venv/bin:/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin:$PATH

# Globally disable pip cache
RUN pip config set global.cache-dir false
RUN pip config set global.no-cache-dir false

COPY install/ubuntu_install_python_package.sh /install/ubuntu_install_python_package.sh
RUN bash /install/ubuntu_install_python_package.sh
Expand All @@ -42,6 +42,7 @@ COPY install/ubuntu_install_rust.sh /install/ubuntu_install_rust.sh
RUN bash /install/ubuntu_install_rust.sh
ENV RUSTUP_HOME /opt/rust
ENV CARGO_HOME /opt/rust
ENV PATH $PATH:$CARGO_HOME/bin

# AutoTVM deps
COPY install/ubuntu_install_redis.sh /install/ubuntu_install_redis.sh
Expand All @@ -59,6 +60,10 @@ RUN bash /install/ubuntu_install_tensorflow.sh
COPY install/ubuntu_install_tflite.sh /install/ubuntu_install_tflite.sh
RUN bash /install/ubuntu_install_tflite.sh

# sccache
COPY install/ubuntu_install_sccache.sh /install/ubuntu_install_sccache.sh
RUN bash /install/ubuntu_install_sccache.sh

# Zephyr SDK deps
COPY install/ubuntu_install_zephyr.sh /install/ubuntu_install_zephyr.sh
COPY install/ubuntu_init_zephyr_project.sh /install/ubuntu_init_zephyr_project.sh
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.ci_wasm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ COPY install/ubuntu1804_install_python.sh /install/ubuntu1804_install_python.sh
RUN bash /install/ubuntu1804_install_python.sh

# Globally disable pip cache
RUN pip config set global.cache-dir false
RUN pip config set global.no-cache-dir false

COPY install/ubuntu_install_python_package.sh /install/ubuntu_install_python_package.sh
RUN bash /install/ubuntu_install_python_package.sh
Expand Down
2 changes: 2 additions & 0 deletions docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ if [[ -n ${COMMAND} ]]; then
echo ${DOCKER_BINARY}
${DOCKER_BINARY} run --rm --pid=host \
-v ${WORKSPACE}:/workspace \
${SSH_AUTH_SOCK:+-v $SSH_AUTH_SOCK:/ssh-agent} \
-w /workspace \
${SSH_AUTH_SOCK:+-e "SSH_AUTH_SOCK=/ssh-agent"} \
-e "CI_BUILD_HOME=/workspace" \
-e "CI_BUILD_USER=$(id -u -n)" \
-e "CI_BUILD_UID=$(id -u)" \
Expand Down
12 changes: 1 addition & 11 deletions docker/install/ubuntu_install_rust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@
# specific language governing permissions and limitations
# under the License.

set -e
set -u
set -o pipefail

set -euxo pipefail

export RUSTUP_HOME=/opt/rust
export CARGO_HOME=/opt/rust
Expand All @@ -29,12 +26,5 @@ export PATH=$CARGO_HOME/bin:$PATH
rustup component add rustfmt
rustup component add clippy

# install wasmtime
apt-get install -y --no-install-recommends libc6-dev-i386
export WASMTIME_HOME=/opt/wasmtime
curl https://wasmtime.dev/install.sh -sSf | bash
export PATH="${WASMTIME_HOME}/bin:${PATH}"
rustup target add wasm32-wasi

# make rust usable by all users
chmod -R a+w /opt/rust
28 changes: 28 additions & 0 deletions docker/install/ubuntu_install_sccache.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/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

cargo install sccache

# The docs specifically recommend hard links: https://github.com/mozilla/sccache#known-caveats
mkdir /opt/sccache
ln "$(which sccache)" /opt/sccache/cc
ln "$(which sccache)" /opt/sccache/c++
26 changes: 26 additions & 0 deletions docker/install/ubuntu_install_wasmtime.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/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

# install wasmtime (note: requires ubuntu_install_rust.sh to run first)
apt-get install -y --no-install-recommends libc6-dev-i386
export WASMTIME_HOME=/opt/wasmtime
curl https://wasmtime.dev/install.sh -sSf | bash
export PATH="${WASMTIME_HOME}/bin:${PATH}"
rustup target add wasm32-wasi
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ def git_describe_version(original_version):
"introduction.py",
"install.py",
"tvmc_command_line_driver.py",
"tvmc_python.py",
"autotvm_relay_x86.py",
"tensor_expr_get_started.py",
"autotvm_matmul_x86.py",
Expand Down
Loading

0 comments on commit 3ec58ff

Please sign in to comment.