Created
June 11, 2024 13:49
-
-
Save ezyang/4a5138b11327335e618dd37ad2fd0a4e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/fbcode/caffe2/torch/_dynamo/convert_frame.py b/fbcode/caffe2/torch/_dynamo/convert_frame.py | |
--- a/fbcode/caffe2/torch/_dynamo/convert_frame.py | |
+++ b/fbcode/caffe2/torch/_dynamo/convert_frame.py | |
@@ -135,6 +135,8 @@ | |
initial_global_state: Optional[GlobalStateGuard] = None | |
+DEAD = False | |
+ | |
@functools.wraps(original_forward_from_src) | |
def fx_forward_from_src_skip_result(*args, **kwargs): | |
@@ -730,6 +732,12 @@ | |
return guarded_code | |
+ global DEAD | |
+ if DEAD or str(compile_id) in os.getenv("TORCHDYNAMO_SKIP_COMPILE_ID").split(","): | |
+ DEAD = True | |
+ log.warning("killing all subsequent compilations") | |
+ unimplemented("stubbed out") | |
+ | |
with compile_context(CompileContext(compile_id)): | |
# Check recompilations | |
recompile_reasons = None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment