summaryrefslogtreecommitdiff
path: root/neuralnetworks/1.0/utils/src/PreparedModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'neuralnetworks/1.0/utils/src/PreparedModel.cpp')
-rw-r--r--neuralnetworks/1.0/utils/src/PreparedModel.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/neuralnetworks/1.0/utils/src/PreparedModel.cpp b/neuralnetworks/1.0/utils/src/PreparedModel.cpp
index 7987ab4d7f..00970c090d 100644
--- a/neuralnetworks/1.0/utils/src/PreparedModel.cpp
+++ b/neuralnetworks/1.0/utils/src/PreparedModel.cpp
@@ -65,7 +65,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)));
@@ -111,7 +112,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));
return Execution::create(shared_from_this(), std::move(hidlRequest), std::move(relocation));