Home
last modified time | relevance | path

Searched refs:aidl_hal (Results 1 – 20 of 20) sorted by relevance

/packages/modules/NeuralNetworks/driver/sample_aidl/
DSampleDriver.cpp64 constexpr aidl_hal::Timing kNoTiming = {.timeOnDeviceNs = -1, .timeInDriverNs = -1};
75 ndk::ScopedAStatus SampleDriver::getType(aidl_hal::DeviceType* deviceType) { in getType()
77 *deviceType = aidl_hal::DeviceType::CPU; in getType()
82 std::vector<aidl_hal::Extension>* supportedExtensions) { in getSupportedExtensions()
90 aidl_hal::NumberOfCacheFiles* numberOfCacheFiles) { in getNumberOfCacheFilesNeeded()
100 const aidl_hal::Model& model, aidl_hal::ExecutionPreference preference, in prepareModel()
101 aidl_hal::Priority priority, int64_t deadlineNs, in prepareModel()
105 const std::shared_ptr<aidl_hal::IPreparedModelCallback>& callback) { in prepareModel()
107 auto copiedModel = aidl_hal::utils::clone(model); in prepareModel()
109 return toAStatus(aidl_hal::ErrorStatus::GENERAL_FAILURE, copiedModel.error().message); in prepareModel()
[all …]
DSampleDriver.h37 class SampleBuffer : public aidl_hal::BnBuffer {
45 ndk::ScopedAStatus copyFrom(const aidl_hal::Memory& src,
47 ndk::ScopedAStatus copyTo(const aidl_hal::Memory& dst) override;
59 class SampleDriver : public aidl_hal::BnDevice {
68 ndk::ScopedAStatus allocate(const aidl_hal::BufferDesc& desc,
69 const std::vector<aidl_hal::IPreparedModelParcel>& preparedModels,
70 const std::vector<aidl_hal::BufferRole>& inputRoles,
71 const std::vector<aidl_hal::BufferRole>& outputRoles,
72 aidl_hal::DeviceBuffer* buffer) override;
74 aidl_hal::NumberOfCacheFiles* numberOfCacheFiles) override;
[all …]
DSampleDriverUtils.cpp38 void notify(const std::shared_ptr<aidl_hal::IPreparedModelCallback>& callback, in notify()
39 const aidl_hal::ErrorStatus& status, in notify()
40 const std::shared_ptr<aidl_hal::IPreparedModel>& preparedModel) { in notify()
48 ndk::ScopedAStatus toAStatus(aidl_hal::ErrorStatus errorStatus) { in toAStatus()
49 if (errorStatus == aidl_hal::ErrorStatus::NONE) { in toAStatus()
55 ndk::ScopedAStatus toAStatus(aidl_hal::ErrorStatus errorStatus, const std::string& errorMessage) { in toAStatus()
56 if (errorStatus == aidl_hal::ErrorStatus::NONE) { in toAStatus()
64 aidl_hal::Model&& model, const SampleDriver* driver, in prepareModelBase()
65 aidl_hal::ExecutionPreference preference, aidl_hal::Priority priority, int64_t halDeadline, in prepareModelBase()
66 const std::shared_ptr<aidl_hal::IPreparedModelCallback>& callback, in prepareModelBase()
[all …]
DSampleDriverPartial.cpp39 const aidl_hal::Model& model, std::vector<bool>* supportedOperations) { in getSupportedOperations()
43 return toAStatus(aidl_hal::ErrorStatus::INVALID_ARGUMENT, canonicalModel.error().message); in getSupportedOperations()
50 const aidl_hal::Model& model, aidl_hal::ExecutionPreference preference, in prepareModel()
51 aidl_hal::Priority priority, int64_t deadline, in prepareModel()
54 const std::shared_ptr<aidl_hal::IPreparedModelCallback>& callback) { in prepareModel()
57 notify(callback, aidl_hal::ErrorStatus::INVALID_ARGUMENT, nullptr); in prepareModel()
58 return toAStatus(aidl_hal::ErrorStatus::INVALID_ARGUMENT, canonicalModel.error().message); in prepareModel()
63 auto copiedModel = aidl_hal::utils::clone(model); in prepareModel()
65 return toAStatus(aidl_hal::ErrorStatus::GENERAL_FAILURE, copiedModel.error().message); in prepareModel()
DSampleDriverUtils.h31 void notify(const std::shared_ptr<aidl_hal::IPreparedModelCallback>& callback,
32 const aidl_hal::ErrorStatus& status,
33 const std::shared_ptr<aidl_hal::IPreparedModel>& preparedModel);
36 aidl_hal::Model&& model, const SampleDriver* driver,
37 aidl_hal::ExecutionPreference preference, aidl_hal::Priority priority, int64_t halDeadline,
38 const std::shared_ptr<aidl_hal::IPreparedModelCallback>& callback,
41 ndk::ScopedAStatus toAStatus(aidl_hal::ErrorStatus errorStatus);
42 ndk::ScopedAStatus toAStatus(aidl_hal::ErrorStatus errorStatus, const std::string& errorMessage);
DSampleDriverPartial.h41 ndk::ScopedAStatus getSupportedOperations(const aidl_hal::Model& model,
44 const aidl_hal::Model& model, aidl_hal::ExecutionPreference preference,
45 aidl_hal::Priority priority, int64_t deadline,
49 const std::shared_ptr<aidl_hal::IPreparedModelCallback>& callback) override;
DSampleDriverFull.h30 SampleDriverFull(const char* name, aidl_hal::PerformanceInfo perf) in SampleDriverFull()
32 ndk::ScopedAStatus getCapabilities(aidl_hal::Capabilities* capabilities) override;
33 ndk::ScopedAStatus getSupportedOperations(const aidl_hal::Model& model,
37 aidl_hal::PerformanceInfo mPerf;
DSampleDriverMinimal.cpp36 ndk::ScopedAStatus getCapabilities(aidl_hal::Capabilities* capabilities) override;
42 ndk::ScopedAStatus SampleDriverMinimal::getCapabilities(aidl_hal::Capabilities* capabilities) { in getCapabilities()
52 update(&capabilities->operandPerformance, aidl_hal::OperandType::TENSOR_FLOAT32, in getCapabilities()
54 update(&capabilities->operandPerformance, aidl_hal::OperandType::FLOAT32, in getCapabilities()
DSampleDriverFloatSlow.cpp37 ndk::ScopedAStatus getCapabilities(aidl_hal::Capabilities* capabilities) override;
43 ndk::ScopedAStatus SampleDriverFloatSlow::getCapabilities(aidl_hal::Capabilities* capabilities) { in getCapabilities()
53 update(&capabilities->operandPerformance, aidl_hal::OperandType::TENSOR_FLOAT32, in getCapabilities()
55 update(&capabilities->operandPerformance, aidl_hal::OperandType::FLOAT32, in getCapabilities()
DSampleDriverFloatFast.cpp38 ndk::ScopedAStatus getCapabilities(aidl_hal::Capabilities* capabilities) override;
44 ndk::ScopedAStatus SampleDriverFloatFast::getCapabilities(aidl_hal::Capabilities* capabilities) { in getCapabilities()
54 update(&capabilities->operandPerformance, aidl_hal::OperandType::TENSOR_FLOAT32, in getCapabilities()
56 update(&capabilities->operandPerformance, aidl_hal::OperandType::FLOAT32, in getCapabilities()
DSampleDriverFull.cpp35 ndk::ScopedAStatus SampleDriverFull::getCapabilities(aidl_hal::Capabilities* capabilities) { in getCapabilities()
47 const aidl_hal::Model& model, std::vector<bool>* supportedOperations) { in getSupportedOperations()
51 return toAStatus(aidl_hal::ErrorStatus::INVALID_ARGUMENT, canonicalModel.error().message); in getSupportedOperations()
DSampleDriverQuant.cpp36 ndk::ScopedAStatus getCapabilities(aidl_hal::Capabilities* capabilities) override;
42 ndk::ScopedAStatus SampleDriverQuant::getCapabilities(aidl_hal::Capabilities* capabilities) { in getCapabilities()
/packages/modules/NeuralNetworks/common/
DAidlHalUtils.cpp35 std::vector<aidl_hal::OperandPerformance> nonExtensionOperandPerformance( in nonExtensionOperandPerformance()
36 aidl_hal::PerformanceInfo perf) { in nonExtensionOperandPerformance()
37 static constexpr ndk::enum_range<aidl_hal::OperandType> kOperandTypeRange; in nonExtensionOperandPerformance()
38 std::vector<aidl_hal::OperandPerformance> ret; in nonExtensionOperandPerformance()
40 for (aidl_hal::OperandType type : kOperandTypeRange) { in nonExtensionOperandPerformance()
41 if (type != aidl_hal::OperandType::SUBGRAPH) { in nonExtensionOperandPerformance()
42 ret.push_back(aidl_hal::OperandPerformance{type, perf}); in nonExtensionOperandPerformance()
46 [](const aidl_hal::OperandPerformance& a, const aidl_hal::OperandPerformance& b) { in nonExtensionOperandPerformance()
53 void update(std::vector<aidl_hal::OperandPerformance>* operandPerformance, in update()
54 aidl_hal::OperandType type, aidl_hal::PerformanceInfo perf) { in update()
[all …]
DAidlValidateHal.cpp37 const aidl_hal::BufferDesc& desc, in validateMemoryDesc()
38 const std::vector<std::shared_ptr<aidl_hal::IPreparedModel>>& preparedModels, in validateMemoryDesc()
39 const std::vector<aidl_hal::BufferRole>& inputRoles, in validateMemoryDesc()
40 const std::vector<aidl_hal::BufferRole>& outputRoles, in validateMemoryDesc()
41 std::function<const aidl_hal::Model*(const std::shared_ptr<aidl_hal::IPreparedModel>&)> in validateMemoryDesc()
44 aidl_hal::Operand* combinedOperand) { in validateMemoryDesc()
49 std::vector<aidl_hal::Operand> operands; in validateMemoryDesc()
127 combinedOperand->dimensions = aidl_hal::utils::toSigned(dimensions).value(); in validateMemoryDesc()
DAidlBufferTracker.cpp61 const aidl_hal::IPreparedModel* preparedModel) const { in validateRequest()
/packages/modules/NeuralNetworks/common/include/
DAidlValidateHal.h32 using AidlHalPreparedModelRole = std::tuple<const aidl_hal::IPreparedModel*, IOType, uint32_t>;
35 const aidl_hal::BufferDesc& desc,
36 const std::vector<std::shared_ptr<aidl_hal::IPreparedModel>>& preparedModels,
37 const std::vector<aidl_hal::BufferRole>& inputRoles,
38 const std::vector<aidl_hal::BufferRole>& outputRoles,
39 std::function<const aidl_hal::Model*(const std::shared_ptr<aidl_hal::IPreparedModel>&)>
41 std::set<AidlHalPreparedModelRole>* preparedModelRoles, aidl_hal::Operand* combinedOperand);
DAidlHalUtils.h34 std::vector<aidl_hal::OperandPerformance> nonExtensionOperandPerformance(
35 aidl_hal::PerformanceInfo perf);
40 void update(std::vector<aidl_hal::OperandPerformance>* operandPerformance,
41 aidl_hal::OperandType type, aidl_hal::PerformanceInfo perf);
44 bool isExtensionOperandType(aidl_hal::OperandType type);
46 aidl_hal::ErrorStatus convertResultCodeToAidlErrorStatus(int resultCode);
DAidlHalInterfaces.h66 namespace aidl_hal = ::aidl::android::hardware::neuralnetworks; variable
68 inline constexpr aidl_hal::Priority kDefaultPriorityAidl = aidl_hal::Priority::MEDIUM;
DAidlBufferTracker.h54 const aidl_hal::IPreparedModel* preparedModel) const;
/packages/modules/NeuralNetworks/shim_and_sl/
DShimDevice.cpp259 return toAStatus(aidl_hal::ErrorStatus::INVALID_ARGUMENT, in copyFrom()