From 726b4329668013a786c86958ecb175d615d4d551 Mon Sep 17 00:00:00 2001 From: BJ Hargrave Date: Tue, 9 Jan 2024 14:04:53 -0500 Subject: [PATCH] Update dynamo-workflow.svg Fix misspelling of "gaurd". --- docs/_static/images/dynamo-workflow.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_static/images/dynamo-workflow.svg b/docs/_static/images/dynamo-workflow.svg index f91b4c76..a851d5f0 100644 --- a/docs/_static/images/dynamo-workflow.svg +++ b/docs/_static/images/dynamo-workflow.svg @@ -1 +1 @@ -SourceCodedeffunction(inputs):x = inputs["x"]y = inputs["y"]x = x.cos().cos()ifx.mean() > 0.5:x = x / 1.1returnx * yPythonBytecodeAnalysisThefirstoperationthatrequiresthevalueofatensor,butcannotberepresentedingraph.Pythonoperation(notrelatedtotensor computation)PyTorchoperations(puretensorcomputation)resumefunction10 LOAD_FAST 0 (inputs)2 LOAD_CONST 1 ('x')4 BINARY_SUBSCR6 STORE_FAST 1 (x)8 LOAD_FAST 0 (inputs)10 LOAD_CONST 2 ('y')12 BINARY_SUBSCR14 STORE_FAST 2 (y)16 LOAD_FAST 1 (x)18 LOAD_METHOD 0 (cos)20 CALL_METHOD 022 LOAD_METHOD 0 (cos)24 CALL_METHOD 026 STORE_FAST 1 (x)28 LOAD_FAST 1 (x)30 LOAD_METHOD 1 (mean)32 CALL_METHOD 034 LOAD_CONST 3 (0.5)36 COMPARE_OP 4 (>)38 POP_JUMP_IF_FALSE 24 (to 48)40 LOAD_FAST 1 (x)42 LOAD_CONST 4 (1.1)44 BINARY_TRUE_DIVIDE46 STORE_FAST 1 (x)48 LOAD_FAST 1 (x)50 LOAD_FAST 2 (y)52 BINARY_MULTIPLY54 RETURN_VALUE5resumefunction2def__compiled_fn_0(x, y):cos = x.cos()x_1 = cos.cos()mean = x_1.mean()gt= mean > 0.5returny, x_1, gtCapturedComputationGraphrecursivelytriggerbytecodeanalysisPyTorchCompilerWorkflowcallresume functions0 LOAD_GLOBAL 2 (__compiled_fn_0)2 LOAD_FAST 0 (inputs)4 LOAD_CONST 1 ('x')6 BINARY_SUBSCR8 LOAD_FAST 0 (inputs)10 LOAD_CONST 2 ('y')12 BINARY_SUBSCR14 CALL_FUNCTION 216 UNPACK_SEQUENCE318 STORE_FAST 2 (y)20 STORE_FAST 1 (x)22 POP_JUMP_IF_FALSE17 (to 34)24 LOAD_GLOBAL 3 (__resume_at_40_1)26 LOAD_FAST 1 (x)28 LOAD_FAST 2 (y)30 CALL_FUNCTION 232 RETURN_VALUE34 LOAD_GLOBAL 4 (__resume_at_48_2)36 LOAD_FAST 1 (x)38 LOAD_FAST 2 (y)40 CALL_FUNCTION 242 RETURN_VALUETransformedBytecodeexecute pythonoperation and callcomputation graph>>>>Resume Functions0 JUMP_ABSOLUTE 25 (to 50)2 LOAD_FAST 2 (inputs)4 LOAD_CONST 1 ('x')6 BINARY_SUBSCR........50 LOAD_FAST 0 (x)52 LOAD_FAST 1 (y)54 BINARY_MULTIPLY56 RETURN_VALUE__resume_at_48_20 JUMP_ABSOLUTE 21 (to 42)2 LOAD_FAST 2 (inputs)4 LOAD_CONST 1 ('x')6 BINARY_SUBSCR...…42 LOAD_FAST 0 (x)44 LOAD_CONST 4 (1.1)46 BINARY_TRUE_DIVIDE48 STORE_FAST 0 (x)50 LOAD_FAST 0 (x)52 LOAD_FAST 1 (y)54 BINARY_MULTIPLY56 RETURN_VALUE__resume_at_40_1>>>>>>Inputinputs:x: torch.Tensory: torch.Tensorgenerate guardbasedonbytecode and inputdefgaurd(inputs): return conditionsGuardguardon device/dtypeshape of x and yifgaurd(inputs): \ No newline at end of file +SourceCodedeffunction(inputs):x = inputs["x"]y = inputs["y"]x = x.cos().cos()ifx.mean() > 0.5:x = x / 1.1returnx * yPythonBytecodeAnalysisThefirstoperationthatrequiresthevalueofatensor,butcannotberepresentedingraph.Pythonoperation(notrelatedtotensor computation)PyTorchoperations(puretensorcomputation)resumefunction10 LOAD_FAST 0 (inputs)2 LOAD_CONST 1 ('x')4 BINARY_SUBSCR6 STORE_FAST 1 (x)8 LOAD_FAST 0 (inputs)10 LOAD_CONST 2 ('y')12 BINARY_SUBSCR14 STORE_FAST 2 (y)16 LOAD_FAST 1 (x)18 LOAD_METHOD 0 (cos)20 CALL_METHOD 022 LOAD_METHOD 0 (cos)24 CALL_METHOD 026 STORE_FAST 1 (x)28 LOAD_FAST 1 (x)30 LOAD_METHOD 1 (mean)32 CALL_METHOD 034 LOAD_CONST 3 (0.5)36 COMPARE_OP 4 (>)38 POP_JUMP_IF_FALSE 24 (to 48)40 LOAD_FAST 1 (x)42 LOAD_CONST 4 (1.1)44 BINARY_TRUE_DIVIDE46 STORE_FAST 1 (x)48 LOAD_FAST 1 (x)50 LOAD_FAST 2 (y)52 BINARY_MULTIPLY54 RETURN_VALUE5resumefunction2def__compiled_fn_0(x, y):cos = x.cos()x_1 = cos.cos()mean = x_1.mean()gt= mean > 0.5returny, x_1, gtCapturedComputationGraphrecursivelytriggerbytecodeanalysisPyTorchCompilerWorkflowcallresume functions0 LOAD_GLOBAL 2 (__compiled_fn_0)2 LOAD_FAST 0 (inputs)4 LOAD_CONST 1 ('x')6 BINARY_SUBSCR8 LOAD_FAST 0 (inputs)10 LOAD_CONST 2 ('y')12 BINARY_SUBSCR14 CALL_FUNCTION 216 UNPACK_SEQUENCE318 STORE_FAST 2 (y)20 STORE_FAST 1 (x)22 POP_JUMP_IF_FALSE17 (to 34)24 LOAD_GLOBAL 3 (__resume_at_40_1)26 LOAD_FAST 1 (x)28 LOAD_FAST 2 (y)30 CALL_FUNCTION 232 RETURN_VALUE34 LOAD_GLOBAL 4 (__resume_at_48_2)36 LOAD_FAST 1 (x)38 LOAD_FAST 2 (y)40 CALL_FUNCTION 242 RETURN_VALUETransformedBytecodeexecute pythonoperation and callcomputation graph>>>>Resume Functions0 JUMP_ABSOLUTE 25 (to 50)2 LOAD_FAST 2 (inputs)4 LOAD_CONST 1 ('x')6 BINARY_SUBSCR........50 LOAD_FAST 0 (x)52 LOAD_FAST 1 (y)54 BINARY_MULTIPLY56 RETURN_VALUE__resume_at_48_20 JUMP_ABSOLUTE 21 (to 42)2 LOAD_FAST 2 (inputs)4 LOAD_CONST 1 ('x')6 BINARY_SUBSCR...…42 LOAD_FAST 0 (x)44 LOAD_CONST 4 (1.1)46 BINARY_TRUE_DIVIDE48 STORE_FAST 0 (x)50 LOAD_FAST 0 (x)52 LOAD_FAST 1 (y)54 BINARY_MULTIPLY56 RETURN_VALUE__resume_at_40_1>>>>>>Inputinputs:x: torch.Tensory: torch.Tensorgenerate guardbasedonbytecode and inputdefguard(inputs): return conditionsGuardguardon device/dtypeshape of x and yifguard(inputs):