Skip to content

Commit

Permalink
feat: add support for setInput in EngineHailo
Browse files Browse the repository at this point in the history
  • Loading branch information
LynnL4 committed Nov 28, 2024
1 parent 9053a4c commit 9bf406c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sscma/core/engine/ma_engine_hailo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,16 @@ ma_quant_param_t EngineHailo::getOutputQuantParam(int32_t index) {


ma_err_t EngineHailo::setInput(int32_t index, const ma_tensor_t& tensor) {
if (index < 0 || index >= static_cast<int32_t>(_input_tensors.size())) {
return MA_EINVAL;
}

if (tensor.size != _input_tensors[index]->size) {
return MA_EINVAL;
}

std::memcpy(_input_tensors[index]->data.data, tensor.data.data, tensor.size);

return MA_ENOTSUP;
}

Expand Down

0 comments on commit 9bf406c

Please sign in to comment.