ImmutableInputs
Function
Obtains a TensorMap object.
Format
const TensorMap &ImmutableInputs() const
Parameters
None
Usage Example
After a request object is constructed, add a Tensor object to the request, and then obtain the TensorMap object in the request object.
1 2 3 4 5 6 7 8 | mindie_llm::InferRequestId runtimeReqId(0); std::shared_ptr<mindie_llm::InferRequest> runtimeRequest(runtimeReqId); std::string name = "INPUT_IDS"; mindie_llm::InferDataType dataType = mindie_llm::InferDataType::TYPE_INT64; std::vector<int64_t> dataShape = {1, 2}; auto inputsTensor = std::make_shared<mindie_llm::InferTensor>(name, dataType, dataShape); runtimeRequest->AddTensor(name, inputsTensor); TensorMap tensorMap = runtimeRequest->ImmutableInputs(); |
Return Value
TensorMap object.
Parent topic: InferRequest