OrangePi3588Media/include/hw/i_infer_backend.h

21 lines
587 B
C++

#pragma once
#include <string>
#include "ai_scheduler.h"
namespace rk3588 {
class IInferBackend {
public:
virtual ~IInferBackend() = default;
virtual ModelHandle LoadModel(const std::string& model_path, std::string& err) = 0;
virtual void UnloadModel(ModelHandle handle) = 0;
virtual bool GetModelInfo(ModelHandle handle, ModelInfo& info) const = 0;
virtual InferResult Infer(ModelHandle handle, const InferInput& input) = 0;
virtual AiScheduler::BorrowedInferResult InferBorrowed(ModelHandle handle, const InferInput& input) = 0;
};
} // namespace rk3588