Skip to content

Commit

Permalink
benchdnn: pool: avoid unnecessary src allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
dzarukin authored and rjoursler committed Nov 19, 2024
1 parent 101e0bb commit 02f0638
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/benchdnn/pool/pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,19 @@ std::vector<int> supported_exec_args(dir_t dir) {
DNNL_ARG_WORKSPACE,
};
static const std::vector<int> exec_bwd_args = {
DNNL_ARG_DIFF_DST,
DNNL_ARG_DIFF_SRC,
DNNL_ARG_WORKSPACE,
};
static const std::vector<int> exec_bwd_args_graph = {
DNNL_ARG_SRC, // For Graph to compute ws on backward
DNNL_ARG_DIFF_DST,
DNNL_ARG_DIFF_SRC,
DNNL_ARG_WORKSPACE,
};
return (dir & FLAG_FWD) ? exec_fwd_args : exec_bwd_args;
return (dir & FLAG_FWD) ? exec_fwd_args
: (driver_name == "graph") ? exec_bwd_args_graph
: exec_bwd_args;
};

fill_cfg_t binary_po_fill_cfg(
Expand Down

0 comments on commit 02f0638

Please sign in to comment.