Skip to content

Commit 5186143

Browse files
williamwen42facebook-github-bot
authored andcommitted
add dynamo disable reasons to codebase (#150440)
Summary: X-link: pytorch/pytorch#150440 Approved by: https://github.com/jansel, https://github.com/zou3519 ghstack dependencies: #150341 Reviewed By: clee2000 Differential Revision: D72319996 fbshipit-source-id: 8fb31c5c15b0190c5770d1d502bc10eabf314421
1 parent 8fae8cc commit 5186143

File tree

1 file changed

+9
-3
lines changed
  • userbenchmark/dynamo/dynamobench/_dynamo

1 file changed

+9
-3
lines changed

userbenchmark/dynamo/dynamobench/_dynamo/utils.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4371,23 +4371,29 @@ def does_not_override_dict_iter_methods(user_cls):
43714371
# compiled bytecode
43724372
# They will be skipped which is the desired result
43734373
def call_size(x, i):
4374-
@torch._dynamo.disable(recursive=True)
4374+
@torch._dynamo.disable(
4375+
recursive=True, reason="__torch_function__ tracing helper function"
4376+
)
43754377
def fn(x, i):
43764378
return x.size(i)
43774379

43784380
return fn(x, i)
43794381

43804382

43814383
def call_stride(x, i):
4382-
@torch._dynamo.disable(recursive=True)
4384+
@torch._dynamo.disable(
4385+
recursive=True, reason="__torch_function__ tracing helper function"
4386+
)
43834387
def fn(x, i):
43844388
return x.stride(i)
43854389

43864390
return fn(x, i)
43874391

43884392

43894393
def call_storage_offset(x):
4390-
@torch._dynamo.disable(recursive=True)
4394+
@torch._dynamo.disable(
4395+
recursive=True, reason="__torch_function__ tracing helper function"
4396+
)
43914397
def fn(x):
43924398
return x.storage_offset()
43934399

0 commit comments

Comments
 (0)