/hardware/interfaces/neuralnetworks/utils/common/include/nnapi/hal/ |
D | ResilientDevice.h | 35 class ResilientDevice final : public nn::IDevice, 40 using Factory = std::function<nn::GeneralResult<nn::SharedDevice>(bool blocking)>; 42 static nn::GeneralResult<std::shared_ptr<const ResilientDevice>> create(Factory makeDevice); 45 std::string versionString, std::vector<nn::Extension> extensions, 46 nn::Capabilities capabilities, nn::SharedDevice device); 48 nn::SharedDevice getDevice() const EXCLUDES(mMutex); 49 nn::GeneralResult<nn::SharedDevice> recover(const nn::IDevice* failingDevice, 54 nn::Version getFeatureLevel() const override; 55 nn::DeviceType getType() const override; 56 const std::vector<nn::Extension>& getSupportedExtensions() const override; [all …]
|
D | ResilientPreparedModel.h | 33 class ResilientPreparedModel final : public nn::IPreparedModel, 38 using Factory = std::function<nn::GeneralResult<nn::SharedPreparedModel>()>; 40 static nn::GeneralResult<std::shared_ptr<const ResilientPreparedModel>> create( 44 nn::SharedPreparedModel preparedModel); 46 nn::SharedPreparedModel getPreparedModel() const; 47 nn::GeneralResult<nn::SharedPreparedModel> recover( 48 const nn::IPreparedModel* failingPreparedModel) const; 50 nn::ExecutionResult<std::pair<std::vector<nn::OutputShape>, nn::Timing>> execute( 51 const nn::Request& request, nn::MeasureTiming measure, 52 const nn::OptionalTimePoint& deadline, const nn::OptionalDuration& loopTimeoutDuration, [all …]
|
D | InvalidDevice.h | 32 class InvalidDevice final : public nn::IDevice { 34 InvalidDevice(std::string name, std::string versionString, nn::Version featureLevel, 35 nn::DeviceType type, std::vector<nn::Extension> extensions, 36 nn::Capabilities capabilities, 41 nn::Version getFeatureLevel() const override; 42 nn::DeviceType getType() const override; 43 const std::vector<nn::Extension>& getSupportedExtensions() const override; 44 const nn::Capabilities& getCapabilities() const override; 47 nn::GeneralResult<void> wait() const override; 49 nn::GeneralResult<std::vector<bool>> getSupportedOperations( [all …]
|
D | ResilientBurst.h | 33 class ResilientBurst final : public nn::IBurst, 38 using Factory = std::function<nn::GeneralResult<nn::SharedBurst>()>; 40 static nn::GeneralResult<std::shared_ptr<const ResilientBurst>> create(Factory makeBurst); 42 ResilientBurst(PrivateConstructorTag tag, Factory makeBurst, nn::SharedBurst burst); 44 nn::SharedBurst getBurst() const; 45 nn::GeneralResult<nn::SharedBurst> recover(const nn::IBurst* failingBurst) const; 47 OptionalCacheHold cacheMemory(const nn::SharedMemory& memory) const override; 49 nn::ExecutionResult<std::pair<std::vector<nn::OutputShape>, nn::Timing>> execute( 50 const nn::Request& request, nn::MeasureTiming measure, 51 const nn::OptionalTimePoint& deadline, const nn::OptionalDuration& loopTimeoutDuration, [all …]
|
D | InvalidPreparedModel.h | 30 class InvalidPreparedModel final : public nn::IPreparedModel { 32 nn::ExecutionResult<std::pair<std::vector<nn::OutputShape>, nn::Timing>> execute( 33 const nn::Request& request, nn::MeasureTiming measure, 34 const nn::OptionalTimePoint& deadline, const nn::OptionalDuration& loopTimeoutDuration, 35 const std::vector<nn::TokenValuePair>& hints, 36 const std::vector<nn::ExtensionNameAndPrefix>& extensionNameToPrefix) const override; 38 nn::GeneralResult<std::pair<nn::SyncFence, nn::ExecuteFencedInfoCallback>> executeFenced( 39 const nn::Request& request, const std::vector<nn::SyncFence>& waitFor, 40 nn::MeasureTiming measure, const nn::OptionalTimePoint& deadline, 41 const nn::OptionalDuration& loopTimeoutDuration, [all …]
|
/hardware/interfaces/neuralnetworks/utils/common/src/ |
D | InvalidPreparedModel.cpp | 29 nn::ExecutionResult<std::pair<std::vector<nn::OutputShape>, nn::Timing>> 31 const nn::Request& /*request*/, nn::MeasureTiming /*measure*/, in execute() 32 const nn::OptionalTimePoint& /*deadline*/, in execute() 33 const nn::OptionalDuration& /*loopTimeoutDuration*/, in execute() 34 const std::vector<nn::TokenValuePair>& /*hints*/, in execute() 35 const std::vector<nn::ExtensionNameAndPrefix>& /*extensionNameToPrefix*/) const { in execute() 39 nn::GeneralResult<std::pair<nn::SyncFence, nn::ExecuteFencedInfoCallback>> 41 const nn::Request& /*request*/, const std::vector<nn::SyncFence>& /*waitFor*/, in executeFenced() 42 nn::MeasureTiming /*measure*/, const nn::OptionalTimePoint& /*deadline*/, in executeFenced() 43 const nn::OptionalDuration& /*loopTimeoutDuration*/, in executeFenced() [all …]
|
D | InvalidDevice.cpp | 34 InvalidDevice::InvalidDevice(std::string name, std::string versionString, nn::Version featureLevel, in InvalidDevice() 35 nn::DeviceType type, std::vector<nn::Extension> extensions, in InvalidDevice() 36 nn::Capabilities capabilities, in InvalidDevice() 54 nn::Version InvalidDevice::getFeatureLevel() const { in getFeatureLevel() 58 nn::DeviceType InvalidDevice::getType() const { in getType() 62 const std::vector<nn::Extension>& InvalidDevice::getSupportedExtensions() const { in getSupportedExtensions() 66 const nn::Capabilities& InvalidDevice::getCapabilities() const { in getCapabilities() 74 nn::GeneralResult<void> InvalidDevice::wait() const { in wait() 78 nn::GeneralResult<std::vector<bool>> InvalidDevice::getSupportedOperations( in getSupportedOperations() 79 const nn::Model& /*model*/) const { in getSupportedOperations() [all …]
|
/hardware/interfaces/neuralnetworks/1.3/utils/include/nnapi/hal/1.3/ |
D | Conversions.h | 26 namespace android::nn { 69 nn::GeneralResult<OperandType> unvalidatedConvert(const nn::OperandType& operandType); 70 nn::GeneralResult<OperationType> unvalidatedConvert(const nn::OperationType& operationType); 71 nn::GeneralResult<Priority> unvalidatedConvert(const nn::Priority& priority); 72 nn::GeneralResult<Capabilities> unvalidatedConvert(const nn::Capabilities& capabilities); 73 nn::GeneralResult<Capabilities::OperandPerformance> unvalidatedConvert( 74 const nn::Capabilities::OperandPerformance& operandPerformance); 75 nn::GeneralResult<Operation> unvalidatedConvert(const nn::Operation& operation); 76 nn::GeneralResult<OperandLifeTime> unvalidatedConvert(const nn::Operand::LifeTime& operandLifeTime); 77 nn::GeneralResult<Operand> unvalidatedConvert(const nn::Operand& operand); [all …]
|
D | PreparedModel.h | 38 class PreparedModel final : public nn::IPreparedModel, 43 static nn::GeneralResult<std::shared_ptr<const PreparedModel>> create( 49 nn::ExecutionResult<std::pair<std::vector<nn::OutputShape>, nn::Timing>> execute( 50 const nn::Request& request, nn::MeasureTiming measure, 51 const nn::OptionalTimePoint& deadline, const nn::OptionalDuration& loopTimeoutDuration, 52 const std::vector<nn::TokenValuePair>& hints, 53 const std::vector<nn::ExtensionNameAndPrefix>& extensionNameToPrefix) const override; 55 nn::GeneralResult<std::pair<nn::SyncFence, nn::ExecuteFencedInfoCallback>> executeFenced( 56 const nn::Request& request, const std::vector<nn::SyncFence>& waitFor, 57 nn::MeasureTiming measure, const nn::OptionalTimePoint& deadline, [all …]
|
D | Device.h | 41 class Device final : public nn::IDevice { 45 static nn::GeneralResult<std::shared_ptr<const Device>> create(std::string name, 49 nn::DeviceType deviceType, std::vector<nn::Extension> extensions, 50 nn::Capabilities capabilities, std::pair<uint32_t, uint32_t> numberOfCacheFilesNeeded, 55 nn::Version getFeatureLevel() const override; 56 nn::DeviceType getType() const override; 57 const std::vector<nn::Extension>& getSupportedExtensions() const override; 58 const nn::Capabilities& getCapabilities() const override; 61 nn::GeneralResult<void> wait() const override; 63 nn::GeneralResult<std::vector<bool>> getSupportedOperations( [all …]
|
/hardware/interfaces/neuralnetworks/aidl/utils/include/nnapi/hal/aidl/ |
D | Conversions.h | 61 namespace android::nn { 148 namespace nn = ::android::nn; variable 150 nn::GeneralResult<std::vector<uint8_t>> unvalidatedConvert(const nn::CacheToken& cacheToken); 151 nn::GeneralResult<BufferDesc> unvalidatedConvert(const nn::BufferDesc& bufferDesc); 152 nn::GeneralResult<BufferRole> unvalidatedConvert(const nn::BufferRole& bufferRole); 153 nn::GeneralResult<DeviceType> unvalidatedConvert(const nn::DeviceType& deviceType); 154 nn::GeneralResult<bool> unvalidatedConvert(const nn::MeasureTiming& measureTiming); 155 nn::GeneralResult<Memory> unvalidatedConvert(const nn::SharedMemory& memory); 156 nn::GeneralResult<OutputShape> unvalidatedConvert(const nn::OutputShape& outputShape); 157 nn::GeneralResult<ErrorStatus> unvalidatedConvert(const nn::ErrorStatus& errorStatus); [all …]
|
D | PreparedModel.h | 38 class PreparedModel final : public nn::IPreparedModel, 44 static nn::GeneralResult<std::shared_ptr<const PreparedModel>> create( 45 std::shared_ptr<aidl_hal::IPreparedModel> preparedModel, nn::Version featureLevel); 49 nn::Version featureLevel); 51 nn::ExecutionResult<std::pair<std::vector<nn::OutputShape>, nn::Timing>> execute( 52 const nn::Request& request, nn::MeasureTiming measure, 53 const nn::OptionalTimePoint& deadline, const nn::OptionalDuration& loopTimeoutDuration, 54 const std::vector<nn::TokenValuePair>& hints, 55 const std::vector<nn::ExtensionNameAndPrefix>& extensionNameToPrefix) const override; 57 nn::GeneralResult<std::pair<nn::SyncFence, nn::ExecuteFencedInfoCallback>> executeFenced( [all …]
|
D | Device.h | 41 class Device final : public nn::IDevice { 46 static nn::GeneralResult<std::shared_ptr<const Device>> create( 47 std::string name, std::shared_ptr<aidl_hal::IDevice> device, nn::Version featureLevel); 50 nn::Version featureLevel, nn::DeviceType deviceType, 51 std::vector<nn::Extension> extensions, nn::Capabilities capabilities, 57 nn::Version getFeatureLevel() const override; 58 nn::DeviceType getType() const override; 59 const std::vector<nn::Extension>& getSupportedExtensions() const override; 60 const nn::Capabilities& getCapabilities() const override; 63 nn::GeneralResult<void> wait() const override; [all …]
|
/hardware/interfaces/neuralnetworks/1.2/utils/include/nnapi/hal/1.2/ |
D | PreparedModel.h | 39 class PreparedModel final : public nn::IPreparedModel, 44 static nn::GeneralResult<std::shared_ptr<const PreparedModel>> create( 50 nn::ExecutionResult<std::pair<std::vector<nn::OutputShape>, nn::Timing>> execute( 51 const nn::Request& request, nn::MeasureTiming measure, 52 const nn::OptionalTimePoint& deadline, const nn::OptionalDuration& loopTimeoutDuration, 53 const std::vector<nn::TokenValuePair>& hints, 54 const std::vector<nn::ExtensionNameAndPrefix>& extensionNameToPrefix) const override; 56 nn::GeneralResult<std::pair<nn::SyncFence, nn::ExecuteFencedInfoCallback>> executeFenced( 57 const nn::Request& request, const std::vector<nn::SyncFence>& waitFor, 58 nn::MeasureTiming measure, const nn::OptionalTimePoint& deadline, [all …]
|
D | Device.h | 42 nn::GeneralResult<std::string> getVersionStringFrom(V1_2::IDevice* device); 46 nn::GeneralResult<nn::DeviceType> getDeviceTypeFrom(V1_2::IDevice* device); 50 nn::GeneralResult<std::vector<nn::Extension>> getSupportedExtensionsFrom(V1_2::IDevice* device); 54 nn::GeneralResult<std::pair<uint32_t, uint32_t>> getNumberOfCacheFilesNeededFrom( 58 class Device final : public nn::IDevice { 62 static nn::GeneralResult<std::shared_ptr<const Device>> create(std::string name, 66 nn::DeviceType deviceType, std::vector<nn::Extension> extensions, 67 nn::Capabilities capabilities, std::pair<uint32_t, uint32_t> numberOfCacheFilesNeeded, 72 nn::Version getFeatureLevel() const override; 73 nn::DeviceType getType() const override; [all …]
|
D | Conversions.h | 25 namespace android::nn { 67 nn::GeneralResult<OperandType> unvalidatedConvert(const nn::OperandType& operandType); 68 nn::GeneralResult<OperationType> unvalidatedConvert(const nn::OperationType& operationType); 69 nn::GeneralResult<DeviceType> unvalidatedConvert(const nn::DeviceType& deviceType); 70 nn::GeneralResult<Capabilities> unvalidatedConvert(const nn::Capabilities& capabilities); 71 nn::GeneralResult<Capabilities::OperandPerformance> unvalidatedConvert( 72 const nn::Capabilities::OperandPerformance& operandPerformance); 73 nn::GeneralResult<Operation> unvalidatedConvert(const nn::Operation& operation); 74 nn::GeneralResult<SymmPerChannelQuantParams> unvalidatedConvert( 75 const nn::Operand::SymmPerChannelQuantParams& symmPerChannelQuantParams); [all …]
|
/hardware/interfaces/neuralnetworks/1.0/utils/include/nnapi/hal/1.0/ |
D | PreparedModel.h | 39 class PreparedModel final : public nn::IPreparedModel, 44 static nn::GeneralResult<std::shared_ptr<const PreparedModel>> create( 50 nn::ExecutionResult<std::pair<std::vector<nn::OutputShape>, nn::Timing>> execute( 51 const nn::Request& request, nn::MeasureTiming measure, 52 const nn::OptionalTimePoint& deadline, const nn::OptionalDuration& loopTimeoutDuration, 53 const std::vector<nn::TokenValuePair>& hints, 54 const std::vector<nn::ExtensionNameAndPrefix>& extensionNameToPrefix) const override; 56 nn::GeneralResult<std::pair<nn::SyncFence, nn::ExecuteFencedInfoCallback>> executeFenced( 57 const nn::Request& request, const std::vector<nn::SyncFence>& waitFor, 58 nn::MeasureTiming measure, const nn::OptionalTimePoint& deadline, [all …]
|
D | Device.h | 42 class Device final : public nn::IDevice { 46 static nn::GeneralResult<std::shared_ptr<const Device>> create(std::string name, 49 Device(PrivateConstructorTag tag, std::string name, nn::Capabilities capabilities, 54 nn::Version getFeatureLevel() const override; 55 nn::DeviceType getType() const override; 56 const std::vector<nn::Extension>& getSupportedExtensions() const override; 57 const nn::Capabilities& getCapabilities() const override; 60 nn::GeneralResult<void> wait() const override; 62 nn::GeneralResult<std::vector<bool>> getSupportedOperations( 63 const nn::Model& model) const override; [all …]
|
D | Conversions.h | 25 namespace android::nn { 57 nn::GeneralResult<OperandType> unvalidatedConvert(const nn::OperandType& operandType); 58 nn::GeneralResult<OperationType> unvalidatedConvert(const nn::OperationType& operationType); 59 nn::GeneralResult<OperandLifeTime> unvalidatedConvert(const nn::Operand::LifeTime& lifetime); 60 nn::GeneralResult<DeviceStatus> unvalidatedConvert(const nn::DeviceStatus& deviceStatus); 61 nn::GeneralResult<PerformanceInfo> unvalidatedConvert( 62 const nn::Capabilities::PerformanceInfo& performanceInfo); 63 nn::GeneralResult<Capabilities> unvalidatedConvert(const nn::Capabilities& capabilities); 64 nn::GeneralResult<DataLocation> unvalidatedConvert(const nn::DataLocation& location); 65 nn::GeneralResult<Operand> unvalidatedConvert(const nn::Operand& operand); [all …]
|
/hardware/interfaces/neuralnetworks/1.1/utils/include/nnapi/hal/1.1/ |
D | Device.h | 41 class Device final : public nn::IDevice { 45 static nn::GeneralResult<std::shared_ptr<const Device>> create(std::string name, 48 Device(PrivateConstructorTag tag, std::string name, nn::Capabilities capabilities, 53 nn::Version getFeatureLevel() const override; 54 nn::DeviceType getType() const override; 55 const std::vector<nn::Extension>& getSupportedExtensions() const override; 56 const nn::Capabilities& getCapabilities() const override; 59 nn::GeneralResult<void> wait() const override; 61 nn::GeneralResult<std::vector<bool>> getSupportedOperations( 62 const nn::Model& model) const override; [all …]
|
/hardware/interfaces/neuralnetworks/aidl/utils/src/ |
D | PreparedModel.cpp | 45 nn::GeneralResult<std::pair<std::vector<nn::OutputShape>, nn::Timing>> convertExecutionResults( in convertExecutionResults() 47 return std::make_pair(NN_TRY(nn::convert(outputShapes)), NN_TRY(nn::convert(timing))); in convertExecutionResults() 50 nn::GeneralResult<std::pair<nn::Timing, nn::Timing>> convertFencedExecutionResults( in convertFencedExecutionResults() 54 return std::make_pair(NN_TRY(nn::convert(timingLaunched)), NN_TRY(nn::convert(timingFenced))); in convertFencedExecutionResults() 57 nn::ExecutionResult<std::pair<std::vector<nn::OutputShape>, nn::Timing>> handleExecutionResult( in handleExecutionResult() 61 nn::convert(result.outputShapes).value_or(std::vector<nn::OutputShape>{}); in handleExecutionResult() 62 return NN_ERROR(nn::ErrorStatus::OUTPUT_INSUFFICIENT_SIZE, std::move(canonicalOutputShapes)) in handleExecutionResult() 63 << "execution failed with " << nn::ErrorStatus::OUTPUT_INSUFFICIENT_SIZE; in handleExecutionResult() 74 nn::GeneralResult<std::pair<nn::SyncFence, nn::ExecuteFencedInfoCallback>> 77 auto resultSyncFence = nn::SyncFence::createAsSignaled(); in handleFencedExecutionResult() [all …]
|
/hardware/interfaces/neuralnetworks/1.0/utils/src/ |
D | PreparedModel.cpp | 44 nn::GeneralResult<std::shared_ptr<const PreparedModel>> PreparedModel::create( in create() 59 nn::ExecutionResult<std::pair<std::vector<nn::OutputShape>, nn::Timing>> PreparedModel::execute( in execute() 60 const nn::Request& request, nn::MeasureTiming /*measure*/, in execute() 61 const nn::OptionalTimePoint& /*deadline*/, in execute() 62 const nn::OptionalDuration& /*loopTimeoutDuration*/, in execute() 63 const std::vector<nn::TokenValuePair>& /*hints*/, in execute() 64 const std::vector<nn::ExtensionNameAndPrefix>& /*extensionNameToPrefix*/) const { in execute() 66 std::optional<nn::Request> maybeRequestInShared; in execute() 68 const nn::Request& requestInShared = NN_TRY(hal::utils::convertRequestFromPointerToShared( in execute() 69 &request, nn::kDefaultRequestMemoryAlignment, nn::kMinMemoryPadding, in execute() [all …]
|
/hardware/interfaces/neuralnetworks/1.2/utils/src/ |
D | PreparedModel.cpp | 49 nn::GeneralResult<std::shared_ptr<const PreparedModel>> PreparedModel::create( in create() 67 nn::ExecutionResult<std::pair<std::vector<nn::OutputShape>, nn::Timing>> 77 nn::ExecutionResult<std::pair<std::vector<nn::OutputShape>, nn::Timing>> 91 nn::ExecutionResult<std::pair<std::vector<nn::OutputShape>, nn::Timing>> PreparedModel::execute( in execute() 92 const nn::Request& request, nn::MeasureTiming measure, in execute() 93 const nn::OptionalTimePoint& /*deadline*/, in execute() 94 const nn::OptionalDuration& /*loopTimeoutDuration*/, in execute() 95 const std::vector<nn::TokenValuePair>& /*hints*/, in execute() 96 const std::vector<nn::ExtensionNameAndPrefix>& /*extensionNameToPrefix*/) const { in execute() 98 std::optional<nn::Request> maybeRequestInShared; in execute() [all …]
|
/hardware/interfaces/neuralnetworks/1.3/utils/src/ |
D | PreparedModel.cpp | 51 nn::GeneralResult<std::pair<nn::Timing, nn::Timing>> convertFencedExecutionCallbackResults( in convertFencedExecutionCallbackResults() 54 return std::make_pair(NN_TRY(nn::convert(timingLaunched)), NN_TRY(nn::convert(timingFenced))); in convertFencedExecutionCallbackResults() 57 nn::GeneralResult<std::pair<nn::SyncFence, nn::ExecuteFencedInfoCallback>> fencedExecutionCallback( in fencedExecutionCallback() 62 auto resultSyncFence = nn::SyncFence::createAsSignaled(); in fencedExecutionCallback() 64 auto sharedHandle = NN_TRY(nn::convert(syncFence)); in fencedExecutionCallback() 65 resultSyncFence = NN_TRY(nn::SyncFence::create(std::move(sharedHandle))); in fencedExecutionCallback() 69 return NN_ERROR(nn::ErrorStatus::GENERAL_FAILURE) << "callback is null"; in fencedExecutionCallback() 73 nn::ExecuteFencedInfoCallback resultCallback = in fencedExecutionCallback() 74 [callback]() -> nn::GeneralResult<std::pair<nn::Timing, nn::Timing>> { in fencedExecutionCallback() 88 nn::GeneralResult<std::shared_ptr<const PreparedModel>> PreparedModel::create( in create() [all …]
|
/hardware/interfaces/neuralnetworks/1.1/utils/src/ |
D | Device.cpp | 48 nn::GeneralResult<nn::Capabilities> capabilitiesCallback(V1_0::ErrorStatus status, in capabilitiesCallback() 51 return nn::convert(capabilities); in capabilitiesCallback() 54 nn::GeneralResult<nn::Capabilities> getCapabilitiesFrom(V1_1::IDevice* device) { in getCapabilitiesFrom() 67 nn::GeneralResult<std::shared_ptr<const Device>> Device::create(std::string name, in create() 70 return NN_ERROR(nn::ErrorStatus::INVALID_ARGUMENT) in create() 74 return NN_ERROR(nn::ErrorStatus::INVALID_ARGUMENT) in create() 86 Device::Device(PrivateConstructorTag /*tag*/, std::string name, nn::Capabilities capabilities, in Device() 101 nn::Version Device::getFeatureLevel() const { in getFeatureLevel() 105 nn::DeviceType Device::getType() const { in getType() 106 return nn::DeviceType::UNKNOWN; in getType() [all …]
|