Skip to content

Capture output of Vela and print on error #3057

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
9 changes: 8 additions & 1 deletion backends/arm/arm_vela.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,14 @@ def vela_compile(tosa_graph, args: List[str]):

# invoke vela
vela_command = f"cd {tmpdir}; vela {' '.join(args)} {tosaname}"
subprocess.run([vela_command], shell=True, check=True)
try:
subprocess.run([vela_command], shell=True, check=True, capture_output=True)
except subprocess.CalledProcessError as process_error:
raise RuntimeError(
f"Vela compiler ('{vela_command}') failed with error:\n \
{process_error.stderr.decode()}\n \
Stdout:\n{process_error.stdout.decode()}"
)

np_path = os.path.join(tmpdir, "output", "out_sg0_vela.npz")
blocks = b""
Expand Down