check_symbol.sh 387 字节
Newer Older
chen.zhiyu's avatar
chen.zhiyu 已提交
1
#!/bin/sh
T
tensor-tang 已提交
2

I
iducn 已提交
3 4
lib=$1
if [ $# -ne 1 ]; then echo "No input library"; exit -1 ; fi
T
tensor-tang 已提交
5

I
iducn 已提交
6 7
num_paddle_syms=$(nm -D ${lib} | grep paddle | wc -l)
num_google_syms=$(nm -D ${lib} | grep google | grep -v paddle | grep "T " | wc -l)
T
tensor-tang 已提交
8

I
iducn 已提交
9 10
if [ $num_paddle_syms -le 0 ]; then echo "Have no paddle symbols"; exit -1 ; fi
if [ $num_google_syms -ge 1 ]; then echo "Have some google symbols"; exit -1 ; fi
T
tensor-tang 已提交
11 12

exit 0