mirror of
https://github.com/open-mmlab/mmdeploy.git
synced 2025-01-14 08:09:43 +08:00
* [Enhancement] Support vacc backend * update vacc wrapper * vacc docs * update vacc docs and remove some comments * update vacc backend configs * get vacc_det real output * Fix vacc: pre-commit run * fix pre-commit * update vacc quantize * update vacc docs. * update vacc docs. * [Fix]vacc wrapper and support set calib_num * add vacc_seg model_type * update vacc_det type * update vacc_det type * fix typo * [Fix] some typo * feats: update mmseg vacc sample * feats: update mmseg vacc sample * feats: update mmdet vacc sample * feats: update vacc quant_dataset func. * update vacc wrapper exit-code * update vacc segmentor setting * update vacc seg base_decode_head rewriter * fix vacc wrapper outputs
96 lines
1.6 KiB
Markdown
96 lines
1.6 KiB
Markdown
# VACC Backend
|
||
|
||
- cmake 3.10.0+
|
||
- gcc/g++ 7.5.0
|
||
- llvm 9.0.1
|
||
- ubuntu 18.04
|
||
|
||
## PCIE
|
||
|
||
### 1.package
|
||
|
||
- dkms (>=1.95)
|
||
- linux-headers
|
||
- dpkg (Ubuntu)
|
||
- rpm (CentOS)
|
||
- python2
|
||
- python3
|
||
|
||
Check if there is a vacc card:`lspci -d:0100`
|
||
|
||
1. Requirements
|
||
|
||
```bash
|
||
sudo apt-get install dkms dpkg python2 python3
|
||
```
|
||
|
||
2. install driver
|
||
|
||
```bash
|
||
sudo dpkg -i vastai-pci_xx.xx.xx.xx_xx.deb
|
||
```
|
||
|
||
3. Verify installation
|
||
|
||
```bash
|
||
dpkg --status vastai-pci-xxx
|
||
|
||
#output
|
||
Package: vastai-pci-dkms
|
||
Status: install ok installed
|
||
……
|
||
Version: xx.xx.xx.xx
|
||
Provides: vastai-pci-modules (= xx.xx.xx.xx)
|
||
Depends: dkms (>= 1.95)
|
||
Description: vastai-pci driver in DKMS format.
|
||
|
||
lsmod | grep vastai_pci
|
||
|
||
#output
|
||
vastai_pci xxx x
|
||
```
|
||
|
||
4. Upgrade driver
|
||
|
||
```bash
|
||
sudo dpkg -i vastai-pci_dkms_xx.xx.xx.xx_xx.deb
|
||
```
|
||
|
||
5. Uninstall driver
|
||
|
||
```bash
|
||
sudo dpkg -r vastai-pci_dkms_xx.xx.xx.xx_xx
|
||
```
|
||
|
||
### 2.reboot pcie
|
||
|
||
```bash
|
||
sudo chmod 666 /dev/kchar:0 && sudo echo reboot > /dev/kchar:0
|
||
```
|
||
|
||
## SDK
|
||
|
||
### step.1
|
||
|
||
```bash
|
||
pip install torch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0
|
||
pip install onnx==1.10.0 tqdm==4.64.1
|
||
pip install h5py==3.8.0
|
||
pip install decorator==5.1.1 scipy==1.7.3
|
||
```
|
||
|
||
### step.2
|
||
|
||
```bash
|
||
sudo vi ~/.bashrc
|
||
|
||
export VASTSTREAM_PIPELINE=true
|
||
export VACC_IRTEXT_ENABLE=1
|
||
export TVM_HOME="/opt/vastai/vaststream/tvm"
|
||
export VASTSTREAM_HOME="/opt/vastai/vaststream/vacl"
|
||
export LD_LIBRARY_PATH=$TVM_HOME/lib:$VASTSTREAM_HOME/lib
|
||
export PYTHONPATH=$TVM_HOME/python:$TVM_HOME/vacc/python:$TVM_HOME/topi/python:${PYTHONPATH}:$VASTSTREAM_HOME/python
|
||
|
||
source ~/.bashrc
|
||
```
|