Lines Matching refs:nn
46 nn::GeneralResult<std::pair<std::vector<nn::OutputShape>, nn::Timing>> convertExecutionResults( in convertExecutionResults()
48 return std::make_pair(NN_TRY(nn::convert(outputShapes)), NN_TRY(nn::convert(timing))); in convertExecutionResults()
51 nn::GeneralResult<std::pair<nn::Timing, nn::Timing>> convertFencedExecutionResults( in convertFencedExecutionResults()
55 return std::make_pair(NN_TRY(nn::convert(timingLaunched)), NN_TRY(nn::convert(timingFenced))); in convertFencedExecutionResults()
60 nn::GeneralResult<std::shared_ptr<const PreparedModel>> PreparedModel::create( in create()
74 nn::ExecutionResult<std::pair<std::vector<nn::OutputShape>, nn::Timing>> PreparedModel::execute( in execute()
75 const nn::Request& request, nn::MeasureTiming measure, in execute()
76 const nn::OptionalTimePoint& deadline, in execute()
77 const nn::OptionalDuration& loopTimeoutDuration) const { in execute()
79 std::optional<nn::Request> maybeRequestInShared; in execute()
81 const nn::Request& requestInShared = in execute()
83 &request, nn::kDefaultRequestMemoryAlignment, nn::kDefaultRequestMemoryPadding, in execute()
95 nn::ExecutionResult<std::pair<std::vector<nn::OutputShape>, nn::Timing>>
109 nn::convert(executionResult.outputShapes).value_or(std::vector<nn::OutputShape>{}); in executeInternal()
110 return NN_ERROR(nn::ErrorStatus::OUTPUT_INSUFFICIENT_SIZE, std::move(canonicalOutputShapes)) in executeInternal()
111 << "execution failed with " << nn::ErrorStatus::OUTPUT_INSUFFICIENT_SIZE; in executeInternal()
122 nn::GeneralResult<std::pair<nn::SyncFence, nn::ExecuteFencedInfoCallback>>
123 PreparedModel::executeFenced(const nn::Request& request, const std::vector<nn::SyncFence>& waitFor, in executeFenced()
124 nn::MeasureTiming measure, const nn::OptionalTimePoint& deadline, in executeFenced()
125 const nn::OptionalDuration& loopTimeoutDuration, in executeFenced()
126 const nn::OptionalDuration& timeoutDurationAfterFence) const { in executeFenced()
128 std::optional<nn::Request> maybeRequestInShared; in executeFenced()
130 const nn::Request& requestInShared = NN_TRY(hal::utils::convertRequestFromPointerToShared( in executeFenced()
131 &request, nn::kDefaultRequestMemoryAlignment, nn::kDefaultRequestMemoryPadding, in executeFenced()
145 nn::GeneralResult<std::pair<nn::SyncFence, nn::ExecuteFencedInfoCallback>>
161 auto resultSyncFence = nn::SyncFence::createAsSignaled(); in executeFencedInternal()
163 resultSyncFence = NN_TRY(nn::convert(result.syncFence)); in executeFencedInternal()
168 return NN_ERROR(nn::ErrorStatus::GENERAL_FAILURE) << "callback is null"; in executeFencedInternal()
175 if (state != nn::SyncFence::FenceState::SIGNALED) { in executeFencedInternal()
182 nn::ExecuteFencedInfoCallback resultCallback = in executeFencedInternal()
183 [callback]() -> nn::GeneralResult<std::pair<nn::Timing, nn::Timing>> { in executeFencedInternal()
195 nn::GeneralResult<nn::SharedExecution> PreparedModel::createReusableExecution( in createReusableExecution()
196 const nn::Request& request, nn::MeasureTiming measure, in createReusableExecution()
197 const nn::OptionalDuration& loopTimeoutDuration) const { in createReusableExecution()
199 std::optional<nn::Request> maybeRequestInShared; in createReusableExecution()
201 const nn::Request& requestInShared = NN_TRY(hal::utils::convertRequestFromPointerToShared( in createReusableExecution()
202 &request, nn::kDefaultRequestMemoryAlignment, nn::kDefaultRequestMemoryPadding, in createReusableExecution()
212 nn::GeneralResult<nn::SharedBurst> PreparedModel::configureExecutionBurst() const { in configureExecutionBurst()