diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..1635a2e --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,39 @@ +# +trigger: + paths: + exclude: + - docs +jobs: + - job: Fairseq_unittests + timeoutInMinutes: 360 + #pool: + # vmImage: 'ubuntu-18.04' + pool: + name: default + demands: + - agent.name -equals gpu4 + steps: + - script: | + #set up docker + sudo docker run --gpus all --network=host --privileged -w '/root' --shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 adsbrainwestus2.azurecr.io/fastseq:dev-py3 /bin/bash + #install fastseq + pip install --editable . + + #show environment + which python + python --version + which nvcc + nvcc --version + which fastseq + python -c "import torch; print('torch:', torch.__version__, torch)" + python -c "import torch; print('CUDA available:', torch.cuda.is_available())" + python -c "import fastseq; print('fastseq:', fastseq.__version__)" + + #run unit tests + CUDA_VISIBLE_DEVICES=3 bash tests/run_fairseq_tests.sh + CUDA_VISIBLE_DEVICES=3 bash tests/run_transformers_tests.sh + + #run benchmarks + #cd benchmarks/ + #CUDA_VISIBLE_DEVICES=3 run_all_benchmarks.sh + displayName: 'setup environment and run fairseq unit tests' diff --git a/fastseq/optimizer/fairseq/beam_search_optimizer_v1.py b/fastseq/optimizer/fairseq/beam_search_optimizer_v1.py index 83adba4..36ce041 100644 --- a/fastseq/optimizer/fairseq/beam_search_optimizer_v1.py +++ b/fastseq/optimizer/fairseq/beam_search_optimizer_v1.py @@ -53,7 +53,7 @@ class MultiheadAttentionV2(MultiheadAttention): """ def __init__(self, - embed_dim, + embed_dim__, num_heads, kdim=None, vdim=None,