coreai_opt.inspection.OpInfo¶
- class coreai_opt.inspection.OpInfo(op_name, op_type, module_stack, source_frames, inputs, outputs)[source]¶
Bases:
objectInformation about a single operation discovered in a model.
- Parameters:
op_name (str)
op_type (str | None)
module_stack (tuple[ModuleContext, ...])
source_frames (tuple[SourceFrame, ...])
inputs (tuple[OpInfo, ...])
outputs (tuple[OpInfo, ...])
- op_name¶
The operation name that
op_name_configregex patterns match against (e.g.,"add_1","linear").- Type:
str
- op_type¶
The operation type that
op_type_configkeys match against (e.g.,"add","linear").Noneif the type could not be determined.- Type:
str | None
- module_stack¶
The
nn.Modulenesting hierarchy from outermost to innermost. The innermost entry’smodule_nameis the string thatmodule_name_configswould match, and itsmodule_typeis the string thatmodule_type_configswould match.- Type:
tuple[ModuleContext, …]
- source_frames¶
Source code locations from outermost
forward()to innermost, showing the call chain that produced this op. May be empty if source information is unavailable.- Type:
tuple[SourceFrame, …]
- inputs¶
Ordered input ops (ops, placeholders, parameters) that feed into this op.
- Type:
tuple[OpInfo, …]
- __init__(op_name, op_type, module_stack, source_frames, inputs, outputs)¶
- Parameters:
op_name (str)
op_type (str | None)
module_stack (tuple[ModuleContext, ...])
source_frames (tuple[SourceFrame, ...])
inputs (tuple[OpInfo, ...])
outputs (tuple[OpInfo, ...])
- Return type:
None
- module_stack: tuple[ModuleContext, ...]¶
- op_name: str¶
- op_type: str | None¶
- source_frames: tuple[SourceFrame, ...]¶