Skip to content

Commit b1ca911

Browse files
committed
benchdnn: graph: fix create memory from scalar lt
1 parent dc90338 commit b1ca911

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tests/benchdnn/graph/graph_memory.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,11 @@ dnn_graph_mem_t::dnn_graph_mem_t(const dnn_mem_t &mem,
8787

8888
// Create memory for graph path
8989
const auto data_type = static_cast<dnnl::memory::data_type>(graph_dt);
90+
91+
if (graph_dims_.empty()) graph_dims_.push_back(1);
92+
if (graph_strides_.empty()) graph_strides_.push_back(1);
93+
9094
if (is_op_input) {
91-
if (graph_dims_.empty()) graph_dims_.push_back(1);
92-
if (graph_strides_.empty()) graph_strides_.push_back(1);
9395

9496
// create graph memory
9597
dnnl::memory::desc md(graph_dims_, data_type, graph_strides_);

tests/benchdnn/graph/setting_handler.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -1627,7 +1627,6 @@ bool get_reduction_prb_vdims(
16271627
}
16281628

16291629
prb_vdims.vdims = {src_dims, dst_dims};
1630-
prb_vdims.dst_dims = src_dims;
16311630
prb_vdims.ndims = static_cast<int>(src_dims.size());
16321631
return true;
16331632
}

0 commit comments

Comments
 (0)