Skip to content

Commit 1e521f2

Browse files
committedMay 2, 2025·
Update
1 parent 7079003 commit 1e521f2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
 

‎intermediate_source/memory_format_tutorial.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,8 @@ def attribute(m):
359359

360360

361361
#############################
362-
#
363-
# The following code will wrap PyTorch functions to check if channels last
362+
# To debug which operators don't support channels last format, you could uncomment
363+
# the following code. This will wrap PyTorch functions to check if channels last
364364
# format is preserved through operations.
365365
#
366366
# attribute(torch.Tensor)
@@ -369,14 +369,14 @@ def attribute(m):
369369

370370
######################################################################
371371
# If you found an operator that doesn't support channels last tensors
372-
# and you want to contribute, feel free to use following developers
373-
# guide https://github.com/pytorch/pytorch/wiki/Writing-memory-format-aware-operators.
372+
# and you want to contribute, see following developers
373+
# `Writing Memory Format Aware Operators <https://github.com/pytorch/pytorch/wiki/Writing-memory-format-aware-operators>`__.
374374
#
375375

376376
######################################################################
377-
# Code below is to recover the attributes of torch.
377+
# The code below is to recover the attributes of torch.
378378
#
379-
#for (m, attrs) in old_attrs.items():
379+
# for (m, attrs) in old_attrs.items():
380380
# for (k, v) in attrs.items():
381381
# setattr(m, k, v)
382382

0 commit comments

Comments
 (0)
Please sign in to comment.