Skip to content

Commit 8c492e5

Browse files
committedMar 11, 2025
benchdnn: utils: cold-cache: improve error message for reorder
1 parent d1a2e25 commit 8c492e5

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed
 

‎tests/benchdnn/utils/cold_cache.cpp

+9-2
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,15 @@ cold_cache_t::cold_cache_t(
195195
dnnl_status_t status = dnnl_reorder_primitive_desc_create(
196196
&reorder_pd, orig_cc_mem_md, query_engine(orig_mem),
197197
orig_cc_mem_md, query_engine(dst_memory), nullptr);
198-
assert(status == dnnl_success);
199-
if (status != dnnl_success) { return; }
198+
if (status != dnnl_success) {
199+
BENCHDNN_PRINT(0,
200+
"Error: cold-cache reorder failed for %s arg and "
201+
"%zu buffer (out of %zu).\n",
202+
data_kind2str(exec_arg2data_kind(arg)), i,
203+
n_buffers_);
204+
assert(status == dnnl_success);
205+
return;
206+
}
200207
reorder_pdw.reset(reorder_pd);
201208

202209
benchdnn_dnnl_wrapper_t<dnnl_primitive_t> reorder_w;

0 commit comments

Comments
 (0)