Class CppNativeApi

Inheritance Relationships

Base Type

Class Documentation

class CppNativeApi : public amdinfer::Interface

Public Functions

explicit CppNativeApi(InferenceRequest 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) override

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 size_t getInputSize() override

Get the number of input tensors in the request.

virtual void errorHandler(const std::exception &e) override

Given an exception, handle the exception appropriately.

Parameters

e – the raised exception

std::promise<amdinfer::InferenceResponse> *getPromise()