Class Interface¶
Defined in File interface.hpp
Inheritance Relationships¶
Derived Types¶
public amdinfer::CppNativeApi
(Class CppNativeApi)public amdinfer::DrogonHttp
(Class DrogonHttp)public amdinfer::GrpcApiUnary
(Class GrpcApiUnary)public amdinfer::http::DrogonWs
(Class DrogonWs)
Class Documentation¶
-
class Interface¶
The Interface class represents an input-agnostic wrapper class that can encapsulate incoming requests from different protocols and present a consistent object and interface to the batcher to process all the requests.
Subclassed by amdinfer::CppNativeApi, amdinfer::DrogonHttp, amdinfer::GrpcApiUnary, amdinfer::http::DrogonWs
Public Functions
-
Interface()¶
Constructor.
-
virtual ~Interface() = default¶
Destructor
-
InterfaceType getType() const¶
Get the type of the interface.
-
virtual size_t getInputSize() = 0¶
Get the number of input tensors in the request.
-
virtual std::shared_ptr<InferenceRequest> getRequest(const BufferRawPtrs &input_buffers, std::vector<size_t> &input_offsets, const BufferRawPtrs &output_buffers, std::vector<size_t> &output_offsets) = 0¶
Construct an InferenceRequest using the data in the Interface.
- Parameters
input_buffers – a vector of buffers to hold the input data
input_offsets – offsets of where to start storing input data
output_buffers – a vector of buffers to hold the output data
output_offsets – offsets of where to start storing output data
- Returns
std::shared_ptr<InferenceRequest>
-
virtual void errorHandler(const std::exception &e) = 0¶
Given an exception, handle the exception appropriately.
- Parameters
e – the raised exception
Protected Attributes
-
InterfaceType type_¶
-
Interface()¶