// // Copyright (c) 2023 Apple Inc. All rights reserved. // Provided subject to the LICENSE file in the top level directory. // #pragma once #include #include #include #include #include #include namespace executorch { namespace backends { namespace mps { namespace delegate { class MPSCompiler { public: // Takes Flatbuffer Serialized MPS Model and rebuilds the MPSGraphExecutable // returns an executor object that holds the MPS runtime object which we // can then use to set inputs and run inference using the MPSGraphExecutable. ET_NODISCARD static executorch::runtime::Error compileModel( const void* buffer_pointer, size_t num_bytes, MPSExecutor* executor, executorch::runtime::MemoryAllocator* runtime_allocator, executorch::runtime::ArrayRef compile_specs); }; } // namespace delegate } // namespace mps } // namespace backends } // namespace executorch