There are two levels of abstraction for memory in oneDNN.

  1. Memory descriptor – engine-agnostic logical description of data (number of dimensions, dimension sizes, data type, and format.

  2. Memory object – an engine-specific object combines memory descriptor with storage.

oneDNN defines the following convenience aliases to denote tensor dimensions

using dnnl::memory::dim = int64_t

Integer type for representing dimension sizes and indices.

using dnnl::memory::dims = std::vector<dim>

Vector of dimensions. Implementations are free to force a limit on the vector’s length.