1 // Copyright (c) Meta Platforms, Inc. and affiliates. 2 // 3 // This source code is licensed under the BSD-style license found in the 4 // LICENSE file in the root directory of this source tree. 5 6 #include <caffe2/torch/csrc/jit/backends/xnnpack/executor/xnn_executor.h> 7 #include <xnnpack.h> 8 #include <memory> 9 #include <vector> 10 11 namespace torch { 12 namespace jit { 13 namespace xnnpack { 14 namespace delegate { 15 16 class XNNCompiler { 17 public: 18 // Takes Flatbuffer Serialized XNNPack Model and rebuilds the xnn-subgraph 19 // returns an executor object that holds the xnn runtime object which we 20 // can then use to set inputs and run inference using the xnn graph. 21 static void compileModel( 22 const void* buffer_pointer, 23 size_t num_bytes, 24 XNNExecutor* executor); 25 }; 26 27 } // namespace delegate 28 } // namespace xnnpack 29 } // namespace jit 30 } // namespace torch 31