@@ -288,9 +288,31 @@ class Conv2d_CS : public CompilerGenericInterface {
288288 const OffsetBuffer& wtszeropts,
289289 const OffsetBuffer& ctrl_buffer) = 0;
290290
291- // mli_status GetKernelPrivateData(void* kernel_private_data_buffer) override ;
292- // unsigned GetKernelPrivateDataSize() override ;
293- // unsigned GetRuntimeObjectSize() override ;
291+ /* *
292+ * @brief Method to set buffer memory offsets and memory IDs for the kernel
293+ *
294+ * Compiler computes a memory map and buffer offsets are set using this method.
295+ * Compiler also needs to indicate in which memory the buffers reside.
296+ * These ID's need to match the array of memory bases that the xop-interpreter passes to
297+ * the init function.
298+ *
299+ * In this method you specify offsets for tensors passed to the constructor
300+ *
301+ * @param input [I] OffsetBuffer containing Memory Identifier and Offset in that memory
302+ * @param output [I] OffsetBuffer containing Memory Identifier and Offset in that memory
303+ * @param weights_and_zeropts [I] OffsetBuffer containing Memory Identifier and Offset in that memory
304+ * @param inpzeropts [I] OffsetBuffer containing Memory Identifier and Offset in that memory
305+ * @param ctrl_buffer [I] OffsetBuffer containing Memory Identifier and Offset in that memory
306+ *
307+ * @return MLI status code
308+ */
309+ virtual mli_status AttachBufferOffsets (const OffsetBuffer &input,
310+ const OffsetBuffer &output,
311+ const OffsetBuffer &weights_and_zeropts,
312+ const OffsetBuffer &inpzeropts,
313+ const OffsetBuffer &ctrl_buffer) {
314+ NOT_IMPLEMENTED_METHOD;
315+ return MLI_STATUS_OK; };
294316
295317 /* *
296318 * @brief Method to set iteration information used in the .Update()
@@ -565,6 +587,33 @@ class DepthwiseConv2d_CS : public CompilerGenericInterface {
565587 const OffsetBuffer& inpzeropts,
566588 const OffsetBuffer& wtszeropts,
567589 const OffsetBuffer& ctrl_buffer) = 0;
590+
591+ /* *
592+ * @brief Method to set buffer memory offsets and memory IDs for the kernel
593+ *
594+ * Compiler computes a memory map and buffer offsets are set using this method.
595+ * Compiler also needs to indicate in which memory the buffers reside.
596+ * These ID's need to match the array of memory bases that the xop-interpreter passes to
597+ * the init function.
598+ *
599+ * In this method you specify offsets for tensors passed to the constructor
600+ *
601+ * @param input [I] OffsetBuffer containing Memory Identifier and Offset in that memory
602+ * @param output [I] OffsetBuffer containing Memory Identifier and Offset in that memory
603+ * @param weights_and_zeropts [I] OffsetBuffer containing Memory Identifier and Offset in that memory
604+ * @param inpzeropts [I] OffsetBuffer containing Memory Identifier and Offset in that memory
605+ * @param ctrl_buffer [I] OffsetBuffer containing Memory Identifier and Offset in that memory
606+ *
607+ * @return MLI status code
608+ */
609+ virtual mli_status AttachBufferOffsets (const OffsetBuffer &input,
610+ const OffsetBuffer &output,
611+ const OffsetBuffer &weights_and_zeropts,
612+ const OffsetBuffer &inpzeropts,
613+ const OffsetBuffer &ctrl_buffer) {
614+ NOT_IMPLEMENTED_METHOD;
615+ return MLI_STATUS_OK; };
616+
568617};
569618
570619/* *
@@ -637,6 +686,31 @@ class FullyConnected_CS : public CompilerGenericInterface {
637686 const OffsetBuffer &weights,
638687 const OffsetBuffer &wtszeropts,
639688 const OffsetBuffer &ctrl_buffer) = 0;
689+
690+ /* *
691+ * @brief Method to set buffer memory offsets and memory IDs for the kernel
692+ *
693+ * Compiler computes a memory map and buffer offsets are set using this method.
694+ * Compiler also needs to indicate in which memory the buffers reside.
695+ * These ID's need to match the array of memory bases that the xop-interpreter passes to
696+ * the init function.
697+ *
698+ * In this method you specify offsets for tensors passed to the constructor
699+ *
700+ * @param input [I] OffsetBuffer containing Memory Identifier and Offset in that memory
701+ * @param output [I] OffsetBuffer containing Memory Identifier and Offset in that memory
702+ * @param weights_and_zeropts [I] OffsetBuffer containing Memory Identifier and Offset in that memory
703+ * @param ctrl_buffer [I] OffsetBuffer containing Memory Identifier and Offset in that memory
704+ *
705+ * @return MLI status code
706+ */
707+ virtual mli_status AttachBufferOffsets (const OffsetBuffer &input,
708+ const OffsetBuffer &output,
709+ const OffsetBuffer &weights_and_zeropts,
710+ const OffsetBuffer &ctrl_buffer) {
711+ NOT_IMPLEMENTED_METHOD;
712+ return MLI_STATUS_OK; };
713+
640714};
641715
642716/* *
@@ -1397,6 +1471,33 @@ class TransposeConv2D_CS : public CompilerGenericInterface {
13971471 const OffsetBuffer &inpzeropts,
13981472 const OffsetBuffer &wtszeropts,
13991473 const OffsetBuffer &ctrl_buffer) = 0;
1474+
1475+ /* *
1476+ * @brief Method to set buffer memory offsets and memory IDs for the kernel
1477+ *
1478+ * Compiler computes a memory map and buffer offsets are set using this method.
1479+ * Compiler also needs to indicate in which memory the buffers reside.
1480+ * These ID's need to match the array of memory bases that the xop-interpreter passes to
1481+ * the init function.
1482+ *
1483+ * In this method you specify offsets for tensors passed to the constructor
1484+ *
1485+ * @param input [I] OffsetBuffer containing Memory Identifier and Offset in that memory
1486+ * @param output [I] OffsetBuffer containing Memory Identifier and Offset in that memory
1487+ * @param weights_and_zeropts [I] OffsetBuffer containing Memory Identifier and Offset in that memory
1488+ * @param inpzeropts [I] OffsetBuffer containing Memory Identifier and Offset in that memory
1489+ * @param ctrl_buffer [I] OffsetBuffer containing Memory Identifier and Offset in that memory
1490+ *
1491+ * @return MLI status code
1492+ */
1493+ virtual mli_status AttachBufferOffsets (const OffsetBuffer &input,
1494+ const OffsetBuffer &output,
1495+ const OffsetBuffer &weights_and_zeropts,
1496+ const OffsetBuffer &inpzeropts,
1497+ const OffsetBuffer &ctrl_buffer) {
1498+ NOT_IMPLEMENTED_METHOD;
1499+ return MLI_STATUS_OK; };
1500+
14001501};
14011502
14021503/* *
0 commit comments