1919namespace executorch {
2020namespace extension {
2121
22+ using ET_RUNTIME_NAMESPACE::Method;
23+ using ET_RUNTIME_NAMESPACE::MethodMeta;
24+ using ET_RUNTIME_NAMESPACE::NamedDataMap;
25+ using ET_RUNTIME_NAMESPACE::Program;
26+
2227/* *
2328 * A facade class for loading programs and executing methods within them.
2429 */
@@ -95,7 +100,7 @@ class Module {
95100 * @param[in] data_map_loader A DataLoader used for loading external weights.
96101 */
97102 explicit Module (
98- std::shared_ptr<runtime:: Program> program,
103+ std::shared_ptr<Program> program,
99104 std::unique_ptr<runtime::MemoryAllocator> memory_allocator = nullptr ,
100105 std::unique_ptr<runtime::MemoryAllocator> temp_allocator = nullptr ,
101106 std::unique_ptr<runtime::EventTracer> event_tracer = nullptr ,
@@ -116,8 +121,8 @@ class Module {
116121 */
117122 ET_NODISCARD
118123 runtime::Error load (
119- const runtime:: Program::Verification verification =
120- runtime:: Program::Verification::Minimal);
124+ const Program::Verification verification =
125+ Program::Verification::Minimal);
121126
122127 /* *
123128 * Checks if the program is loaded.
@@ -134,7 +139,7 @@ class Module {
134139 *
135140 * @returns Shared pointer to the program or nullptr if it's not yet loaded.
136141 */
137- inline std::shared_ptr<runtime:: Program> program () const {
142+ inline std::shared_ptr<Program> program () const {
138143 return program_;
139144 }
140145
@@ -224,8 +229,7 @@ class Module {
224229 * @returns A method metadata, or an error if the program or method failed to
225230 * load.
226231 */
227- runtime::Result<runtime::MethodMeta> method_meta (
228- const std::string& method_name);
232+ runtime::Result<MethodMeta> method_meta (const std::string& method_name);
229233
230234 /* *
231235 * Execute a specific method with the given input values and retrieve the
@@ -473,20 +477,20 @@ class Module {
473477 std::vector<runtime::Span<uint8_t >> planned_spans;
474478 std::unique_ptr<runtime::HierarchicalAllocator> planned_memory;
475479 std::unique_ptr<runtime::MemoryManager> memory_manager;
476- std::unique_ptr<runtime:: Method> method;
480+ std::unique_ptr<Method> method;
477481 std::vector<runtime::EValue> inputs;
478482 };
479483
480484 std::string file_path_;
481485 std::string data_map_path_;
482486 LoadMode load_mode_{LoadMode::MmapUseMlock};
483- std::shared_ptr<runtime:: Program> program_;
487+ std::shared_ptr<Program> program_;
484488 std::unique_ptr<runtime::DataLoader> data_loader_;
485489 std::unique_ptr<runtime::MemoryAllocator> memory_allocator_;
486490 std::unique_ptr<runtime::MemoryAllocator> temp_allocator_;
487491 std::unique_ptr<runtime::EventTracer> event_tracer_;
488492 std::unique_ptr<runtime::DataLoader> data_map_loader_;
489- std::unique_ptr<runtime:: NamedDataMap> data_map_;
493+ std::unique_ptr<NamedDataMap> data_map_;
490494
491495 protected:
492496 std::unordered_map<std::string, MethodHolder> methods_;
0 commit comments