ONE - On-device Neural Engine
Loading...
Searching...
No Matches
Executor Class Reference

#include <Executor.h>

Public Member Functions

int run (const Model &model, const Request &request, const std::vector< RunTimePoolInfo > &modelPoolInfos, const std::vector< RunTimePoolInfo > &requestPoolInfos)
 

Detailed Description

Definition at line 80 of file Executor.h.

Member Function Documentation

◆ run()

int Executor::run ( const Model model,
const Request request,
const std::vector< RunTimePoolInfo > &  modelPoolInfos,
const std::vector< RunTimePoolInfo > &  requestPoolInfos 
)

Definition at line 126 of file Executor.cpp.

129{
130 VLOG(CPUEXE) << "Executor::run()";
131
132 mModel = &model;
133 mRequest = &request; // TODO check if mRequest is needed
134 initializeRunTimeInfo(modelPoolInfos, requestPoolInfos);
135 // The model has serialized the operation in execution order.
136 for (const auto &operation : model.operations)
137 {
138 int n = executeOperation(operation);
140 {
141 return n;
142 }
143 }
144 mModel = nullptr;
145 mRequest = nullptr;
146 VLOG(CPUEXE) << "Completed run normally";
148}
#define VLOG(...)
Definition Logging.h:37
@ ANEURALNETWORKS_NO_ERROR

References ANEURALNETWORKS_NO_ERROR, and VLOG.

Referenced by package.infer.session::inference(), and ExecutionBuilder::startCompute().


The documentation for this class was generated from the following files: