Skip to content

Commit 56e1053

Browse files
committed
benchdnn: graph: setting_handler: check function return status
1 parent 789dac1 commit 56e1053

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

tests/benchdnn/graph/setting_handler.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1984,11 +1984,15 @@ bool get_softmax_sdt_and_ddt(const deserialized_op_t &base_op_ref,
19841984

19851985
bool get_softmax_stag_and_dtag(const deserialized_op_t &base_op_ref,
19861986
::softmax::settings_t &op_setting) {
1987-
get_driver_tag_by_idx(
1988-
base_op_ref, op_setting.stag.front(), 0, /*from_output*/ false);
1989-
get_driver_tag_by_idx(
1990-
base_op_ref, op_setting.dtag.front(), 0, /*from_output*/ true);
1987+
std::string stag, dtag;
1988+
1989+
if (!get_driver_tag_by_idx(base_op_ref, stag, 0, /*from_output*/ false)
1990+
|| !get_driver_tag_by_idx(
1991+
base_op_ref, dtag, 0, /*from_output*/ true))
1992+
return false;
19911993

1994+
op_setting.stag.front() = std::move(stag);
1995+
op_setting.dtag.front() = std::move(dtag);
19921996
return true;
19931997
}
19941998

0 commit comments

Comments
 (0)