diff options
author | Roman Grundkiewicz <rgrundki@ex.ed.ac.uk> | 2018-07-31 13:41:02 +0300 |
---|---|---|
committer | Roman Grundkiewicz <rgrundki@ex.ed.ac.uk> | 2018-07-31 13:41:02 +0300 |
commit | e5db8258e97ccf7b487f09add3d64398cbdf22ad (patch) | |
tree | 246c1ffd375c46ceea96ae6244556df62d2cc133 | |
parent | 469f9d31bce8683601b022c3a8c4f2c591ade211 (diff) |
Update Makefile
-rw-r--r-- | Makefile | 24 | ||||
-rw-r--r-- | README.md | 6 |
2 files changed, 17 insertions, 13 deletions
@@ -6,34 +6,29 @@ GIT_MOSES_SCRIPTS=http://github.com/marian-nmt/moses-scripts.git GIT_SUBWORD_NMT=http://github.com/rsennrich/subword-nmt.git BRANCH=master -CUDA_DIR=/usr/local/cuda-9.2 +CUDA=/usr/local/cuda CUDNN=off -CMAKE_FLAGS=-DCUDA_TOOLKIT_ROOT_DIR=$(CUDA_DIR) -DUSE_CUDNN=$(CUDNN) +CMAKE_FLAGS=-DCUDA_TOOLKIT_ROOT_DIR=$(CUDA) -DUSE_CUDNN=$(CUDNN) -DCMAKE_BUILD_TYPE=Release PIP_PACKAGES=websocket-client pyyaml -.PHONY: tools/marian install tools models data run +.PHONY: marian install tools models data run .SECONDARY: ##################################################################### -install: tools tools/marian models data - -run: install +run: install marian bash ./run_mrt.sh +install: tools models data + tools: git -C $@/moses-scripts pull || git clone $(GIT_MOSES_SCRIPTS) $@/moses-scripts git -C $@/subword-nmt pull || git clone $(GIT_SUBWORD_NMT) $@/subword-nmt pip3 install --user $(PIP_PACKAGES) -tools/marian: - git -C $@ pull || git clone $(GIT_MARIAN_DEV) -b $(BRANCH) $@ - rm -rf $@/build - mkdir -p $@/build && cd $@/build && cmake .. -DCOMPILE_EXAMPLES=ON $(CMAKE_FLAGS) && make -j$(THREADS) - models: mkdir -p $@ cd $@ && bash ./download-wmt16.sh @@ -44,3 +39,10 @@ models: data: mkdir -p $@ cd $@ && bash ./download-data.sh + +marian: tools/marian +tools/marian: + git -C $@ pull || git clone $(GIT_MARIAN_DEV) -b $(BRANCH) $@ + rm -rf $@/build + mkdir -p $@/build && cd $@/build && cmake .. -DCOMPILE_EXAMPLES=ON $(CMAKE_FLAGS) && make -j$(THREADS) + @@ -27,15 +27,17 @@ Each test consists of: ## Usage -Download data and compile tools: +Download data and tools, compile Marian, and run tests: make install + make marian + make run Run single-GPU regression tests: ./run_mrt.sh -or including multi-GPU tests: +or include multi-GPU tests: CUDA_VISIBLE_DEVICES=0,1 ./run_mrt.sh |