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
4 changes: 2 additions & 2 deletions backends/arm/arm_vela.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ def vela_compile(tosa_graph, args: List[str], shape_order=None):
block_name = block_name + b"\x00" * (16 - len(block_name))

# We need the acual unpadded block lengths for hw setup
block_length = struct.pack("<iiii", len(bin_blocks[key]), 0, 0, 0) # type: ignore[assignment]
block_length_bytes = struct.pack("<iiii", len(bin_blocks[key]), 0, 0, 0)

# Pad block data to multiple of 16 bytes
block_data = bin_blocks[key]
block_data = block_data + b"\x00" * (15 - (len(block_data) - 1) % 16)

block = block_name + block_length + block_data # type: ignore[operator]
block = block_name + block_length_bytes + block_data
blocks = blocks + block

return blocks
2 changes: 1 addition & 1 deletion backends/arm/operators/node_visitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def define_node(


# container for all node visitors
_node_visitor_dicts = { # type: ignore[var-annotated]
_node_visitor_dicts: Dict[TosaSpecification, Dict] = {
TosaSpecification.create_from_string("TOSA-0.80+BI"): {},
TosaSpecification.create_from_string("TOSA-0.80+MI"): {},
}
Expand Down
4 changes: 2 additions & 2 deletions backends/arm/util/arm_model_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def __init__(
if tosa_output_path:
self.tosa_output_path = tosa_output_path
else:
self.tosa_output_path = None # type: ignore[assignment]
self.tosa_output_path = ""

def get_model_error(self) -> defaultdict:
"""
Expand Down Expand Up @@ -104,7 +104,7 @@ def get_compression_ratio(self) -> float:

return compression_ratio

def evaluate(self) -> dict[Any]: # type: ignore[type-arg]
def evaluate(self) -> dict[str, Any]:
model_error_dict = self.get_model_error()

output_metrics = {"name": self.model_name, "metrics": dict(model_error_dict)}
Expand Down
Loading