Skip to content

Commit

Permalink
add aot demo
Browse files Browse the repository at this point in the history
  • Loading branch information
mehrdadh committed Jul 21, 2021
1 parent 7f1f425 commit 3eff0d8
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 6 deletions.
25 changes: 25 additions & 0 deletions apps/microtvm/zephyr/aot_demo/boards/qemu_cortex_r5.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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 QEMU-emulated Cortex R5 microTVM board.

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

# Default stack size is 1k, this is required for debug mode.
CONFIG_MAIN_STACK_SIZE=2000
6 changes: 1 addition & 5 deletions apps/microtvm/zephyr/host_driven/boards/qemu_cortex_r5.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,4 @@ CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_TIMER_RANDOM_GENERATOR=y

# Default stack size is 1k, this is required for debug mode.
CONFIG_MAIN_STACK_SIZE=4000


# For models with floating point.
CONFIG_FPU=y
CONFIG_MAIN_STACK_SIZE=1536
3 changes: 2 additions & 1 deletion python/tvm/target/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,14 @@ def intel_graphics(model="unknown", options=None):
opts = _merge_opts(opts, options)
return Target(" ".join(["opencl"] + opts))


MICRO_SUPPORTED_MODELS = {
"host": [],
"zynq_mp_r5": ["-mcpu=cortex-r5"],
"mps2_an521": ["-mcpu=cortex-m33"],
"nrf5340dk": ["-mcpu=cortex-m33"],
"stm32f746xx": ["-mcpu=cortex-m7", "-march=armv7e-m"],
"stm32l4r5zi": ["-mcpu=cortex-m4"],
"zynq_mp_r5": ["-mcpu=cortex-r5"],
}


Expand Down
3 changes: 3 additions & 0 deletions tests/lint/check_file_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
"apps/microtvm/zephyr/qemu-hack/qemu-system-arm",
"apps/microtvm/zephyr/qemu-hack/qemu-system-riscv32",
"apps/microtvm/zephyr/qemu-hack/qemu-system-riscv64",
"apps/microtvm/zephyr/qemu-hack/qemu-system-xilinx-aarch64",
"apps/microtvm/zephyr/host_driven/prj.conf",
"apps/microtvm/zephyr/host_driven/boards/qemu_x86.conf",
"apps/microtvm/zephyr/host_driven/boards/qemu_riscv32.conf",
Expand All @@ -145,6 +146,7 @@
"apps/microtvm/zephyr/host_driven/boards/stm32f746g_disco.conf",
"apps/microtvm/zephyr/host_driven/boards/mps2_an521.conf",
"apps/microtvm/zephyr/host_driven/boards/nucleo_l4r5zi.conf",
"apps/microtvm/zephyr/host_driven/boards/qemu_cortex_r5.conf",
"apps/microtvm/zephyr/host_driven/qemu-hack",
"apps/microtvm/zephyr/aot_demo/prj.conf",
"apps/microtvm/zephyr/aot_demo/boards/qemu_x86.conf",
Expand All @@ -155,6 +157,7 @@
"apps/microtvm/zephyr/aot_demo/boards/stm32f746g_disco.conf",
"apps/microtvm/zephyr/aot_demo/boards/mps2_an521.conf",
"apps/microtvm/zephyr/aot_demo/boards/nucleo_l4r5zi.conf",
"apps/microtvm/zephyr/aot_demo/boards/qemu_cortex_r5.conf",
"apps/microtvm/zephyr/aot_demo/qemu-hack",
# microTVM Virtual Machines
"apps/microtvm/reference-vm/zephyr/Vagrantfile",
Expand Down

0 comments on commit 3eff0d8

Please sign in to comment.