Skip to content

Commit 218fffe

Browse files
ezyangfacebook-github-bot
authored andcommitted
Add VariableTracker.debug_repr (#126299)
Summary: Now you can print arbitrary values at compile time with comptime.print() Signed-off-by: Edward Z. Yang <[email protected]> X-link: pytorch/pytorch#126299 Approved by: https://github.com/jansel ghstack dependencies: #126292 Reviewed By: huydhn Differential Revision: D57421156 Pulled By: ezyang fbshipit-source-id: a75045a564722baa243b1381a324bc9f6c061ff1
1 parent c7d12c1 commit 218fffe

File tree

1 file changed

+8
-0
lines changed
  • userbenchmark/dynamo/dynamobench/_dynamo

1 file changed

+8
-0
lines changed

userbenchmark/dynamo/dynamobench/_dynamo/utils.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2642,3 +2642,11 @@ def get_locals_to_steal(maybe_gm):
26422642

26432643
def set_locals_to_steal(gm, locals_to_steal):
26442644
gm.meta["locals_to_steal"] = locals_to_steal
2645+
2646+
2647+
class Lit:
2648+
def __init__(self, s):
2649+
self.s = s
2650+
2651+
def __repr__(self):
2652+
return self.s

0 commit comments

Comments
 (0)