Skip to content

Commit 42908bf

Browse files
committed
Reenable memory format tutorial
1 parent 222f291 commit 42908bf

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

.jenkins/validate_tutorials_built.py

-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
"intermediate_source/tensorboard_profiler_tutorial", # reenable after 2.0 release.
5353
"advanced_source/semi_structured_sparse", # reenable after 3303 is fixed.
5454
"intermediate_source/torchrec_intro_tutorial", # reenable after 3302 is fixe
55-
"intermediate_source/memory_format_tutorial", # causes other tutorials like torch_logs fail. "state" issue, reseting dynamo didn't help
5655
]
5756

5857
def tutorial_source_dirs() -> List[Path]:

intermediate_source/memory_format_tutorial.py

+12-8
Original file line numberDiff line numberDiff line change
@@ -358,10 +358,14 @@ def attribute(m):
358358
print(e)
359359

360360

361-
attribute(torch.Tensor)
362-
attribute(torch.nn.functional)
363-
attribute(torch)
364-
361+
#############################
362+
#
363+
# The following code will wrap PyTorch functions to check if channels last
364+
# format is preserved through operations.
365+
#
366+
# attribute(torch.Tensor)
367+
# attribute(torch.nn.functional)
368+
# attribute(torch)
365369

366370
######################################################################
367371
# If you found an operator that doesn't support channels last tensors
@@ -371,10 +375,10 @@ def attribute(m):
371375

372376
######################################################################
373377
# Code below is to recover the attributes of torch.
374-
375-
for (m, attrs) in old_attrs.items():
376-
for (k, v) in attrs.items():
377-
setattr(m, k, v)
378+
#
379+
#for (m, attrs) in old_attrs.items():
380+
# for (k, v) in attrs.items():
381+
# setattr(m, k, v)
378382

379383
######################################################################
380384
# Work to do

0 commit comments

Comments
 (0)