MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / CreatePackedLayout

Function CreatePackedLayout

tensorflow/lite/experimental/ruy/dispatch.h:131–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131inline void CreatePackedLayout(const Layout& src, const Type& scalar,
132 const KernelLayout& kernel_layout,
133 PackedLayout* packed) {
134 packed->order = Order::kColMajor;
135 packed->rows = round_up_pot(src.rows, kernel_layout.rows);
136 packed->cols = round_up_pot(src.cols, kernel_layout.cols);
137 packed->kernel = kernel_layout;
138 int inner_size = packed->rows;
139 if (RUY_OPT_ENABLED(RUY_OPT_AVOID_ALIASING)) {
140 packed->stride =
141 (inner_size * scalar.size) % 1024 ? inner_size : inner_size + 64;
142 } else {
143 packed->stride = inner_size;
144 }
145}
146
147template <typename Scalar, typename PackedScalar>
148void CreatePackedMatrix(Side side, const KernelLayout& kernel_layout,

Callers 1

CreatePackedMatrixFunction · 0.85

Calls 1

round_up_potFunction · 0.85

Tested by

no test coverage detected