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
12 changes: 6 additions & 6 deletions backends/arm/operators/op_conv2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# pyre-unsafe
from typing import Any, List

import numpy as np
import torch

from executorch.backends.arm._passes.fold_qdq_with_annotated_qparams_pass import (
Expand Down Expand Up @@ -333,21 +332,22 @@ def define_node(
weight.dtype,
)
shape = tosa_graph.addConst(
np.array(weight_post_shape).shape,
[len(weight_post_shape)],
ts.DType.SHAPE,
np.array(weight_post_shape),
weight_post_shape,
name=weight_reshaped.name + "_shape",
)

attr = ts.TosaSerializerAttribute()
attr.ReshapeAttribute()
reshape_attr = ts.TosaSerializerAttribute()
reshape_attr.ReshapeAttribute()
tosa_graph.addOperator(
ts.TosaOp.Op().RESHAPE,
[weight.name, shape.name],
[weight_reshaped.name],
attr,
reshape_attr,
)

attr = ts.TosaSerializerAttribute()
tosa_op = ts.TosaOp.Op().DEPTHWISE_CONV2D
weight_name = weight_reshaped.name

Expand Down
8 changes: 4 additions & 4 deletions backends/arm/operators/op_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ def define_node(
tosa_graph = cast(ts.TosaSerializer, tosa_graph)

if len(output.shape) != 0:
shape_len = len(output.shape)
shape_len = [len(output.shape)]
shape_data = list(tosa_shape(output.shape, output.dim_order))
else:
shape_len = 1
shape_data = [0]
shape_len = []
shape_data = []

shape = tosa_graph.addConst(
[shape_len],
shape_len,
ts.DType.SHAPE,
shape_data,
name=node.name + "_shape",
Expand Down
Loading