|
a |
|
b/scripts/benchmark.sh |
|
|
1 |
#!/bin/bash |
|
|
2 |
|
|
|
3 |
set -e |
|
|
4 |
|
|
|
5 |
export CUDA_VISIBLE_DEVICES=0 |
|
|
6 |
# Smaller batch size so that sequences with Flair embeddings fit in GPU memory. |
|
|
7 |
python -m scripts.benchmark benchmark_gpu \ |
|
|
8 |
--bilstmcrf_large_batch_size 64 \ |
|
|
9 |
--bilstmcrf_fast_batch_size 64 |
|
|
10 |
|
|
|
11 |
export CUDA_VISIBLE_DEVICES="" |
|
|
12 |
export MKL_NUM_THREADS=32 |
|
|
13 |
python -m scripts.benchmark benchmark_cpu_32_threads |
|
|
14 |
|
|
|
15 |
export CUDA_VISIBLE_DEVICES="" |
|
|
16 |
export MKL_NUM_THREADS=16 |
|
|
17 |
python -m scripts.benchmark benchmark_cpu_16_threads |
|
|
18 |
|
|
|
19 |
export CUDA_VISIBLE_DEVICES="" |
|
|
20 |
export MKL_NUM_THREADS=8 |
|
|
21 |
python -m scripts.benchmark benchmark_cpu_8_threads |