summaryrefslogtreecommitdiff
path: root/neuralnetworks/1.3/utils/src/PreparedModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'neuralnetworks/1.3/utils/src/PreparedModel.cpp')
-rw-r--r--neuralnetworks/1.3/utils/src/PreparedModel.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/neuralnetworks/1.3/utils/src/PreparedModel.cpp b/neuralnetworks/1.3/utils/src/PreparedModel.cpp
index cb56bdcb99..1623de5e9f 100644
--- a/neuralnetworks/1.3/utils/src/PreparedModel.cpp
+++ b/neuralnetworks/1.3/utils/src/PreparedModel.cpp
@@ -143,7 +143,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)));
@@ -184,7 +185,8 @@ PreparedModel::executeFenced(const nn::Request& request, const std::vector<nn::S
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));
const auto hidlRequest = NN_TRY(convert(requestInShared));
const auto hidlWaitFor = NN_TRY(hal::utils::convertSyncFences(waitFor));
@@ -236,7 +238,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));