summaryrefslogtreecommitdiff
path: root/neuralnetworks/1.2/utils/src/PreparedModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'neuralnetworks/1.2/utils/src/PreparedModel.cpp')
-rw-r--r--neuralnetworks/1.2/utils/src/PreparedModel.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/neuralnetworks/1.2/utils/src/PreparedModel.cpp b/neuralnetworks/1.2/utils/src/PreparedModel.cpp
index 1d8793733b..d0ef36e7b5 100644
--- a/neuralnetworks/1.2/utils/src/PreparedModel.cpp
+++ b/neuralnetworks/1.2/utils/src/PreparedModel.cpp
@@ -97,7 +97,8 @@ nn::ExecutionResult<std::pair<std::vector<nn::OutputShape>, nn::Timing>> Prepare
hal::utils::RequestRelocation relocation;
const nn::Request& requestInShared =
NN_TRY(hal::utils::makeExecutionFailure(hal::utils::convertRequestFromPointerToShared(
- &request, &maybeRequestInShared, &relocation)));
+ &request, nn::kDefaultRequestMemoryAlignment, nn::kMinMemoryPadding,
+ &maybeRequestInShared, &relocation)));
const auto hidlRequest = NN_TRY(hal::utils::makeExecutionFailure(convert(requestInShared)));
const auto hidlMeasure = NN_TRY(hal::utils::makeExecutionFailure(convert(measure)));
@@ -140,7 +141,8 @@ nn::GeneralResult<nn::SharedExecution> PreparedModel::createReusableExecution(
std::optional<nn::Request> maybeRequestInShared;
hal::utils::RequestRelocation relocation;
const nn::Request& requestInShared = NN_TRY(hal::utils::convertRequestFromPointerToShared(
- &request, &maybeRequestInShared, &relocation));
+ &request, nn::kDefaultRequestMemoryAlignment, nn::kMinMemoryPadding,
+ &maybeRequestInShared, &relocation));
auto hidlRequest = NN_TRY(convert(requestInShared));
auto hidlMeasure = NN_TRY(convert(measure));