Commit d42788f0 authored by zhuwenwen's avatar zhuwenwen
Browse files

modify cpp_benchmark.sh

parent aa9b300a
...@@ -33,20 +33,21 @@ echo -e "| model size | Batch Size | Input length | Output length | Decode value ...@@ -33,20 +33,21 @@ echo -e "| model size | Batch Size | Input length | Output length | Decode value
echo -e "|:----------:|:----------:|:------------:|:-------------:|:------------:|:---------:|:---------------:|" >> $all_log echo -e "|:----------:|:----------:|:------------:|:-------------:|:------------:|:---------:|:---------------:|" >> $all_log
cat /proc/cpuinfo > ${logdir}/cpuinfo.txt cat /proc/cpuinfo > ${logdir}/cpuinfo.txt
nvidia-smi > ${logdir}/gpuinfo.txt rocm-smi > ${logdir}/gpuinfo.txt
for model_size in "345m" "5b"; # for model_size in "345m" "5b";
for model_size in "345m";
do do
if [ "$model_size" = "345m" ]; then if [ "$model_size" = "345m" ]; then
head_num=16 head_num=16
size_per_head=64 size_per_head=64
inter_size=$(echo "scale=2; $head_num * ${size_per_head} * 4 " | bc) inter_size=$(echo "scale=2; $head_num * ${size_per_head} * 4 " | bc)
num_layer=24 num_layer=24
elif [ "$model_size" = "5b" ]; then # elif [ "$model_size" = "5b" ]; then
head_num=32 # head_num=32
size_per_head=128 # size_per_head=128
inter_size=$(echo "scale=2; $head_num * ${size_per_head} * 4 " | bc) # inter_size=$(echo "scale=2; $head_num * ${size_per_head} * 4 " | bc)
num_layer=24 # num_layer=24
fi fi
for decode_type in "beamsearch" "sampling"; for decode_type in "beamsearch" "sampling";
...@@ -93,7 +94,7 @@ python ../examples/pytorch/gpt/utils/generate_gpt_config.py \ ...@@ -93,7 +94,7 @@ python ../examples/pytorch/gpt/utils/generate_gpt_config.py \
--size_per_head ${size_per_head} \ --size_per_head ${size_per_head} \
--inter_size ${inter_size} \ --inter_size ${inter_size} \
--num_layer ${num_layer} \ --num_layer ${num_layer} \
-v 51200 \ -v 50304 \
-d fp16 \ -d fp16 \
-topk ${topk} \ -topk ${topk} \
-topp ${topp} \ -topp ${topp} \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment