From 3eff0d81524595c03f8045b9413ed14a97a8f484 Mon Sep 17 00:00:00 2001 From: Mehrdad Hessar Date: Tue, 20 Jul 2021 14:45:53 -0700 Subject: [PATCH] add aot demo --- .../aot_demo/boards/qemu_cortex_r5.conf | 25 +++++++++++++++++++ .../host_driven/boards/qemu_cortex_r5.conf | 6 +---- python/tvm/target/target.py | 3 ++- tests/lint/check_file_type.py | 3 +++ 4 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 apps/microtvm/zephyr/aot_demo/boards/qemu_cortex_r5.conf diff --git a/apps/microtvm/zephyr/aot_demo/boards/qemu_cortex_r5.conf b/apps/microtvm/zephyr/aot_demo/boards/qemu_cortex_r5.conf new file mode 100644 index 000000000000..267589ba8f0c --- /dev/null +++ b/apps/microtvm/zephyr/aot_demo/boards/qemu_cortex_r5.conf @@ -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 diff --git a/apps/microtvm/zephyr/host_driven/boards/qemu_cortex_r5.conf b/apps/microtvm/zephyr/host_driven/boards/qemu_cortex_r5.conf index a86bbaeb4b93..4097f7ec5487 100644 --- a/apps/microtvm/zephyr/host_driven/boards/qemu_cortex_r5.conf +++ b/apps/microtvm/zephyr/host_driven/boards/qemu_cortex_r5.conf @@ -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 diff --git a/python/tvm/target/target.py b/python/tvm/target/target.py index 868227fe4679..106432cd44f7 100644 --- a/python/tvm/target/target.py +++ b/python/tvm/target/target.py @@ -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"], } diff --git a/tests/lint/check_file_type.py b/tests/lint/check_file_type.py index 7250a3ccd7d0..f31630c2a705 100644 --- a/tests/lint/check_file_type.py +++ b/tests/lint/check_file_type.py @@ -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", @@ -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", @@ -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",