Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions backends/cadence/aot/fuse_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,9 @@ def fuse_quantized_batch_norm_with_conv(
# Note: there is a quantized.conv2d.new operator in the resulting graph
# that takes a torch.classes.quantized.Conv2dPackedParamsBase as one of the input
# this prevents us to directly call graph_module.recompile().
# pyre-fixme[16]: `GraphModule` has no attribute `_code`.
# pyre-fixme[16]: Item `Tensor` of `Tensor | Module` has no attribute
# `python_code`.
graph_module._code = graph_module._graph.python_code(root_module="self").src

def __init__(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ def fuse_ln_linear(
linear.bias.data = linear.bias.data.to(dtype=torch.float32) + torch.matmul(
# pyre-fixme[6]: For 2nd argument expected `Tensor` but got
# `Union[Tensor, Module]`.
W_, layernorm.bias.to(dtype=torch.float32)
W_,
layernorm.bias.to(dtype=torch.float32),
)
linear.bias.data = linear.bias.data.to(linear_dtype)

Expand Down
3 changes: 2 additions & 1 deletion exir/emit/_emitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1635,7 +1635,8 @@ def plan(self) -> ExecutionPlan:
# empty list.
non_const_buffer_sizes=typing.cast(
# pyre-fixme[29]: `Union[BoundMethod[typing.Callable(torch._C.TensorB...
List[int], self.module.meta["non_const_buffer_sizes"]
List[int],
self.module.meta["non_const_buffer_sizes"],
),
container_meta_type=self.container_meta_type,
)
Loading