Skip to content

Commit 70e7d49

Browse files
committed
common: restore memory desc compatibility helpers
1 parent ee74be3 commit 70e7d49

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

src/common/memory_desc.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,9 @@ status_t memory_desc_permute_axes(memory_desc_t &out_memory_desc,
281281
} // namespace impl
282282
} // namespace dnnl
283283

284+
// Preserve compatibility with code that still references the unqualified name.
285+
using dnnl::impl::dnnl_memory_extra_flag_none;
286+
284287
// Memory descriptor. The description is based on a number of dimensions,
285288
// dimensions themselves, plus information about elements type and memory
286289
// format. Additionally, contains format-specific descriptions of the data

src/common/memory_desc_wrapper.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ status_t fill_blocked(memory_desc_t &md, std::vector<int>& perm,
9494
return fill_blocked_impl(md, perm, inner_blks, inner_idxs);
9595
}
9696

97+
status_t fill_blocked(memory_desc_t &md, std::vector<dim_t> &perm,
98+
std::vector<dim_t> &inner_blks, std::vector<dim_t> &inner_idxs) {
99+
std::vector<int> perm_i(perm.begin(), perm.end());
100+
std::vector<int> inner_blks_i(inner_blks.begin(), inner_blks.end());
101+
std::vector<int> inner_idxs_i(inner_idxs.begin(), inner_idxs.end());
102+
return fill_blocked_impl(md, perm_i, inner_blks_i, inner_idxs_i);
103+
}
104+
97105
void memory_desc_wrapper::compute_strides_compat(dims_t *strides_compat) const {
98106

99107
if (ndims() == 0) return;

src/common/memory_desc_wrapper.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ status_t fill_blocked(memory_desc_t &md, std::vector<int> &perm,
3636
std::vector<int> &inner_blks,
3737
std::vector<int> &inner_idxs);
3838

39+
status_t fill_blocked(memory_desc_t &md, std::vector<dim_t> &perm,
40+
std::vector<dim_t> &inner_blks,
41+
std::vector<dim_t> &inner_idxs);
42+
3943
/** thin wrapper class over \struct memory_desc_t which allows easy
4044
* manipulations with underlying C structure, which is taken by reference */
4145
// NOLINTNEXTLINE(readability-identifier-naming)

0 commit comments

Comments
 (0)