-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[microTVM] Update Zephyr version and Zephyr SDK version (#13818)
This commit updates the microTVM code to use Zephyr 3.2 and SDK 0.15.2. As a result of this change, there are a few other changes that are included: - A launch script was added for Zephyr and Arduino template project to run the Project API server from a different Python ENV than TVM Python ENV; - For Zephyr, the launch script uses global python3.8 which is where west is registered. However, for Arduino it uses a separate virtual ENV with python3 version that exists in the host; - tests/micro/project_api/test_arduino_microtvm_api_server.py was removed since these tests were using Arduino microTVM API server by importing it from TVM. We no longer support Arduino/Zephyr dependencies in TVM testing python ENV; - Disables a demo and test due to a CMSIS-NN bug: [Bug] CMSIS-NN BYOC fails with Zephyr 3.2 #13856; There will be a follow up work to move Zephyr to a completely separate virtual ENV as it was done in this commit for Arduino in the launch script.
- Loading branch information
Showing
21 changed files
with
193 additions
and
269 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
apps/microtvm/arduino/template_project/launch_microtvm_api_server.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
# 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. | ||
|
||
function show_usage() { | ||
cat <<EOF | ||
This script is for running microtvm_api_server with Arduino. | ||
Usage: launch_microtvm_api_server.sh <microtvm_api_server.py> --read-fd <READ_FD_PATH> --write-fd <WRITE_FD_PATH> | ||
EOF | ||
} | ||
|
||
if [ "$#" -lt 5 -o "$1" == "--help" ]; then | ||
show_usage | ||
exit -1 | ||
fi | ||
|
||
ARDUINO_VENV_PATH=${HOME}/.tvm/micro_arduino | ||
|
||
# Create virtual env | ||
mkdir -p ${HOME}/.tvm | ||
PYTHON_CMD=$(which python3) | ||
$PYTHON_CMD -m venv ${ARDUINO_VENV_PATH} | ||
ARDUINO_PYTHON_CMD="${ARDUINO_VENV_PATH}/bin/python3" | ||
|
||
# Install dependencies | ||
$ARDUINO_PYTHON_CMD -m pip install pyusb packaging | ||
|
||
# Run server | ||
$ARDUINO_PYTHON_CMD $1 $2 $3 $4 $5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
apps/microtvm/zephyr/template_project/launch_microtvm_api_server.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
# 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. | ||
|
||
function show_usage() { | ||
cat <<EOF | ||
This script is for running microtvm_api_server with Zephyr. | ||
Usage: launch_microtvm_api_server.sh <microtvm_api_server.py> --read-fd <READ_FD_PATH> --write-fd <WRITE_FD_PATH> | ||
EOF | ||
} | ||
|
||
if [ "$#" -lt 5 -o "$1" == "--help" ]; then | ||
show_usage | ||
exit -1 | ||
fi | ||
|
||
PYTHON_CMD=$(sed 's/#!//; q' $(which west)) | ||
|
||
# Run server | ||
$PYTHON_CMD $1 $2 $3 $4 $5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.