Skip to content

Commit 6d3aeb8

Browse files
committed
Merge branch 'main' into aluo/onnx/sceloss
* main: (102 commits) Implementation of relay_to_tir target hook (apache#8423) [Onnx] Fix NLL Loss tests (apache#8971) [Bugfix] Fix other div zero errors also in rewrite_simplify (apache#8983) [ONNX] enable the onnx tests after PR apache#8274 merged (apache#9019) [Hexagon] Disable `thread_local` on Hexagon (apache#9025) [Hexagon] Allow undefined symbols in libtvm_runtime.so on Hexagon (apache#9024) [Onnx] Add momentum (apache#9000) fix (apache#9021) [Community] @AndrewZhaoLuo -> Reviewer (apache#9020) [Hexagon] Implement model launcher (apache#8986) [Relay][Pass] Add ExtractOperators pass (apache#8996) [BYOC][TensorRT] Add TensorRT own int8 calibration support to TensorRT BYOC integration (apache#8808) [ONNX] Add Einsum converter (apache#8985) Add standalone_crt/ to be part of the wheel package, when available. (apache#9005) [Relay] Remove memory planing from LowerTEPass (apache#8974) [Hexagon] Treat floats as float32 when passing args to offloaded kernels (apache#9010) [Runtime] Pipeline Executor Initial patch. (apache#8702) [Hexagon] `llvm-options` attribute is an array of strings (apache#9011) disable cuda int8 schedule for non-cuda gpu target (apache#9014) [Torch] Add an option to make imported models compatible with the Relay text parser (apache#9015) ...
2 parents d677eb8 + be37923 commit 6d3aeb8

File tree

356 files changed

+22224
-4501
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

356 files changed

+22224
-4501
lines changed

.github/CODEOWNERS

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ tests/** @comaniac @junrushao1994 @tqchen @jroesch @areusch @yzhliu @merrymercy
7878
##############################
7979

8080
# automation related
81-
src/auto_scheduler/** @merrymercy @jcf94 @comaniac @junrushao1994 @vinx13
82-
include/tvm/auto_scheduler/** @merrymercy @jcf94 @comaniac @junrushao1994 @vinx13
83-
python/tvm/auto_scheduler/** @merrymercy @jcf94 @comaniac @junrushao1994 @vinx13
81+
src/auto_scheduler/** @merrymercy @jcf94 @comaniac @junrushao1994 @vinx13 @Hzfengsy
82+
include/tvm/auto_scheduler/** @merrymercy @jcf94 @comaniac @junrushao1994 @vinx13 @Hzfengsy
83+
python/tvm/auto_scheduler/** @merrymercy @jcf94 @comaniac @junrushao1994 @vinx13 @Hzfengsy
8484

8585
python/tvm/autotvm/** @merrymercy @jcf94 @comaniac @junrushao1994 @vinx13
8686

@@ -94,9 +94,9 @@ include/tvm/ir/** @junrushao1994 @vinx13 @tqchen @jroesch @comaniac
9494
python/tvm/ir/** @junrushao1994 @vinx13 @tqchen @jroesch @comaniac
9595

9696
# tir
97-
src/tir/** @junrushao1994 @vinx13 @tqchen @kparzysz-quic @ZihengJiang @masahi @were
98-
include/tvm/tir/** @junrushao1994 @vinx13 @tqchen @kparzysz-quic @ZihengJiang @masahi @were
99-
python/tvm/tir/** @junrushao1994 @vinx13 @tqchen @kparzysz-quic @ZihengJiang @masahi @were
97+
src/tir/** @junrushao1994 @vinx13 @tqchen @kparzysz-quic @ZihengJiang @masahi @were @Hzfengsy
98+
include/tvm/tir/** @junrushao1994 @vinx13 @tqchen @kparzysz-quic @ZihengJiang @masahi @were @Hzfengsy
99+
python/tvm/tir/** @junrushao1994 @vinx13 @tqchen @kparzysz-quic @ZihengJiang @masahi @were @Hzfengsy
100100

101101
# te
102102
src/te/** @junrushao1994 @vinx13 @tqchen @kparzysz-quic @ZihengJiang @masahi @were
@@ -122,11 +122,11 @@ include/tvm/runtime/** @vinx13 @tqchen @FronzenGene @liangfu @areusch @tmoreau8
122122
python/tvm/runtime/** @vinx13 @tqchen @FronzenGene @liangfu @areusch @tmoreau89 @ajtulloch @masahi @kazum @ZihengJiang @junrushao1994
123123

124124
# runtime/micro
125-
src/runtime/micro/** @areusch @liangfu @tmoreau89
126-
src/runtime/crt/** @areusch @liangfu @tmoreau89
127-
include/tvm/runtime/crt/** @areusch @liangfu @tmoreau89
128-
include/tvm/runtime/micro/** @areusch @liangfu @tmoreau89
129-
python/tvm/micro/** @areusch @liangfu @tmoreau89
125+
src/runtime/micro/** @areusch @liangfu @tmoreau89 @manupa-arm
126+
src/runtime/crt/** @areusch @liangfu @tmoreau89 @manupa-arm
127+
include/tvm/runtime/crt/** @areusch @liangfu @tmoreau89 @manupa-arm
128+
include/tvm/runtime/micro/** @areusch @liangfu @tmoreau89 @manupa-arm
129+
python/tvm/micro/** @areusch @liangfu @tmoreau89 @manupa-arm
130130

131131
# relay
132132
src/relay/** @jroesch @slyubomirsky @icemelon9 @MarisaKirisame @ZihengJiang @yzhliu @vinx13 @mbrookhart @jwfromm @zhiics @anijain2305 @wweic @eqy @junrushao1994
@@ -140,7 +140,7 @@ inlcude/tvm/relay/qnn/** @jwfromm @anijain2305 @ZihengJiang
140140
python/tvm/relay/qnn/** @jwfromm @anijain2305 @ZihengJiang
141141

142142
# relay/backend/contrib: BYOC
143-
src/relay/backend/contrib/** @zhiics @trevor-m @comaniac @mbaret
143+
src/relay/backend/contrib/** @zhiics @trevor-m @comaniac @mbaret @manupa-arm
144144

145145
# relay/frontends
146146
python/tvm/relay/frontend/** @jwfromm @mbrookhart @srkreddy1238 @siju-samuel @Huyuwei @hlu1 @kazum @PariksheetPinjari909
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: "\U0001F4C4 Documentation"
3+
about: Use this template to suggest additions and changes to the documentation.
4+
title: "[Docs] "
5+
labels: "type: doc"
6+
7+
---
8+
9+
Thanks for participating in the TVM community! We use https://discuss.tvm.ai for any general usage questions and discussions. The issue tracker is used for actionable items such as feature proposals discussion, roadmaps, and bug tracking. You are always welcomed to post on the forum first :smile_cat:
10+
11+
Issues that are inactive for a period of time may get closed. We adopt this policy so that we won't lose track of actionable issues that may fall at the bottom of the pile. Feel free to reopen a new one if you feel there is an additional problem that needs attention when an old one gets closed.
12+
13+
### Documentation Title & Type
14+
15+
Include the title of the document (e.g. "Getting Started with TVM"), and the type of documentation (e.g. user docs, developer docs, tutorials)
16+
17+
### Additions/Changes Requested
18+
19+
If an RFC/discuss post exists, link it here.
20+
21+
Otherwise, specify what actions should be taken to provide additional clarity/readability/reproducibility to the document. Include code snippets from the previous documentation if applicable.
22+

3rdparty/vta-hw

CMakeLists.txt

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ tvm_option(HIDE_PRIVATE_SYMBOLS "Compile with -fvisibility=hidden." OFF)
4747
tvm_option(USE_TF_TVMDSOOP "Build with TensorFlow TVMDSOOp" OFF)
4848
tvm_option(USE_FALLBACK_STL_MAP "Use TVM's POD compatible Map" OFF)
4949
tvm_option(USE_ETHOSN "Build with Arm Ethos-N" OFF)
50+
tvm_option(USE_CMSISNN "Build with Arm CMSIS-NN" OFF)
5051
tvm_option(INDEX_DEFAULT_I64 "Defaults the index datatype to int64" ON)
5152
tvm_option(USE_LIBBACKTRACE "Build libbacktrace to supply linenumbers on stack traces" AUTO)
5253
tvm_option(BUILD_STATIC_RUNTIME "Build static version of libtvm_runtime" OFF)
@@ -304,9 +305,12 @@ if(BUILD_FOR_HEXAGON)
304305
# static one.
305306
if(NOT BUILD_STATIC_RUNTIME)
306307
list(APPEND RUNTIME_SRCS src/runtime/hexagon/hexagon_posix.cc)
308+
# Allow undefined symbols (there will be some from libc).
309+
set(TVM_NO_UNDEFINED_SYMBOLS "")
307310
endif()
308311

309312
add_definitions(-D_MACH_I32=int)
313+
add_definitions(-DDMLC_CXX11_THREAD_LOCAL=0)
310314
endif()
311315

312316
# Package runtime rules
@@ -357,7 +361,7 @@ endif(USE_GRAPH_EXECUTOR)
357361

358362
# convert old options for profiler
359363
if(USE_GRAPH_EXECUTOR_DEBUG)
360-
message(WARNING "USE_GRAPH_EXECUTOR renamed to USE_PROFILER. Please update your config.cmake")
364+
message(WARNING "USE_GRAPH_EXECUTOR_DEBUG renamed to USE_PROFILER. Please update your config.cmake")
361365
unset(USE_GRAPH_EXECUTOR_DEBUG CACHE)
362366
set(USE_PROFILER ON)
363367
endif()
@@ -388,6 +392,12 @@ if(GTEST_INCLUDE_DIR AND GTEST_LIB)
388392
include(GoogleTest)
389393
endif()
390394

395+
if(USE_PIPELINE_EXECUTOR)
396+
message(STATUS "Build with Pipeline Executor support...")
397+
file(GLOB RUNTIME_PIPELINE_SRCS src/runtime/pipeline/*.cc)
398+
list(APPEND RUNTIME_SRCS ${RUNTIME_PIPELINE_SRCS})
399+
endif(USE_PIPELINE_EXECUTOR)
400+
391401
# Module rules
392402
include(cmake/modules/VTA.cmake)
393403
include(cmake/modules/StandaloneCrt.cmake)
@@ -401,9 +411,12 @@ include(cmake/modules/ROCM.cmake)
401411
include(cmake/modules/LLVM.cmake)
402412
include(cmake/modules/Micro.cmake)
403413
include(cmake/modules/contrib/EthosN.cmake)
414+
include(cmake/modules/contrib/CMSISNN.cmake)
415+
include(cmake/modules/contrib/EthosU.cmake)
404416
include(cmake/modules/contrib/BLAS.cmake)
405417
include(cmake/modules/contrib/CODEGENC.cmake)
406418
include(cmake/modules/contrib/DNNL.cmake)
419+
include(cmake/modules/contrib/ExampleTargetHooks.cmake)
407420
include(cmake/modules/contrib/Random.cmake)
408421
include(cmake/modules/contrib/Posit.cmake)
409422
include(cmake/modules/contrib/MicroStandaloneRuntime.cmake)

CONTRIBUTORS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ We do encourage everyone to work anything they are interested in.
5656
- [Krzysztof Parzyszek](https://github.com/kparzysz-quic): @kparzysz-quic - hexagon, llvm
5757
- [Andrew Reusch](https://github.com/areusch): @areusch - runtime, microTVM
5858
- [Jared Roesch](https://github.com/jroesch) (PMC): @jroesch - relay
59+
- [Giuseppe Rossini](https://github.com/giuseros): @giuseros - aot, arm
5960
- [Siju Samuel](https://github.com/siju-samuel): @siju-samuel - frontends
6061
- [Junru Shao](https://github.com/junrushao1994) (PMC): @junrushao1994 - relay, compiler
6162
- [Haichen Shen](https://github.com/icemelon9) (PMC): @icemelon9 - relay, topi
@@ -107,6 +108,7 @@ We do encourage everyone to work anything they are interested in.
107108
- [Yizhi Liu](https://github.com/yzhliu) : @yzhliu
108109
- [Hao Lu](https://github.com/hlu1): @hlu1
109110
- [Eric Lunderberg](https://github.com/Lunderberg): @Lunderberg
111+
- [Andrew Z. Luo](https://github.com/AndrewZhaoLuo): @AndrewZhaoLuo
110112
- [Steven Lyubomirsky](https://github.com/slyubomirsky): @slyubomirsky
111113
- [Masahiro Masuda](https://github.com/masahi): @masahi
112114
- [Sergey Mironov](https://github.com/grwlf): @grwlf

apps/bundle_deploy/crt_config/crt_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
#define TVM_CRT_MAX_REGISTERED_MODULES 2
4444

4545
/*! Size of the global function registry, in bytes. */
46-
#define TVM_CRT_GLOBAL_FUNC_REGISTRY_SIZE_BYTES 200
46+
#define TVM_CRT_GLOBAL_FUNC_REGISTRY_SIZE_BYTES 512
4747

4848
/*! Maximum packet size, in bytes, including the length header. */
4949
#define TVM_CRT_MAX_PACKET_SIZE_BYTES 512

apps/ios_rpc/tvmrpc/TVMRuntime.mm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "TVMRuntime.h"
2424
// Runtime API
2525
#include "../../../src/runtime/c_runtime_api.cc"
26+
#include "../../../src/runtime/contrib/random/random.cc"
2627
#include "../../../src/runtime/cpu_device_api.cc"
2728
#include "../../../src/runtime/dso_library.cc"
2829
#include "../../../src/runtime/file_utils.cc"

apps/microtvm/arduino/example_project/src/model.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
#include "model.h"
2121

2222
#include "Arduino.h"
23+
#include "standalone_crt/include/dlpack/dlpack.h"
2324
#include "standalone_crt/include/tvm/runtime/crt/stack_allocator.h"
2425

2526
// AOT memory array
2627
static uint8_t g_aot_memory[WORKSPACE_SIZE];
27-
extern tvm_model_t tvmgen_default_network;
2828
tvm_workspace_t app_workspace;
2929

3030
// Blink code for debugging purposes

apps/microtvm/arduino/host_driven/src/model_support.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
* under the License.
1818
*/
1919

20+
#include "standalone_crt/include/dlpack/dlpack.h"
21+
#include "standalone_crt/include/tvm/runtime/crt/error_codes.h"
2022
#include "stdarg.h"
2123

2224
// Blink code for debugging purposes

apps/microtvm/arduino/template_project/microtvm_api_server.py

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,34 +57,40 @@ class BoardAutodetectFailed(Exception):
5757
"package": "arduino",
5858
"architecture": "sam",
5959
"board": "arduino_due_x_dbg",
60+
"model": "sam3x8e",
6061
},
6162
# Due to the way the Feather S2 bootloader works, compilation
6263
# behaves fine but uploads cannot be done automatically
6364
"feathers2": {
6465
"package": "esp32",
6566
"architecture": "esp32",
6667
"board": "feathers2",
68+
"model": "esp32",
6769
},
6870
"metrom4": {
6971
"package": "adafruit",
7072
"architecture": "samd",
7173
"board": "adafruit_metro_m4",
74+
"model": "atsamd51",
7275
},
7376
# Spresense only works as of its v2.3.0 sdk
7477
"spresense": {
7578
"package": "SPRESENSE",
7679
"architecture": "spresense",
7780
"board": "spresense",
81+
"model": "cxd5602gg",
7882
},
7983
"nano33ble": {
8084
"package": "arduino",
8185
"architecture": "mbed_nano",
8286
"board": "nano33ble",
87+
"model": "nrf52840",
8388
},
8489
"pybadge": {
8590
"package": "adafruit",
8691
"architecture": "samd",
8792
"board": "adafruit_pybadge_m4",
93+
"model": "atsamd51",
8894
},
8995
# The Teensy boards are listed here for completeness, but they
9096
# won't work until https://github.com/arduino/arduino-cli/issues/700
@@ -93,16 +99,19 @@ class BoardAutodetectFailed(Exception):
9399
"package": "teensy",
94100
"architecture": "avr",
95101
"board": "teensy40",
102+
"model": "imxrt1060",
96103
},
97104
"teensy41": {
98105
"package": "teensy",
99106
"architecture": "avr",
100107
"board": "teensy41",
108+
"model": "imxrt1060",
101109
},
102110
"wioterminal": {
103111
"package": "Seeeduino",
104112
"architecture": "samd",
105113
"board": "seeed_wio_terminal",
114+
"model": "atsamd51",
106115
},
107116
}
108117

@@ -114,6 +123,11 @@ class BoardAutodetectFailed(Exception):
114123
choices=list(BOARD_PROPERTIES),
115124
help="Name of the Arduino board to build for",
116125
),
126+
server.ProjectOption(
127+
"arduino_model",
128+
choices=[board["model"] for _, board in BOARD_PROPERTIES.items()],
129+
help="Name of the model for each Arduino board.",
130+
),
117131
server.ProjectOption("arduino_cli_cmd", help="Path to the arduino-cli tool."),
118132
server.ProjectOption("port", help="Port to use for connecting to hardware"),
119133
server.ProjectOption(
@@ -370,7 +384,7 @@ def build(self, options):
370384
compile_cmd.append("--verbose")
371385

372386
# Specify project to compile
373-
subprocess.run(compile_cmd)
387+
subprocess.run(compile_cmd, check=True)
374388

375389
BOARD_LIST_HEADERS = ("Port", "Type", "Board Name", "FQBN", "Core")
376390

@@ -407,7 +421,9 @@ def _parse_boards_tabular_str(self, tabular_str):
407421

408422
def _auto_detect_port(self, options):
409423
list_cmd = [options["arduino_cli_cmd"], "board", "list"]
410-
list_cmd_output = subprocess.run(list_cmd, stdout=subprocess.PIPE).stdout.decode("utf-8")
424+
list_cmd_output = subprocess.run(
425+
list_cmd, check=True, stdout=subprocess.PIPE
426+
).stdout.decode("utf-8")
411427

412428
desired_fqbn = self._get_fqbn(options)
413429
for line in self._parse_boards_tabular_str(list_cmd_output):
@@ -444,7 +460,7 @@ def flash(self, options):
444460
if options.get("verbose"):
445461
upload_cmd.append("--verbose")
446462

447-
subprocess.run(upload_cmd)
463+
subprocess.run(upload_cmd, check=True)
448464

449465
def open_transport(self, options):
450466
# Zephyr example doesn't throw an error in this case

0 commit comments

Comments
 (0)