diff options
author | Roman Grundkiewicz <rgrundki@exseed.ed.ac.uk> | 2017-10-18 12:54:05 +0300 |
---|---|---|
committer | Roman Grundkiewicz <rgrundki@exseed.ed.ac.uk> | 2017-10-18 12:54:05 +0300 |
commit | ead97df31c92541725303b060214734713657a9b (patch) | |
tree | 21c23cbc34da0f12a4c915c2692345a8c910f57d | |
parent | 20ec5756e15ea2504cb14dbf726b676a0f238c97 (diff) |
Use CUDA_VISIBLE_DEVICES
-rw-r--r-- | README.md | 9 | ||||
-rw-r--r-- | models/wmt16_systems/marian.en-de.yml | 2 | ||||
-rwxr-xr-x | run_mrt.sh | 3 | ||||
-rw-r--r-- | tests/training/basic/test_toy.sh | 1 | ||||
-rw-r--r-- | tests/training/basic/test_translation_script.sh | 2 | ||||
-rw-r--r-- | tests/training/basic/test_valid_script.sh | 2 |
6 files changed, 11 insertions, 8 deletions
@@ -26,7 +26,7 @@ Each test consists of: ## Usage -Download models and compile tools: +Download data and compile tools: ``` make install @@ -44,6 +44,13 @@ or a specific group of tests, e.g.: ./run_mrt tests/translation ``` +To specify which GPU device should be used to run tests, set the +`CUDA_VISIBLE_DEVICES` variable, e.g.: + +``` +CUDA_VISIBLE_DEVICES=2 && ./run_mrt.sh +``` + ## TODO: * add a test for marian-server diff --git a/models/wmt16_systems/marian.en-de.yml b/models/wmt16_systems/marian.en-de.yml index fbe9f0b..8297662 100644 --- a/models/wmt16_systems/marian.en-de.yml +++ b/models/wmt16_systems/marian.en-de.yml @@ -6,6 +6,6 @@ dim-emb: 500 vocabs: - en-de/vocab.en.json - en-de/vocab.de.json -dim-vocabs: +dim-vocabs: - 85000 - 85000 @@ -13,9 +13,6 @@ export MRT_DATA=$MRT_ROOT/data export MRT_MARIAN_USE_CUDNN=$(cmake -L 2> /dev/null | grep -q -P "USE_CUDNN:BOOL=(ON|1)") -export MRT_GPUS=0 -export MRT_GPU=0 - prefix=tests if [ $# -ge 1 ]; then diff --git a/tests/training/basic/test_toy.sh b/tests/training/basic/test_toy.sh index b93d095..d593a0f 100644 --- a/tests/training/basic/test_toy.sh +++ b/tests/training/basic/test_toy.sh @@ -8,7 +8,6 @@ mkdir -p toy rm -f toy/* toy.log $MRT_MARIAN/build/marian \ - -d $MRT_GPU \ -m toy/model.npz \ -t $MRT_DATA/europarl.de-en/toy.bpe.en $MRT_DATA/europarl.de-en/toy.bpe.de \ -v toy/vocab.en.yml toy/vocab.de.yml \ diff --git a/tests/training/basic/test_translation_script.sh b/tests/training/basic/test_translation_script.sh index 547d14a..298ca72 100644 --- a/tests/training/basic/test_translation_script.sh +++ b/tests/training/basic/test_translation_script.sh @@ -7,7 +7,7 @@ set -e rm -rf trans trans.log trans_script.temp mkdir -p trans -$MRT_MARIAN/build/marian -d $MRT_GPU \ +$MRT_MARIAN/build/marian \ --no-shuffle \ -m trans/model.npz \ -t $MRT_DATA/europarl.de-en/corpus.bpe.en $MRT_DATA/europarl.de-en/corpus.bpe.de \ diff --git a/tests/training/basic/test_valid_script.sh b/tests/training/basic/test_valid_script.sh index 17e0aa4..352aac9 100644 --- a/tests/training/basic/test_valid_script.sh +++ b/tests/training/basic/test_valid_script.sh @@ -7,7 +7,7 @@ set -e rm -rf valid valid.log valid_script.temp mkdir -p valid -$MRT_MARIAN/build/marian -d $MRT_GPU \ +$MRT_MARIAN/build/marian \ --no-shuffle \ -m valid/model.npz \ -t $MRT_DATA/europarl.de-en/corpus.bpe.en $MRT_DATA/europarl.de-en/corpus.bpe.de \ |