diff options
author | Chris Gross <chrisgross@google.com> | 2021-05-19 11:39:07 -0700 |
---|---|---|
committer | Chris Gross <chrisgross@google.com> | 2021-05-19 11:39:07 -0700 |
commit | a01a9128380dad45a28f4740a57136a058eb9d12 (patch) | |
tree | bc23fb815c7ca1da5c47c38ec75859572b1c2fbd /neuralnetworks/aidl/utils/src/PreparedModel.cpp | |
parent | 7c8e6a102c7b41e35d85931a8aaf445359ccd0c3 (diff) | |
parent | fd795fe35563951f2a34471acc5d745866843b0f (diff) |
Merge SP1A.210513.004
Change-Id: I8ff902b999e3f6515f1a51c85c14bc91a0037204
Diffstat (limited to 'neuralnetworks/aidl/utils/src/PreparedModel.cpp')
-rw-r--r-- | neuralnetworks/aidl/utils/src/PreparedModel.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/neuralnetworks/aidl/utils/src/PreparedModel.cpp b/neuralnetworks/aidl/utils/src/PreparedModel.cpp index 191560786f..18e7636346 100644 --- a/neuralnetworks/aidl/utils/src/PreparedModel.cpp +++ b/neuralnetworks/aidl/utils/src/PreparedModel.cpp @@ -80,7 +80,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::kDefaultRequestMemoryPadding, + &maybeRequestInShared, &relocation))); const auto aidlRequest = NN_TRY(hal::utils::makeExecutionFailure(convert(requestInShared))); const auto aidlMeasure = NN_TRY(hal::utils::makeExecutionFailure(convert(measure))); @@ -127,7 +128,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::kDefaultRequestMemoryPadding, + &maybeRequestInShared, &relocation)); const auto aidlRequest = NN_TRY(convert(requestInShared)); const auto aidlWaitFor = NN_TRY(convert(waitFor)); @@ -197,7 +199,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::kDefaultRequestMemoryPadding, + &maybeRequestInShared, &relocation)); auto aidlRequest = NN_TRY(convert(requestInShared)); auto aidlMeasure = NN_TRY(convert(measure)); |