Skip to content

OP benchmark 调试手册

GaoWei8 edited this page Dec 18, 2020 · 15 revisions

一. 环境准备

1.拉取benchmark代码库:​

$ git clone https://github.com/PaddlePaddle/benchmark.git​

2.启动镜像​

$ cd benchmark​
$ nvidia-docker run -it --net=host --privileged --rm -v $(pwd):/home/benchmark paddlepaddle/paddle:latest-dev-cuda10.1-cudnn7-gcc82 /bin/bash​

3.切换python版本​

$ export PATH=/usr/local/bin:${PATH}​
$ ln -fs /usr/local/bin/python3.7 /usr/local/bin/python​
$ ln -fs /usr/local/bin/pip3.7 /usr/local/bin/pip​
$ pip install –U pip​

4.安装Paddle​

$ wget -q https://paddle-wheel.bj.bcebos.com/0.0.0-gpu-cuda10-cudnn7-mkl/paddlepaddle_gpu-0.0.0-cp37-cp37m-linux_x86_64.whl​
$ pip install paddlepaddle_gpu-0.0.0-cp37-cp37m-linux_x86_64.whl​

5.安装tensorflow​

$ pip install tensorflow==2.3.0​

二. 如何测试OP精度

OP精度测试

  • 进入benchmark/api/tests_v2路径下执行命令
$ bash run.sh api_name config_id

*api_name: 将要测试的OP名字

  • config_id :使用 benchmark/api/tests_v2/configs/OP.json 中第几个配置,默认为第0

例子:

$ bash run.sh abs 0
Clone this wiki locally