MCPcopy Create free account
hub / github.com/pytorch/executorch / bubble_error

Function bubble_error

scripts/check_binary_dependencies.py:286–294  ·  view source on GitHub ↗

Bubble a routine's error status up to the program status.

(program_status, routine_status)

Source from the content-addressed store, hash-verified

284
285
286def bubble_error(program_status, routine_status) -> int:
287 """Bubble a routine's error status up to the program status."""
288 # A non-OK error status overrides an OK error status.
289 if routine_status == STATUS_OK:
290 return program_status
291 elif program_status == STATUS_OK:
292 return routine_status
293 else:
294 return min(program_status, routine_status)
295
296
297def main() -> int:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected