Skip to content

Commit aad2bb0

Browse files
committed
[ExecuTorch] Arm Ethos: Always verbose all for Vela
Pull Request resolved: #8406 Better to have the output then to have to rerun it. ghstack-source-id: 266216958 @exported-using-ghexport Differential Revision: [D69503726](https://our.internmc.facebook.com/intern/diff/D69503726/)
1 parent a7f274a commit aad2bb0

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

backends/arm/arm_backend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ def preprocess( # noqa: C901
270270
# preprocess and some consume TOSA fb directly.
271271
if output_format == "vela":
272272
# Emit vela_bin_stream format
273-
binary = vela_compile(tosa_graph, compile_flags, input_order)
273+
binary = vela_compile(tosa_graph, compile_flags, input_order, verbose = logger.getEffectiveLevel() == logging.INFO)
274274
elif output_format == "tosa":
275275
# Emit TOSA flatbuffer
276276
binary = bytes(tosa_graph.serialize())

backends/arm/arm_vela.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ def vela_bin_pack_io(prefix, data, shape_order=None):
3939
# Output via Vela to binary stream for ArmBackendEthosU
4040
# WARNING: Do not change this without changing VelaBinStream.cpp as that
4141
# function consumes this format and the two need to align.
42-
def vela_compile(tosa_graph, args: List[str], shape_order=None):
42+
def vela_compile(tosa_graph, args: List[str], shape_order=None, verbose: bool = False):
43+
"""
44+
Compile a TOSA graph to a binary stream for ArmBackendEthosU using Vela.
45+
"""
4346
with tempfile.TemporaryDirectory() as tmpdir:
4447
tosaname = "out.tosa"
4548
flatbuffer = tosa_graph.serialize()
@@ -51,6 +54,8 @@ def vela_compile(tosa_graph, args: List[str], shape_order=None):
5154
output_dir = os.path.join(tmpdir, "output")
5255
args.append(f"--output-dir={output_dir}")
5356
args.append(tosa_path)
57+
if verbose:
58+
args.append("--verbose-all")
5459
vela.main(" ".join(args).split(" "))
5560

5661
if any("ethos-u85" in arg for arg in args) or any(

0 commit comments

Comments
 (0)