Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

1 #6

Merged
merged 3 commits into from
Mar 4, 2022
Merged

1 #6

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 21 additions & 0 deletions .azurepipeline/ci-track_github_tvm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
schedules:
- cron: "0 0 * * *"
displayName: Daily midnight check
branches:
include:
- main

pool:
vmImage: ubuntu-latest

steps:
- script: |
git config --global user.email "nnfusion_team@microsoft.com"
git config --global user.name "NNFusion team"
git config pull.rebase false
git checkout origin main
git checkout main
git remote add tvm https://github.com/apache/tvm.git
git pull tvm main
git push https://${PAT}:PAT@dev.azure.com/TensorStar/TensorStar/_git/tvm main
displayName: 'Add apache/tvm as new origin'
20 changes: 20 additions & 0 deletions .azurepipeline/ci-windows_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
trigger:
- develop

pool: Default

steps:
- checkout: self
submodules: true
persistCredentials: true
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
F:\tool\vcpkg\vcpkg.exe install gtest:x64-windows
- task: CMake@1
inputs:
cmakeArgs: '.. -DUSE_DIRECTX=ON -DCMAKE_TOOLCHAIN_FILE="F:/tool/vcpkg/scripts/buildsystems/vcpkg.cmake"'
- task: CMake@1
inputs:
cmakeArgs: '--build . -j'
1 change: 1 addition & 0 deletions .github/workflows/cc_bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ concurrency:

jobs:
cc-reviewers:
if: github.repository == 'apache/tvm'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/directx_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build TVM with DirectX support

on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
VCPKG_EXE_PATH: F:\tool\vcpkg\vcpkg.exe
VCPKG_CMAKE_PATH: "F:/tool/vcpkg/scripts/buildsystems/vcpkg.cmake"
VSDEVCMD: C:/\"Program Files\"/\"Microsoft Visual Studio\"/2022/Enterprise/Common7/Tools/VsDevCmd.bat

jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: [self-hosted, Windows, X64]

steps:
- uses: actions/checkout@v2
with:
submodules: 'true'

- name: VCPKG install Gtest
shell: cmd
run: ${{env.VCPKG_EXE_PATH}} install gtest:x64-windows

- name: Configure CMake
shell: cmd
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: >-
${{env.VSDEVCMD}} &&
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DUSE_DIRECTX=ON -DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_CMAKE_PATH}}

- name: Build
shell: cmd
# Build your program with the given configuration
run: >-
${{env.VSDEVCMD}} &&
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Test
shell: cmd
# Build your program with the given configuration
run: >-
${{env.VSDEVCMD}} &&
${{github.workspace}}/build/${{env.BUILD_TYPE}}/dx_test.exe
1 change: 1 addition & 0 deletions .github/workflows/ping_reviewers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ concurrency:

jobs:
ping:
if: github.repository == 'apache/tvm'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/tag_teams.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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: Teams

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

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

jobs:
tag-teams:
if: github.repository == 'apache/tvm'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Tag people from relevant teams
env:
PR: ${{ toJson(github.event.pull_request) }}
ISSUE: ${{ toJson(github.event.issue) }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -eux
python tests/scripts/github_tag_teams.py || echo failed
37 changes: 37 additions & 0 deletions .github/workflows/track_tvm_github.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Track latest TVM commit from Github

on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
schedule:
- cron: '36 6 * * *'

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: git-mirror-action
# You may pin to the exact commit or the version.
# uses: mathisve/git-mirror-action@0e26d87bd1420836e3b68767929c997565c7028f
uses: mathisve/git-mirror-action@v1.2
with:
# url of the repository you want to mirror
originalURL: https://github.com/apache/tvm.git
# branch in the original repository you want to mirror. Defaults to `master`
originalBranch: main
# url of the repository you want the mirror to go in
mirrorURL: https://github.com/nnfusion/tvm.git
# branch that will be created or pushed into. Defaults to `mirror`
mirrorBranch: main
# Base64 encoded Personal Access Token
pat: ${{ secrets.NNFUSION_PAT }}
# whether to use the `--force` argument when pushing to the mirror repository. Defaults to false
force: false
# whether or not you want the output to be verbose. Defaults to false
verbose: false
# whether or not you want to transfer tags. Defaults to false
tags: false

1 change: 1 addition & 0 deletions .github/workflows/update_last_successful_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ concurrency:

jobs:
update-last-successful-branch:
if: github.repository == 'apache/tvm'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
Expand Down
9 changes: 9 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,12 @@
[submodule "3rdparty/cutlass"]
path = 3rdparty/cutlass
url = https://github.com/NVIDIA/cutlass
[submodule "3rdparty/DirectXShaderCompiler"]
path = 3rdparty/DirectXShaderCompiler
url = https://github.com/nnfusion/DirectXShaderCompiler
[submodule "3rdparty/DirectX-Headers"]
path = 3rdparty/DirectX-Headers
url = https://github.com/microsoft/DirectX-Headers.git
[submodule "3rdparty/DirectXTK12"]
path = 3rdparty/DirectXTK12
url = https://github.com/microsoft/DirectXTK12.git
1 change: 1 addition & 0 deletions 3rdparty/DirectX-Headers
Submodule DirectX-Headers added at 0644e7
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ tvm_option(USE_OPENCL "Build with OpenCL" OFF)
tvm_option(USE_VULKAN "Build with Vulkan" OFF)
tvm_option(USE_METAL "Build with Metal" OFF)
tvm_option(USE_ROCM "Build with ROCM" OFF)
tvm_option(USE_DIRECTX "Build with DIRECTX" ON)
tvm_option(ROCM_PATH "The path to rocm" /opt/rocm)
tvm_option(USE_HEXAGON_DEVICE "Build with Hexagon device support in TVM runtime" OFF)
tvm_option(USE_HEXAGON_SDK "Path to the Hexagon SDK root (required for Hexagon support in TVM runtime or for building TVM runtime for Hexagon)" /path/to/sdk)
Expand All @@ -38,6 +39,7 @@ tvm_option(USE_LLVM "Build with LLVM, can be set to specific llvm-config path" O
tvm_option(USE_STACKVM_RUNTIME "Include stackvm into the runtime" OFF)
tvm_option(USE_GRAPH_EXECUTOR "Build with tiny graph executor" ON)
tvm_option(USE_GRAPH_EXECUTOR_CUDA_GRAPH "Build with tiny graph executor with CUDA Graph for GPUs" OFF)
tvm_option(USE_AOT_EXECUTOR "Build with AOT executor" ON)
tvm_option(USE_PROFILER "Build profiler for the VM and graph executor" ON)
tvm_option(USE_OPENMP "Build with OpenMP thread pool implementation" OFF)
tvm_option(USE_RELAY_DEBUG "Building Relay in debug mode..." OFF)
Expand All @@ -63,6 +65,7 @@ tvm_option(DMLC_PATH "Path to DMLC" "3rdparty/dmlc-core/include")
tvm_option(RANG_PATH "Path to RANG" "3rdparty/rang/include")
tvm_option(COMPILER_RT_PATH "Path to COMPILER-RT" "3rdparty/compiler-rt")
tvm_option(PICOJSON_PATH "Path to PicoJSON" "3rdparty/picojson")
tvm_option(DIRECTX_HEADER_PATH "Path to DirectX headers" "3rdparty/DirectX-Headers/include")

# Contrib library options
tvm_option(USE_BYODT_POSIT "Build with BYODT software emulated posit custom datatype" OFF)
Expand Down Expand Up @@ -103,6 +106,7 @@ include_directories(SYSTEM ${DMLC_PATH})
include_directories(SYSTEM ${RANG_PATH})
include_directories(SYSTEM ${COMPILER_RT_PATH})
include_directories(SYSTEM ${PICOJSON_PATH})
include_directories(SYSTEM ${DIRECTX_HEADER_PATH})

# initial variables
set(TVM_LINKER_LIBS "")
Expand Down Expand Up @@ -267,6 +271,7 @@ tvm_file_glob(GLOB_RECURSE COMPILER_SRCS
tvm_file_glob(GLOB CODEGEN_SRCS
src/target/*.cc
src/target/source/*.cc
src/target/directx/*.cc
)

list(APPEND COMPILER_SRCS ${CODEGEN_SRCS})
Expand Down Expand Up @@ -395,6 +400,13 @@ if(USE_PROFILER)
list(APPEND RUNTIME_SRCS ${RUNTIME_VM_PROFILER_SRCS})
endif(USE_PROFILER)

if(USE_AOT_EXECUTOR)
message(STATUS "Build with AOT Executor support...")
file(GLOB RUNTIME_AOT_EXECUTOR_SRCS src/runtime/aot_executor/*.cc)
list(APPEND RUNTIME_SRCS ${RUNTIME_AOT_EXECUTOR_SRCS})

endif(USE_AOT_EXECUTOR)

# Enable ctest if gtest is available
if(USE_GTEST)
# Check env var for backward compatibility. A better way to specify package
Expand Down Expand Up @@ -428,6 +440,7 @@ include(cmake/modules/Arduino.cmake)
include(cmake/modules/CUDA.cmake)
include(cmake/modules/Hexagon.cmake)
include(cmake/modules/OpenCL.cmake)
include(cmake/modules/DirectX.cmake)
include(cmake/modules/OpenMP.cmake)
include(cmake/modules/Vulkan.cmake)
include(cmake/modules/Metal.cmake)
Expand Down
6 changes: 4 additions & 2 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ We do encourage everyone to work anything they are interested in.
- [Thierry Moreau](https://github.com/tmoreau89) (PMC): @tmoreau89 - vta
- [Kazutaka Morita](https://github.com/kazum): @kazum - frontends, opencl
- [Trevor Morris](https://github.com/trevor-m): @trevor-m - byoc, compiler
- [Leandro Nunes](https://github.com/leandron): @leandron - tvmc
- [Leandro Nunes](https://github.com/leandron) (PMC): @leandron - tvmc
- [Lily Orth-Smith](https://github.com/electriclilies): @electriclilies - relay
- [Krzysztof Parzyszek](https://github.com/kparzysz-quic): @kparzysz-quic - hexagon, llvm
- [Andrew Reusch](https://github.com/areusch): (PMC) @areusch - runtime, microTVM
- [Jared Roesch](https://github.com/jroesch) (PMC): @jroesch - relay
Expand All @@ -64,6 +65,7 @@ We do encourage everyone to work anything they are interested in.
- [Christopher Sidebottom](https://github.com/Mousius): @Mousius - arm, ethos-u, relay
- [Junru Shao](https://github.com/junrushao1994) (PMC): @junrushao1994 - relay, compiler
- [Haichen Shen](https://github.com/icemelon) (PMC): @icemelon - relay, topi
- [Chris Sullivan](https://github.com/csullivan): @csullivan - amd backend
- [Siva Rama Krishna Reddy](https://github.com/srkreddy1238): @srkreddy1238 - frontends, golang
- [Zhixun Tan](https://github.com/phisiart): @phisiart - opengl, web
- [Andrew Tulloch](https://github.com/ajtulloch): @ajtulloch - topi, compiler, runtime
Expand Down Expand Up @@ -106,7 +108,7 @@ We do encourage everyone to work anything they are interested in.
- [Manupa Karunaratne](https://github.com/manupa-arm): @manupa-arm
- [Marisa Kirisame](https://github.com/MarisaKirisame): @MarisaKirisame
- [Tristan Konolige](https://github.com/tkonolige): @tkonolige
- [Ruihang Lai](https://github.com/MasterJH5574): @MasterJH5574
- [Ruihang Lai](https://github.com/MasterJH5574): @MasterJH5574
- [Wuwei Lin](https://github.com/vinx13): @vinx13
- [Andrew Liu](https://github.com/hypercubestart): @hypercubestart
- [Henry Liu](https://github.com/optima2005): @optima2005
Expand Down
Loading