From 02f06382232de34ffae979f51587ff857b4de508 Mon Sep 17 00:00:00 2001 From: Dmitrii Zarukin Date: Wed, 13 Nov 2024 06:10:51 -0800 Subject: [PATCH] benchdnn: pool: avoid unnecessary src allocation --- tests/benchdnn/pool/pool.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/benchdnn/pool/pool.cpp b/tests/benchdnn/pool/pool.cpp index 6d39ace9e8c..6f4f318a3a2 100644 --- a/tests/benchdnn/pool/pool.cpp +++ b/tests/benchdnn/pool/pool.cpp @@ -219,12 +219,19 @@ std::vector supported_exec_args(dir_t dir) { DNNL_ARG_WORKSPACE, }; static const std::vector exec_bwd_args = { + DNNL_ARG_DIFF_DST, + DNNL_ARG_DIFF_SRC, + DNNL_ARG_WORKSPACE, + }; + static const std::vector 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(