Skip to content

Commit

Permalink
Merge branch 'main' into titaiwang/dynamo_true_api
Browse files Browse the repository at this point in the history
  • Loading branch information
svekars authored Feb 3, 2025
2 parents 1cf9731 + 13d365c commit d3bb7e7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .ci/docker/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ tqdm==4.66.1
numpy==1.24.4
matplotlib
librosa
torch==2.5
torch==2.6
torchvision
torchdata
networkx
Expand Down Expand Up @@ -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"
8 changes: 4 additions & 4 deletions .jenkins/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions intermediate_source/transformer_building_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
=============================================================================================================
**Author:** `Mikayla Gawarecki <https://github.com/mikaylagawarecki>`_
.. note::
This tutorial currently requires you to use the PyTorch nightly build.
.. grid:: 2
Expand Down
4 changes: 2 additions & 2 deletions recipes_source/recipes/amp_recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit d3bb7e7

Please sign in to comment.