Commit 475ba1d
Expliclty avoid recording when should_record_events is false in record_shapeenv_event (pytorch#138965)
Looking at the function record_shapeenv_event its hard to tell that it does not always run
but we do disable it by setting top level is_recording to True self.should_record_events is false
this makes it more explicit to avoid confusion and overloading is_recording.
alternativley we can rename is_recording to do_no_record.
Pull Request resolved: pytorch#138965
Approved by: https://github.com/ezyang
ghstack dependencies: pytorch#1388041 parent a688c57 commit 475ba1d
2 files changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | | - | |
| 256 | + | |
| 257 | + | |
257 | 258 | | |
258 | 259 | | |
259 | 260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2918 | 2918 | | |
2919 | 2919 | | |
2920 | 2920 | | |
2921 | | - | |
| 2921 | + | |
2922 | 2922 | | |
2923 | 2923 | | |
2924 | 2924 | | |
| |||
0 commit comments