Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -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'
2 changes: 1 addition & 1 deletion fastseq/optimizer/fairseq/beam_search_optimizer_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class MultiheadAttentionV2(MultiheadAttention):
"""

def __init__(self,
embed_dim,
embed_dim__,
num_heads,
kdim=None,
vdim=None,
Expand Down