Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
6a38dc9
Some docstring fixes.
mdw-octoml Jan 28, 2021
82cee46
Couple of small fixes:
mdw-octoml Feb 25, 2021
545a241
Adding Zephyr demo runtime.
mdw-octoml Feb 25, 2021
c611d30
Cleanup of uTVM tests and demo runtime.
mdw-octoml Feb 25, 2021
28b92de
Working on QEMU support.
mdw-octoml Feb 25, 2021
123c64c
Adding board-specific prj.conf files.
mdw-octoml Feb 25, 2021
bc87450
Some cleanup.
mdw-octoml Feb 25, 2021
98f3475
Lots of hacking to get ONNX model to run on QEMU and nRF5340.
mdw-octoml Feb 28, 2021
a9ffc96
Adding data for unit tests.
mdw-octoml Feb 28, 2021
d249161
Cleanup demo_runtime code.
mdw-octoml Feb 28, 2021
d04e04d
Fix up tutorial.
mdw-octoml Mar 1, 2021
7a38c7f
Couple of small fixes:
mdw-octoml Feb 25, 2021
443a429
Adding Zephyr demo runtime.
mdw-octoml Feb 25, 2021
280479a
Cleanup of uTVM tests and demo runtime.
mdw-octoml Feb 25, 2021
b62ab38
Working on QEMU support.
mdw-octoml Feb 25, 2021
853f01e
Adding board-specific prj.conf files.
mdw-octoml Feb 25, 2021
4b1da9a
Some cleanup.
mdw-octoml Feb 25, 2021
058985b
Lots of hacking to get ONNX model to run on QEMU and nRF5340.
mdw-octoml Mar 1, 2021
fe2c9a1
Lots of hacking to get ONNX model to run on QEMU and nRF5340.
mdw-octoml Feb 28, 2021
763017e
Adding data for unit tests.
mdw-octoml Feb 28, 2021
df722b8
Cleanup demo_runtime code.
mdw-octoml Feb 28, 2021
6645f50
Fix up tutorial.
mdw-octoml Mar 1, 2021
b6ae7cf
Fix tutorial.
mdw-octoml Mar 1, 2021
8934c19
Fix tutorial and runtime.
mdw-octoml Mar 1, 2021
ec5b004
Merge branch 'mdw/demo-runtime' of github.com:mdw-octoml/tvm into mdw…
mdw-octoml Mar 1, 2021
fbdc1cb
Fix merge conflicts.
mdw-octoml Mar 1, 2021
ec2c374
Fix merge conflict.
mdw-octoml Mar 1, 2021
2b14aa1
Remove redundant files.
mdw-octoml Mar 1, 2021
0db2207
Revert dep.
mdw-octoml Mar 2, 2021
687c09c
Fixup
mdw-octoml Mar 5, 2021
bcce620
Add new files to check_file_type.py.
mdw-octoml Mar 10, 2021
f1260df
Adding missing ONNX file.
mdw-octoml Mar 10, 2021
599c5fb
Fixup docs.
mdw-octoml Mar 10, 2021
c552fa9
Fix linting rule.
mdw-octoml Mar 13, 2021
3271923
small fixes
mehrdadh Mar 12, 2021
0bb5d85
Merge remote-tracking branch 'upstream/main' into mdw/demo-runtime
mdw-octoml Mar 16, 2021
f672577
Add missing file to check_file_type.py.
mdw-octoml Mar 16, 2021
12cdd03
clang-format this file.
mdw-octoml Mar 16, 2021
a87f3e8
Fix formatting.
mdw-octoml Mar 17, 2021
f2b665b
Black formatting.
mdw-octoml Mar 17, 2021
65f0b4e
Lint comments.
mdw-octoml Mar 17, 2021
37e0bce
Fix path for test.
mdw-octoml Mar 18, 2021
a26234a
Bump CI.
mdw-octoml Mar 22, 2021
28b6776
Merge remote-tracking branch 'upstream/main' into mdw/demo-runtime
mdw-octoml Mar 23, 2021
4749de5
Update from_onnx.
mdw-octoml Mar 23, 2021
024518f
fix path
Mar 23, 2021
65385a5
Merge remote-tracking branch 'upstream/main' into mdw/demo-runtime
mdw-octoml Mar 24, 2021
72a2099
Fixing
mdw-octoml Mar 24, 2021
01242ca
Merge branch 'main' into mdw/demo-runtime
mdw-octoml Mar 24, 2021
76808c8
Revert dmlc-core to 21cc7de0dc9fd6acb796e1be6181fa8e6b6c8f41
mdw-octoml Mar 24, 2021
b6efa06
Fix path again.
mdw-octoml Mar 25, 2021
d9db2ad
Fix tutorial to not use actual Zephyr.
mdw-octoml Mar 25, 2021
2615711
Revert submodule version change
mdw-octoml Mar 26, 2021
9c9b314
Merge remote-tracking branch 'upstream/main' into mdw/demo-runtime
mdw-octoml Mar 26, 2021
f412ffd
Fix bad merge.
mdw-octoml Mar 26, 2021
22e484d
Trying to fix this mess.
mdw-octoml Mar 26, 2021
ac60a05
Fix formatting.
mdw-octoml Mar 26, 2021
4a7719d
context -> device
mdw-octoml Mar 27, 2021
c303c91
Removing tutorial since I can't get it to pass CI.
mdw-octoml Mar 28, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions apps/microtvm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@
<!--- specific language governing permissions and limitations -->
<!--- under the License. -->

# microTVM Reference Virtual Machines
# microTVM

microTVM is the effort that allows TVM to build and execute models on bare-metal microcontrollers.

microTVM is the effort to allow TVM to build and execute models on bare-metal microcontrollers.
These Virtual Machines are used to reproduce results and bugs when using microTVM with real
physical hardware. Note that they are not used to run Continuous Integration regression tests--
those are instead run by the QEMU container (they run against an emulator, rather than real
hardware).
The `pyproject.toml` file in this directory can be used to create a
[Poetry](https://python-poetry.org/) Python environment with all of the required
dependencies installed for running microTVM. To use it, run:

```
$ poetry lock && poetry install
$ poetry shell
```


See the "microTVM Reference Virtual Machines" tutorial for information on how to use these.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
# specific language governing permissions and limitations
# under the License.

# This `pyproject.toml` file is used to allow MicroTVM
# to run within a Poetry-managed environment.

[tool.black]
line-length = 100
target-version = ['py36']
Expand Down Expand Up @@ -47,12 +50,12 @@ exclude = '''
)
'''
[tool.poetry]
name = "tvm"
name = "microtvm"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
authors = []
packages = [
{ include = "tvm", from = "../../../../python" },
{ include = "tvm", from = "../../python" },
]

[tool.poetry.dependencies]
Expand All @@ -67,7 +70,6 @@ typed_ast = "^1.4"
pyyaml = "^5.4.1"
pyserial = "^3.5"


# AutoTVM
xgboost = {version = "^1.1", optional = true}

Expand Down
19 changes: 19 additions & 0 deletions apps/microtvm/zephyr/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!--- 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. -->

This directory code to interface microTVM with the [Zephyr RTOS](https://zephyrproject.org/).

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ set(QEMU_PIPE "\${QEMU_PIPE}") # QEMU_PIPE is set by the calling TVM instance.
find_package(Zephyr HINTS $ENV{ZEPHYR_BASE})
project(microtvm_zephyr_runtime)


set(CMAKE_VERBOSE_MAKEFILE ON)
file(GLOB TVM_SOURCES ${CMAKE_SOURCE_DIR}/__tvm*.c)
target_sources(app PRIVATE src/main.c ${TVM_SOURCES})
Expand Down
21 changes: 21 additions & 0 deletions apps/microtvm/zephyr/demo_runtime/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!--- 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. -->

This directory contains a Zephyr-based "demo" runtime environment that
pulls together the microTVM runtime dependencies into a single application
that can communicate with a Python-based host program via the UART, using
TVM's RPC protocol.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 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.
#
# This file is specific to the nRF5340 DK board.

# For intrinsics used by generated optimized operators.
CONFIG_CMSIS_DSP=y

# Required for Cortex-M33 devices.
CONFIG_MAIN_STACK_SIZE=1536

# For random number generation.
CONFIG_ENTROPY_GENERATOR=y
CONFIG_TEST_RANDOM_GENERATOR=y

# For debugging.
CONFIG_LED=y
30 changes: 30 additions & 0 deletions apps/microtvm/zephyr/demo_runtime/boards/nucleo_f746zg.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# 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.
#
# This file is specific to the nRF5340 DK board.

# For intrinsics used by generated optimized operators.
CONFIG_CMSIS_DSP=y

# Required for Cortex-M33 devices.
CONFIG_MAIN_STACK_SIZE=50

# For random number generation.
CONFIG_ENTROPY_GENERATOR=y

# For debugging.
CONFIG_LED=y
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
# specific language governing permissions and limitations
# under the License.

sample:
description: uTVM RPC Server unit test
name: utvm rpc server
common:
tags: introduction
# This file is specific to the QEMU-emulated microTVM board.

# For TVMPlatformGenerateRandom(). Remember, these values do not need to be truly random.
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_TIMER_RANDOM_GENERATOR=y

Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@
/*! \brief Number of pages on device. */
#define TVM_CRT_MAX_PAGES 300

//#define TVM_CRT_FRAMER_ENABLE_LOGS
// #define TVM_CRT_FRAMER_ENABLE_LOGS

#endif // TVM_RUNTIME_CRT_CONFIG_H_
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
# specific language governing permissions and limitations
# under the License.

# The settings in this file are generic for all boards, and are merged
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: merged by who?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

# with the settings in the file boards/<BOARD>.conf by the Zephyr build
# process.

# For UART implementation in main().
CONFIG_RING_BUFFER=y
CONFIG_UART_CONSOLE=n
Expand All @@ -30,6 +34,3 @@ CONFIG_FPU=y
# For TVMPlatformAbort().
CONFIG_REBOOT=y

# For TVMPlatformGenerateRandom(). Remember, these values do not need to be truly random.
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_TIMER_RANDOM_GENERATOR=y
Loading