Home
last modified time | relevance | path

Searched refs:nn (Results 1 – 25 of 160) sorted by relevance

1234567

/hardware/interfaces/neuralnetworks/utils/common/include/nnapi/hal/
DResilientDevice.h35 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 …]
DResilientPreparedModel.h33 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,
[all …]
DInvalidDevice.h32 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 …]
DInvalidPreparedModel.h30 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,
35 const nn::OptionalDuration& loopTimeoutDuration) const override;
37 nn::GeneralResult<std::pair<nn::SyncFence, nn::ExecuteFencedInfoCallback>> executeFenced(
38 const nn::Request& request, const std::vector<nn::SyncFence>& waitFor,
39 nn::MeasureTiming measure, const nn::OptionalTimePoint& deadline,
40 const nn::OptionalDuration& loopTimeoutDuration,
41 const nn::OptionalDuration& timeoutDurationAfterFence) const override;
[all …]
DResilientBurst.h33 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,
[all …]
/hardware/interfaces/neuralnetworks/aidl/utils/include/nnapi/hal/aidl/
DConversions.h56 namespace android::nn {
129 namespace nn = ::android::nn; variable
131 nn::GeneralResult<std::vector<uint8_t>> unvalidatedConvert(const nn::CacheToken& cacheToken);
132 nn::GeneralResult<BufferDesc> unvalidatedConvert(const nn::BufferDesc& bufferDesc);
133 nn::GeneralResult<BufferRole> unvalidatedConvert(const nn::BufferRole& bufferRole);
134 nn::GeneralResult<bool> unvalidatedConvert(const nn::MeasureTiming& measureTiming);
135 nn::GeneralResult<Memory> unvalidatedConvert(const nn::SharedMemory& memory);
136 nn::GeneralResult<OutputShape> unvalidatedConvert(const nn::OutputShape& outputShape);
137 nn::GeneralResult<ErrorStatus> unvalidatedConvert(const nn::ErrorStatus& errorStatus);
138 nn::GeneralResult<ExecutionPreference> unvalidatedConvert(
[all …]
DPreparedModel.h38 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,
52 const nn::OptionalDuration& loopTimeoutDuration) const override;
54 nn::GeneralResult<std::pair<nn::SyncFence, nn::ExecuteFencedInfoCallback>> executeFenced(
55 const nn::Request& request, const std::vector<nn::SyncFence>& waitFor,
56 nn::MeasureTiming measure, const nn::OptionalTimePoint& deadline,
57 const nn::OptionalDuration& loopTimeoutDuration,
[all …]
DDevice.h41 class Device final : public nn::IDevice {
45 static nn::GeneralResult<std::shared_ptr<const Device>> create(
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/utils/common/src/
DInvalidPreparedModel.cpp29 nn::ExecutionResult<std::pair<std::vector<nn::OutputShape>, nn::Timing>>
30 InvalidPreparedModel::execute(const nn::Request& /*request*/, nn::MeasureTiming /*measure*/, in execute()
31 const nn::OptionalTimePoint& /*deadline*/, in execute()
32 const nn::OptionalDuration& /*loopTimeoutDuration*/) const { in execute()
36 nn::GeneralResult<std::pair<nn::SyncFence, nn::ExecuteFencedInfoCallback>>
38 const nn::Request& /*request*/, const std::vector<nn::SyncFence>& /*waitFor*/, in executeFenced()
39 nn::MeasureTiming /*measure*/, const nn::OptionalTimePoint& /*deadline*/, in executeFenced()
40 const nn::OptionalDuration& /*loopTimeoutDuration*/, in executeFenced()
41 const nn::OptionalDuration& /*timeoutDurationAfterFence*/) const { in executeFenced()
45 nn::GeneralResult<nn::SharedExecution> InvalidPreparedModel::createReusableExecution( in createReusableExecution()
[all …]
DInvalidDevice.cpp34 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 …]
DResilientPreparedModel.cpp48 if (result.has_value() || result.error().code != nn::ErrorStatus::DEAD_OBJECT) { in protect()
68 nn::GeneralResult<std::shared_ptr<const ResilientPreparedModel>> ResilientPreparedModel::create( in create()
71 return NN_ERROR(nn::ErrorStatus::INVALID_ARGUMENT) in create()
82 nn::SharedPreparedModel preparedModel) in ResilientPreparedModel()
88 nn::SharedPreparedModel ResilientPreparedModel::getPreparedModel() const { in getPreparedModel()
93 nn::GeneralResult<nn::SharedPreparedModel> ResilientPreparedModel::recover( in recover()
94 const nn::IPreparedModel* failingPreparedModel) const { in recover()
106 nn::ExecutionResult<std::pair<std::vector<nn::OutputShape>, nn::Timing>>
107 ResilientPreparedModel::execute(const nn::Request& request, nn::MeasureTiming measure, in execute()
108 const nn::OptionalTimePoint& deadline, in execute()
[all …]
/hardware/interfaces/neuralnetworks/1.2/utils/include/nnapi/hal/1.2/
DDevice.h42 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 …]
DPreparedModel.h39 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,
53 const nn::OptionalDuration& loopTimeoutDuration) 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,
58 const nn::OptionalDuration& loopTimeoutDuration,
[all …]
DConversions.h25 namespace android::nn {
68 nn::GeneralResult<OperandType> unvalidatedConvert(const nn::OperandType& operandType);
69 nn::GeneralResult<OperationType> unvalidatedConvert(const nn::OperationType& operationType);
70 nn::GeneralResult<DeviceType> unvalidatedConvert(const nn::DeviceType& deviceType);
71 nn::GeneralResult<Capabilities> unvalidatedConvert(const nn::Capabilities& capabilities);
72 nn::GeneralResult<Capabilities::OperandPerformance> unvalidatedConvert(
73 const nn::Capabilities::OperandPerformance& operandPerformance);
74 nn::GeneralResult<Operation> unvalidatedConvert(const nn::Operation& operation);
75 nn::GeneralResult<SymmPerChannelQuantParams> unvalidatedConvert(
76 const nn::Operand::SymmPerChannelQuantParams& symmPerChannelQuantParams);
[all …]
/hardware/interfaces/neuralnetworks/1.3/utils/include/nnapi/hal/1.3/
DDevice.h41 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 …]
DPreparedModel.h38 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,
52 const nn::OptionalDuration& loopTimeoutDuration) const override;
54 nn::GeneralResult<std::pair<nn::SyncFence, nn::ExecuteFencedInfoCallback>> executeFenced(
55 const nn::Request& request, const std::vector<nn::SyncFence>& waitFor,
56 nn::MeasureTiming measure, const nn::OptionalTimePoint& deadline,
57 const nn::OptionalDuration& loopTimeoutDuration,
[all …]
/hardware/interfaces/neuralnetworks/1.1/utils/include/nnapi/hal/1.1/
DDevice.h41 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/1.0/utils/include/nnapi/hal/1.0/
DDevice.h41 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 …]
DConversions.h25 namespace android::nn {
56 nn::GeneralResult<OperandType> unvalidatedConvert(const nn::OperandType& operandType);
57 nn::GeneralResult<OperationType> unvalidatedConvert(const nn::OperationType& operationType);
58 nn::GeneralResult<OperandLifeTime> unvalidatedConvert(const nn::Operand::LifeTime& lifetime);
59 nn::GeneralResult<DeviceStatus> unvalidatedConvert(const nn::DeviceStatus& deviceStatus);
60 nn::GeneralResult<PerformanceInfo> unvalidatedConvert(
61 const nn::Capabilities::PerformanceInfo& performanceInfo);
62 nn::GeneralResult<Capabilities> unvalidatedConvert(const nn::Capabilities& capabilities);
63 nn::GeneralResult<DataLocation> unvalidatedConvert(const nn::DataLocation& location);
64 nn::GeneralResult<Operand> unvalidatedConvert(const nn::Operand& operand);
[all …]
DPreparedModel.h38 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,
52 const nn::OptionalDuration& loopTimeoutDuration) const override;
54 nn::GeneralResult<std::pair<nn::SyncFence, nn::ExecuteFencedInfoCallback>> executeFenced(
55 const nn::Request& request, const std::vector<nn::SyncFence>& waitFor,
56 nn::MeasureTiming measure, const nn::OptionalTimePoint& deadline,
57 const nn::OptionalDuration& loopTimeoutDuration,
[all …]
/hardware/interfaces/neuralnetworks/1.0/utils/src/
DDevice.cpp48 nn::GeneralResult<nn::Capabilities> capabilitiesCallback(ErrorStatus status, in capabilitiesCallback()
51 return nn::convert(capabilities); in capabilitiesCallback()
54 nn::GeneralResult<nn::Capabilities> getCapabilitiesFrom(V1_0::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()
102 return nn::Version::ANDROID_OC_MR1; in getFeatureLevel()
105 nn::DeviceType Device::getType() const { in getType()
[all …]
DPreparedModel.cpp44 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*/) const { in execute()
64 std::optional<nn::Request> maybeRequestInShared; in execute()
66 const nn::Request& requestInShared = in execute()
68 &request, nn::kDefaultRequestMemoryAlignment, nn::kMinMemoryPadding, in execute()
76 nn::ExecutionResult<std::pair<std::vector<nn::OutputShape>, nn::Timing>>
97 nn::GeneralResult<std::pair<nn::SyncFence, nn::ExecuteFencedInfoCallback>>
[all …]
/hardware/interfaces/neuralnetworks/1.2/utils/src/
DPreparedModel.cpp49 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*/) const { in execute()
96 std::optional<nn::Request> maybeRequestInShared; in execute()
98 const nn::Request& requestInShared = in execute()
100 &request, nn::kDefaultRequestMemoryAlignment, nn::kMinMemoryPadding, in execute()
[all …]
/hardware/interfaces/neuralnetworks/aidl/utils/src/
DPreparedModel.cpp46 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()
[all …]
/hardware/interfaces/neuralnetworks/1.1/utils/src/
DDevice.cpp48 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()
102 return nn::Version::ANDROID_P; in getFeatureLevel()
105 nn::DeviceType Device::getType() const { in getType()
[all …]

1234567