Subgraph API

Entry point for delegation of TFLite subgraphs

PiperOrigin-RevId: 292977451
diff --git a/src/xnnpack/allocator.h b/src/xnnpack/allocator.h
index fdcfce5..a393874 100644
--- a/src/xnnpack/allocator.h
+++ b/src/xnnpack/allocator.h
@@ -25,6 +25,14 @@
   return xnn_params.allocator.allocate(xnn_params.allocator.context, memory_size);
 }
 
+inline static void* xnn_allocate_zero_memory(size_t memory_size) {
+  void* memory_pointer = xnn_params.allocator.allocate(xnn_params.allocator.context, memory_size);
+  if (memory_pointer != NULL) {
+    memset(memory_pointer, 0, memory_size);
+  }
+  return memory_pointer;
+}
+
 inline static void* xnn_reallocate_memory(void* memory_pointer, size_t memory_size) {
   return xnn_params.allocator.reallocate(xnn_params.allocator.context, memory_pointer, memory_size);
 }