- Installing DRP-AI TVM1 (RZ/V2L, RZ/V2M, RZ/V2MA)
- Installing DRP-AI TVM1 with Docker (RZ/V2L, RZ/V2M, RZ/V2MA)
- About RZ/V2H, see here.
Requirements are listed below.
- OS : Ubuntu 20.04
- Python : 3.8
- Package : git
- Evaluation Board: RZ/V2L EVK, RZ/V2M EVK, RZ/V2MA EVK
- Related Software Version:
- DRP-AI Translator V1.85 or lator
- RZ/V2L
- RZ/V2M, RZ/V2MA
- RZ/V Verified Linux Package V3.0.4 or lator
- DRP-AI Support Package V7.40 or lator RZ/V2L RZ/V2M RZ/V2MA
To install DRP-AI TVM1 without Docker, see Installing DRP-AI TVM1.
To install DRP-AI TVM1 with Docker, see Installing DRP-AI TVM1 with Docker.
Installing DRP-AI TVM1 (RZ/V2L, RZ/V2M, RZ/V2MA)
Before installing DRP-AI TVM1, please follow the instruction below to install the software listed in Requirements.
Download the DRP-AI Translator from the Software section in DRP-AI and install it by following the User's Manual as shown below.
./DRP-AI_Translator-v*-Linux-x86_64-Install
export TRANSLATOR=${PWD}/drp-ai_translator_release/
- Download the RZ/V2L AI SDK from Renesas Web Page.
- Unzip SDK.
apt update
apt install -y unzip
unzip RTK0EF0160F0*SJ.zip */poky*sh
chmod a+x ./ai_sdk_setup/poky-glibc-x86_64-core-image-weston-aarch64-smarc-rzv2l-toolchain-*.sh
- Install SDK.
./ai_sdk_setup/poky-glibc-x86_64-core-image-weston-aarch64-smarc-rzv2l-toolchain-*.sh -y
-
Download the DRP-AI Support Package from Renesas Web Page.
To use the DRP-AI Support Package, Linux Package is required.
Linux Package can be found in the page of DRP-AI Support Package. -
Build image/SDK according to the DRP-AI Support Package Release Note to generate following files.
Name Filename Usage SDK Installer poky-*.sh Used when compiling model and building the application. Kernel Image Image-*.bin Used when booting kernel on the RZ/V evaluation board. Device Tree File *.dtb Used when booting kernel on the RZ/V evaluation board. Root Filesystem *.tar.bz2 Used when booting kernel on the RZ/V evaluation board. Bootloaders i.e., .bin, .srec See Linux Package Release Note for more details.
Used when booting the RZ/V evaluation board. -
Install SDK using poky-*.sh according to the DRP-AI Support Package Release Note.
apt update
apt install -y git
git clone --recursive https://github.com/renesas-rz/rzv_drp-ai_tvm.git drp-ai_tvm
Run the following commands to set environment variables. Note that environment variables must be set every time when opening the terminal.
export TVM_ROOT=$PWD/drp-ai_tvm # or path to your own cloned
export TVM_HOME=${TVM_ROOT}/tvm
export PYTHONPATH=$TVM_HOME/python:${PYTHONPATH}
export SDK=/opt/poky/3.1.31/ # Your own Linux SDK path.
export PRODUCT=V2L # Product name (V2L, V2M, or V2MA)
Please set the values in the table below to the PRODUCT variables according to Renesas Evaluation Board Kit you use.
Renesas Evaluation Board Kit | PRODUCT |
---|---|
RZ/V2L Evaluation Board Kit | V2L |
RZ/V2M Evaluation Board Kit | V2M |
RZ/V2MA Evaluation Board Kit | V2MA |
# Install packagess
apt update
DEBIAN_FRONTEND=noninteractive apt install -y software-properties-common
add-apt-repository ppa:ubuntu-toolchain-r/test
apt update
DEBIAN_FRONTEND=noninteractive apt install -y build-essential cmake \
libomp-dev libgtest-dev libgoogle-glog-dev libtinfo-dev zlib1g-dev libedit-dev \
libxml2-dev llvm-8-dev g++-9 gcc-9 wget
pip3 install decorator attrs scipy numpy==1.23.5 pytest
pip3 install torch==1.8.0 torchvision==0.9.0 --index-url https://download.pytorch.org/whl/cpu
pip3 install tensorflow tflite psutil typing-extensions==4.5.0
pip3 install onnxruntime==1.18.1
# Install onnx runtime
wget https://github.com/microsoft/onnxruntime/releases/download/v1.18.1/onnxruntime-linux-x64-1.18.1.tgz -O /tmp/onnxruntime.tar.gz
tar -xvzf /tmp/onnxruntime.tar.gz -C /tmp/
mv /tmp/onnxruntime-linux-x64-1.18.1/ /opt/
5. Setup DRP-AI TVM1 environment
cd ${TVM_ROOT}
bash setup/make_drp_env.sh
Installing DRP-AI TVM1 with Docker (RZ/V2L, RZ/V2M, RZ/V2MA)
Before installing DRP-AI TVM1 with Docker, please prepare the following files in the working directory.
- DRP-AI_Translator-v*-Linux-x86_64-Install (DRP-AI Translator installer)
- poky*.sh (SDK installer)
Please refer to the following link for information on how to prepare the SDK installer.
wget https://raw.githubusercontent.com/renesas-rz/rzv_drp-ai_tvm/main/Dockerfile
docker build -t drp-ai_tvm_v2l_image_${USER} --build-arg PRODUCT="V2L" .
#V2M/MA
#docker build -t drp-ai_tvm_v2m_image_${USER} --build-arg PRODUCT="V2M" .
#docker build -t drp-ai_tvm_v2ma_image_${USER} --build-arg PRODUCT="V2MA" .
Please set the values in the table below to the PRODUCT variables according to Renesas Evaluation Board Kit you use.
Renesas Evaluation Board Kit | PRODUCT |
---|---|
RZ/V2L Evaluation Board Kit | V2L |
RZ/V2M Evaluation Board Kit | V2M |
RZ/V2MA Evaluation Board Kit | V2MA |
mkdir data
docker run -it --name drp-ai_tvm_v2l_container_${USER} -v $(pwd)/data:/drp-ai_tvm/data drp-ai_tvm_v2l_image_${USER}
The local $(pwd)/data
is mounted to /drp-ai_tvm/data
on the Docker container by the above command option.
For example, you can use this directory to copy files created on the Docker container to your local environment.