diff --git a/.ci/docker/requirements.txt b/.ci/docker/requirements.txt index 56df738f96..c032835633 100644 --- a/.ci/docker/requirements.txt +++ b/.ci/docker/requirements.txt @@ -14,7 +14,7 @@ tqdm==4.66.1 numpy==1.24.4 matplotlib librosa -torch==2.5 +torch==2.6 torchvision torchdata networkx @@ -70,4 +70,4 @@ semilearn==0.3.2 torchao==0.5.0 segment_anything==1.0 torchrec==1.0.0; platform_system == "Linux" -fbgemm-gpu==1.0.0; platform_system == "Linux" +fbgemm-gpu==1.1.0; platform_system == "Linux" diff --git a/.jenkins/build.sh b/.jenkins/build.sh index 8eca78ae34..4a869d35a7 100755 --- a/.jenkins/build.sh +++ b/.jenkins/build.sh @@ -22,10 +22,10 @@ sudo apt-get install -y pandoc #Install PyTorch Nightly for test. # Nightly - pip install --pre torch torchvision torchaudio -f https://download.pytorch.org/whl/nightly/cu102/torch_nightly.html # Install 2.5 to merge all 2.4 PRs - uncomment to install nightly binaries (update the version as needed). -sudo pip uninstall -y torch torchvision torchaudio torchtext torchdata -sudo pip3 install torch==2.6.0 torchvision --no-cache-dir --index-url https://download.pytorch.org/whl/test/cu124 -sudo pip uninstall -y fbgemm-gpu torchrec -sudo pip3 install fbgemm-gpu==1.1.0 torchrec==1.0.0 --no-cache-dir --index-url https://download.pytorch.org/whl/test/cu124 +# sudo pip uninstall -y torch torchvision torchaudio torchtext torchdata +# sudo pip3 install torch==2.6.0 torchvision --no-cache-dir --index-url https://download.pytorch.org/whl/test/cu124 +# sudo pip uninstall -y fbgemm-gpu torchrec +# sudo pip3 install fbgemm-gpu==1.1.0 torchrec==1.0.0 --no-cache-dir --index-url https://download.pytorch.org/whl/test/cu124 # Install two language tokenizers for Translation with TorchText tutorial python -m spacy download en_core_web_sm diff --git a/intermediate_source/transformer_building_blocks.py b/intermediate_source/transformer_building_blocks.py index 7d2c67356e..36b2019f19 100644 --- a/intermediate_source/transformer_building_blocks.py +++ b/intermediate_source/transformer_building_blocks.py @@ -3,8 +3,6 @@ ============================================================================================================= **Author:** `Mikayla Gawarecki `_ -.. note:: - This tutorial currently requires you to use the PyTorch nightly build. .. grid:: 2 diff --git a/recipes_source/recipes/amp_recipe.py b/recipes_source/recipes/amp_recipe.py index b8a4d94233..91ce19a93a 100644 --- a/recipes_source/recipes/amp_recipe.py +++ b/recipes_source/recipes/amp_recipe.py @@ -150,7 +150,7 @@ def make_model(in_size, out_size, num_layers): # The same ``GradScaler`` instance should be used for the entire convergence run. # If you perform multiple convergence runs in the same script, each run should use # a dedicated fresh ``GradScaler`` instance. ``GradScaler`` instances are lightweight. -scaler = torch.cuda.amp.GradScaler() +scaler = torch.amp.GradScaler("cuda") for epoch in range(0): # 0 epochs, this section is for illustration only for input, target in zip(data, targets): @@ -182,7 +182,7 @@ def make_model(in_size, out_size, num_layers): net = make_model(in_size, out_size, num_layers) opt = torch.optim.SGD(net.parameters(), lr=0.001) -scaler = torch.cuda.amp.GradScaler(enabled=use_amp) +scaler = torch.amp.GradScaler("cuda" ,enabled=use_amp) start_timer() for epoch in range(epochs):