Dynamo.explain() output

I just wonder that what is the meaning of _compile.compile_inner.
I mean I wonder what _compile.compile_inner is related to.
The _compile.compile_inner time is on very bottom of this page.

My code is under here.

import torch
from torch import _dynamo as dynamo

def toy_example(a, b):
    x = a/(torch.abs(a) + 1)
    print("wow")
    print(b.sum())
    print("good")
    if b.sum() < 0:
        b = b * -1
        print("wowowow")
        print(b.sum()> 0)
    if b.sum() == 0:
        b = b + 1
        print("wowowowo")
    print("great")
    return x * b


explanation = dynamo.explain(toy_example)(torch.randn(5), torch.randn(5))
print(explanation)

And my dynamo.explain() output is like this.

wow
tensor(-1.4872)
good
wowowow
tensor(True)
great
Graph Count: 7
Graph Break Count: 6
Op Count: 8
Break Reasons:
Break Reason 1:
Reason: builtin: print [<class ‘torch._dynamo.variables.constant.ConstantVariable’>] False
User Stack:
<FrameSummary file /home/ysna/optionTest/explainfn3_gb.py, line 7 in toy_example>
Break Reason 2:
Reason: builtin: print [<class ‘torch._dynamo.variables.tensor.TensorVariable’>] False
User Stack:
<FrameSummary file /home/ysna/optionTest/explainfn3_gb.py, line 8 in torch_dynamo_resume_in_toy_example_at_7>
Break Reason 3:
Reason: generic_jump TensorVariable()
User Stack:
<FrameSummary file /home/ysna/optionTest/explainfn3_gb.py, line 10 in torch_dynamo_resume_in_toy_example_at_9>
Break Reason 4:
Reason: builtin: print [<class ‘torch._dynamo.variables.constant.ConstantVariable’>] False
User Stack:
<FrameSummary file /home/ysna/optionTest/explainfn3_gb.py, line 12 in torch_dynamo_resume_in_toy_example_at_10>
Break Reason 5:
Reason: builtin: print [<class ‘torch._dynamo.variables.tensor.TensorVariable’>] False
User Stack:
<FrameSummary file /home/ysna/optionTest/explainfn3_gb.py, line 13 in torch_dynamo_resume_in_toy_example_at_12>
Break Reason 6:
Reason: generic_jump TensorVariable()
User Stack:
<FrameSummary file /home/ysna/optionTest/explainfn3_gb.py, line 14 in torch_dynamo_resume_in_toy_example_at_13>
Ops per Graph:
Ops 1:
<built-in method abs of type object at 0x7f6e2a21df60>


Ops 2:
Ops 3:

Ops 4:

Ops 5:

Ops 6:

Ops 7:

Out Guards:
Guard 1:
Name: “G[‘torch’].abs”
Source: global
Create Function: FUNCTION_MATCH
Guard Types: [‘ID_MATCH’]
Code List: [“___check_obj_id(G[‘torch’].abs, 140111262463648)”]
Object Weakref: <weakref at 0x7f6cc06a77e0; to ‘builtin_function_or_method’ at 0x7f6e320736a0>
Guarded Class Weakref: <weakref at 0x7f6e327644a0; to ‘type’ at 0x93a400 (builtin_function_or_method)>
Guard 2:
Name: “G[‘torch’]”
Source: global
Create Function: FUNCTION_MATCH
Guard Types: [‘ID_MATCH’]
Code List: [“___check_obj_id(G[‘torch’], 140111268245200)”]
Object Weakref: <weakref at 0x7f6cc06a7650; to ‘module’ at 0x7f6e325f6ed0>
Guarded Class Weakref: <weakref at 0x7f6e32797010; to ‘type’ at 0x939ec0 (module)>
Guard 3:
Name: ‘’
Source: global
Create Function: DETERMINISTIC_ALGORITHMS
Guard Types: None
Code List: None
Object Weakref: None
Guarded Class Weakref: None
Guard 4:
Name: “G[‘__builtins_dict___1’][‘print’]”
Source: global
Create Function: BUILTIN_MATCH
Guard Types: [‘ID_MATCH’]
Code List: [“___check_obj_id(G[‘__builtins_dict___1’][‘print’], 140111270235728)”]
Object Weakref: <weakref at 0x7f6cc06a7920; to ‘builtin_function_or_method’ at 0x7f6e327dce50>
Guarded Class Weakref: <weakref at 0x7f6e327644a0; to ‘type’ at 0x93a400 (builtin_function_or_method)>
Guard 5:
Name: ‘’
Source: global
Create Function: TORCH_FUNCTION_STATE
Guard Types: None
Code List: None
Object Weakref: None
Guarded Class Weakref: None
Guard 6:
Name: ‘’
Source: shape_env
Create Function: SHAPE_ENV
Guard Types: None
Code List: None
Object Weakref: None
Guarded Class Weakref: None
Guard 7:
Name: “L[‘a’]”
Source: local
Create Function: TENSOR_MATCH
Guard Types: [‘TENSOR_MATCH’]
Code List: [“hasattr(L[‘a’], ‘_dynamo_dynamic_indices’) == False”]
Object Weakref: <weakref at 0x7f6cc07c1490; dead>
Guarded Class Weakref: <weakref at 0x7f6da7b404a0; to ‘torch._C._TensorMeta’ at 0x311c9e20 (Tensor)>
Guard 8:
Name: ‘’
Source: global
Create Function: DEFAULT_DEVICE
Guard Types: [‘DEFAULT_DEVICE’]
Code List: [‘utils_device.CURRENT_DEVICE == None’]
Object Weakref: None
Guarded Class Weakref: None
Guard 9:
Name: ‘’
Source: global
Create Function: GRAD_MODE
Guard Types: None
Code List: None
Object Weakref: None
Guarded Class Weakref: None
Guard 10:
Name: “L[‘b’].sum”
Source: local
Create Function: HASATTR
Guard Types: [‘HASATTR’]
Code List: [“hasattr(L[‘b’], ‘sum’)”]
Object Weakref: <weakref at 0x7f6cc06a7dd0; dead>
Guarded Class Weakref: <weakref at 0x7f6da7b404a0; to ‘torch._C._TensorMeta’ at 0x311c9e20 (Tensor)>
Guard 11:
Name: ‘’
Source: global
Create Function: DETERMINISTIC_ALGORITHMS
Guard Types: None
Code List: None
Object Weakref: None
Guarded Class Weakref: None
Guard 12:
Name: “G[‘__builtins_dict___5’][‘print’]”
Source: global
Create Function: BUILTIN_MATCH
Guard Types: [‘ID_MATCH’]
Code List: [“___check_obj_id(G[‘__builtins_dict___5’][‘print’], 140111270235728)”]
Object Weakref: <weakref at 0x7f6cc06a7920; to ‘builtin_function_or_method’ at 0x7f6e327dce50>
Guarded Class Weakref: <weakref at 0x7f6e327644a0; to ‘type’ at 0x93a400 (builtin_function_or_method)>
Guard 13:
Name: ‘’
Source: global
Create Function: TORCH_FUNCTION_STATE
Guard Types: None
Code List: None
Object Weakref: None
Guarded Class Weakref: None
Guard 14:
Name: ‘’
Source: shape_env
Create Function: SHAPE_ENV
Guard Types: None
Code List: None
Object Weakref: None
Guarded Class Weakref: None
Guard 15:
Name: “L[‘b’]”
Source: local
Create Function: TENSOR_MATCH
Guard Types: [‘TENSOR_MATCH’]
Code List: [“hasattr(L[‘b’], ‘_dynamo_dynamic_indices’) == False”]
Object Weakref: <weakref at 0x7f6cc06a7dd0; dead>
Guarded Class Weakref: <weakref at 0x7f6da7b404a0; to ‘torch._C._TensorMeta’ at 0x311c9e20 (Tensor)>
Guard 16:
Name: ‘’
Source: global
Create Function: DEFAULT_DEVICE
Guard Types: [‘DEFAULT_DEVICE’]
Code List: [‘utils_device.CURRENT_DEVICE == None’]
Object Weakref: None
Guarded Class Weakref: None
Guard 17:
Name: ‘’
Source: global
Create Function: GRAD_MODE
Guard Types: None
Code List: None
Object Weakref: None
Guarded Class Weakref: None
Guard 18:
Name: “L[‘b’].sum”
Source: local
Create Function: HASATTR
Guard Types: [‘HASATTR’]
Code List: [“hasattr(L[‘b’], ‘sum’)”]
Object Weakref: <weakref at 0x7f6cc06a7dd0; dead>
Guarded Class Weakref: <weakref at 0x7f6da7b404a0; to ‘torch._C._TensorMeta’ at 0x311c9e20 (Tensor)>
Guard 19:
Name: ‘’
Source: global
Create Function: DETERMINISTIC_ALGORITHMS
Guard Types: None
Code List: None
Object Weakref: None
Guarded Class Weakref: None
Guard 20:
Name: “L[‘b’]”
Source: local
Create Function: TENSOR_MATCH
Guard Types: [‘TENSOR_MATCH’]
Code List: [“hasattr(L[‘b’], ‘_dynamo_dynamic_indices’) == False”]
Object Weakref: <weakref at 0x7f6cc06a7dd0; dead>
Guarded Class Weakref: <weakref at 0x7f6da7b404a0; to ‘torch._C._TensorMeta’ at 0x311c9e20 (Tensor)>
Guard 21:
Name: ‘’
Source: global
Create Function: TORCH_FUNCTION_STATE
Guard Types: None
Code List: None
Object Weakref: None
Guarded Class Weakref: None
Guard 22:
Name: ‘’
Source: shape_env
Create Function: SHAPE_ENV
Guard Types: None
Code List: None
Object Weakref: None
Guarded Class Weakref: None
Guard 23:
Name: ‘’
Source: global
Create Function: DEFAULT_DEVICE
Guard Types: [‘DEFAULT_DEVICE’]
Code List: [‘utils_device.CURRENT_DEVICE == None’]
Object Weakref: None
Guarded Class Weakref: None
Guard 24:
Name: ‘’
Source: global
Create Function: GRAD_MODE
Guard Types: None
Code List: None
Object Weakref: None
Guarded Class Weakref: None
Guard 25:
Name: ‘’
Source: global
Create Function: DETERMINISTIC_ALGORITHMS
Guard Types: None
Code List: None
Object Weakref: None
Guarded Class Weakref: None
Guard 26:
Name: “G[‘__builtins_dict___16’][‘print’]”
Source: global
Create Function: BUILTIN_MATCH
Guard Types: [‘ID_MATCH’]
Code List: [“___check_obj_id(G[‘__builtins_dict___16’][‘print’], 140111270235728)”]
Object Weakref: <weakref at 0x7f6cc06a7920; to ‘builtin_function_or_method’ at 0x7f6e327dce50>
Guarded Class Weakref: <weakref at 0x7f6e327644a0; to ‘type’ at 0x93a400 (builtin_function_or_method)>
Guard 27:
Name: ‘’
Source: global
Create Function: TORCH_FUNCTION_STATE
Guard Types: None
Code List: None
Object Weakref: None
Guarded Class Weakref: None
Guard 28:
Name: ‘’
Source: shape_env
Create Function: SHAPE_ENV
Guard Types: None
Code List: None
Object Weakref: None
Guarded Class Weakref: None
Guard 29:
Name: “L[‘b’]”
Source: local
Create Function: TENSOR_MATCH
Guard Types: [‘TENSOR_MATCH’]
Code List: [“hasattr(L[‘b’], ‘_dynamo_dynamic_indices’) == False”]
Object Weakref: <weakref at 0x7f6cc06a7dd0; dead>
Guarded Class Weakref: <weakref at 0x7f6da7b404a0; to ‘torch._C._TensorMeta’ at 0x311c9e20 (Tensor)>
Guard 30:
Name: ‘’
Source: global
Create Function: DEFAULT_DEVICE
Guard Types: [‘DEFAULT_DEVICE’]
Code List: [‘utils_device.CURRENT_DEVICE == None’]
Object Weakref: None
Guarded Class Weakref: None
Guard 31:
Name: ‘’
Source: global
Create Function: GRAD_MODE
Guard Types: None
Code List: None
Object Weakref: None
Guarded Class Weakref: None
Guard 32:
Name: “L[‘b’].sum”
Source: local
Create Function: HASATTR
Guard Types: [‘HASATTR’]
Code List: [“hasattr(L[‘b’], ‘sum’)”]
Object Weakref: <weakref at 0x7f6cc0634720; dead>
Guarded Class Weakref: <weakref at 0x7f6da7b404a0; to ‘torch._C._TensorMeta’ at 0x311c9e20 (Tensor)>
Guard 33:
Name: “L[‘b’]”
Source: local
Create Function: TENSOR_MATCH
Guard Types: [‘TENSOR_MATCH’]
Code List: [“hasattr(L[‘b’], ‘_dynamo_dynamic_indices’) == False”]
Object Weakref: <weakref at 0x7f6cc0634720; dead>
Guarded Class Weakref: <weakref at 0x7f6da7b404a0; to ‘torch._C._TensorMeta’ at 0x311c9e20 (Tensor)>
Guard 34:
Name: ‘’
Source: global
Create Function: DETERMINISTIC_ALGORITHMS
Guard Types: None
Code List: None
Object Weakref: None
Guarded Class Weakref: None
Guard 35:
Name: ‘’
Source: global
Create Function: TORCH_FUNCTION_STATE
Guard Types: None
Code List: None
Object Weakref: None
Guarded Class Weakref: None
Guard 36:
Name: ‘’
Source: shape_env
Create Function: SHAPE_ENV
Guard Types: None
Code List: None
Object Weakref: None
Guarded Class Weakref: None
Guard 37:
Name: “G[‘__builtins_dict___20’][‘print’]”
Source: global
Create Function: BUILTIN_MATCH
Guard Types: [‘ID_MATCH’]
Code List: [“___check_obj_id(G[‘__builtins_dict___20’][‘print’], 140111270235728)”]
Object Weakref: <weakref at 0x7f6cc06a7920; to ‘builtin_function_or_method’ at 0x7f6e327dce50>
Guarded Class Weakref: <weakref at 0x7f6e327644a0; to ‘type’ at 0x93a400 (builtin_function_or_method)>
Guard 38:
Name: ‘’
Source: global
Create Function: DEFAULT_DEVICE
Guard Types: [‘DEFAULT_DEVICE’]
Code List: [‘utils_device.CURRENT_DEVICE == None’]
Object Weakref: None
Guarded Class Weakref: None
Guard 39:
Name: ‘’
Source: global
Create Function: GRAD_MODE
Guard Types: None
Code List: None
Object Weakref: None
Guarded Class Weakref: None
Guard 40:
Name: “L[‘b’].sum”
Source: local
Create Function: HASATTR
Guard Types: [‘HASATTR’]
Code List: [“hasattr(L[‘b’], ‘sum’)”]
Object Weakref: <weakref at 0x7f6cc0634720; dead>
Guarded Class Weakref: <weakref at 0x7f6da7b404a0; to ‘torch._C._TensorMeta’ at 0x311c9e20 (Tensor)>
Guard 41:
Name: ‘’
Source: global
Create Function: DETERMINISTIC_ALGORITHMS
Guard Types: None
Code List: None
Object Weakref: None
Guarded Class Weakref: None
Guard 42:
Name: ‘’
Source: global
Create Function: TORCH_FUNCTION_STATE
Guard Types: None
Code List: None
Object Weakref: None
Guarded Class Weakref: None
Guard 43:
Name: ‘’
Source: shape_env
Create Function: SHAPE_ENV
Guard Types: None
Code List: None
Object Weakref: None
Guarded Class Weakref: None
Guard 44:
Name: “L[‘b’]”
Source: local
Create Function: TENSOR_MATCH
Guard Types: [‘TENSOR_MATCH’]
Code List: [“hasattr(L[‘b’], ‘_dynamo_dynamic_indices’) == False”]
Object Weakref: <weakref at 0x7f6cc0634720; dead>
Guarded Class Weakref: <weakref at 0x7f6da7b404a0; to ‘torch._C._TensorMeta’ at 0x311c9e20 (Tensor)>
Guard 45:
Name: ‘’
Source: global
Create Function: DEFAULT_DEVICE
Guard Types: [‘DEFAULT_DEVICE’]
Code List: [‘utils_device.CURRENT_DEVICE == None’]
Object Weakref: None
Guarded Class Weakref: None
Guard 46:
Name: ‘’
Source: global
Create Function: GRAD_MODE
Guard Types: None
Code List: None
Object Weakref: None
Guarded Class Weakref: None
Guard 47:
Name: ‘’
Source: global
Create Function: DETERMINISTIC_ALGORITHMS
Guard Types: None
Code List: None
Object Weakref: None
Guarded Class Weakref: None
Guard 48:
Name: ‘’
Source: global
Create Function: TORCH_FUNCTION_STATE
Guard Types: None
Code List: None
Object Weakref: None
Guarded Class Weakref: None
Guard 49:
Name: ‘’
Source: shape_env
Create Function: SHAPE_ENV
Guard Types: None
Code List: None
Object Weakref: None
Guarded Class Weakref: None
Guard 50:
Name: “L[‘x’]”
Source: local
Create Function: TENSOR_MATCH
Guard Types: [‘TENSOR_MATCH’]
Code List: [“hasattr(L[‘x’], ‘_dynamo_dynamic_indices’) == False”]
Object Weakref: <weakref at 0x7f6cc0536930; dead>
Guarded Class Weakref: <weakref at 0x7f6da7b404a0; to ‘torch._C._TensorMeta’ at 0x311c9e20 (Tensor)>
Guard 51:
Name: “L[‘b’]”
Source: local
Create Function: TENSOR_MATCH
Guard Types: [‘TENSOR_MATCH’]
Code List: [“hasattr(L[‘b’], ‘_dynamo_dynamic_indices’) == False”]
Object Weakref: <weakref at 0x7f6cc0634720; dead>
Guarded Class Weakref: <weakref at 0x7f6da7b404a0; to ‘torch._C._TensorMeta’ at 0x311c9e20 (Tensor)>
Guard 52:
Name: ‘’
Source: global
Create Function: DEFAULT_DEVICE
Guard Types: [‘DEFAULT_DEVICE’]
Code List: [‘utils_device.CURRENT_DEVICE == None’]
Object Weakref: None
Guarded Class Weakref: None
Guard 53:
Name: ‘’
Source: global
Create Function: GRAD_MODE
Guard Types: None
Code List: None
Object Weakref: None
Guarded Class Weakref: None
Compile Times: TorchDynamo compilation metrics:
Function, Runtimes (s)
_compile.compile_inner, 0.4575, 0.0140, 0.0086, 0.0990, 0.0139, 0.0140, 0.0152, 0.0084, 0.0059
OutputGraph.call_user_compiler, 0.0002, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001