Skip to content

Commit

Permalink
#1680: Added explicit check for checking golden before getting output… (
Browse files Browse the repository at this point in the history
#1693)

… tensor from device
  • Loading branch information
tapspatel authored Jan 7, 2025
1 parent dca29f4 commit 028f711
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion runtime/tools/python/ttrt/common/callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,13 @@ def golden(callback_runtime_config, binary, program_context, op_context):
loc = ttrt.runtime.get_op_loc_info(op_context)

op_golden_tensor = binary.get_debug_info_golden(loc)
op_output_tensor = ttrt.runtime.get_op_output_tensor(op_context, program_context)

if op_golden_tensor is None:
logging.debug("Golden tensor is None - skipping golden comparison")
return

op_output_tensor = ttrt.runtime.get_op_output_tensor(op_context, program_context)

if len(op_output_tensor) == 0:
logging.debug("Output tensor is empty - skipping golden comparison")
return
Expand Down

0 comments on commit 028f711

Please sign in to comment.