Home
last modified time | relevance | path

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

/packages/modules/NeuralNetworks/runtime/include/
DNeuralNetworksWrapper.h188 Memory(const NnApiSupportLibrary* nnapi, ANeuralNetworksMemory* memory) in Memory() argument
189 : mNnApi(nnapi), mMemory(memory) {} in Memory()
191 Memory(const NnApiSupportLibrary* nnapi, size_t size, int protect, int fd, size_t offset) argument
192 : mNnApi(nnapi) {
201 Memory(const NnApiSupportLibrary* nnapi, AHardwareBuffer* buffer) : mNnApi(nnapi) { argument
252 Model(const NnApiSupportLibrary* nnapi) : mNnApi(nnapi) { argument
378 Event(const NnApiSupportLibrary* nnapi) : mNnApi(nnapi) {} argument
379 Event(const NnApiSupportLibrary* nnapi, int syncFd) : mNnApi(nnapi) { argument
453 static std::pair<Result, Compilation> createForDevice(const NnApiSupportLibrary* nnapi, argument
456 return createForDevices(nnapi, model, {device});
[all …]
/packages/modules/NeuralNetworks/shim_and_sl/include/
DSupportLibraryWrapper.h51 Memory(const NnApiSupportLibrary* nnapi, ANeuralNetworksMemory* memory) in Memory() argument
52 : mNnApi(nnapi), mMemory(memory), mSize(0) {} in Memory()
55 Memory(const NnApiSupportLibrary* nnapi, size_t size, int protect, int fd, size_t offset,
57 : mNnApi(nnapi), mOwnedFd(ownsFd ? std::optional<int>{fd} : std::nullopt), mSize(size) { in mNnApi() argument
63 Memory(const NnApiSupportLibrary* nnapi, AHardwareBuffer* buffer, bool ownAHWB, size_t size) in Memory() argument
64 : mNnApi(nnapi), mOwnedAHWB(ownAHWB ? buffer : nullptr), mSize(size) { in Memory()
70 Memory(const NnApiSupportLibrary* nnapi, ANeuralNetworksMemoryDesc* desc, size_t size) in Memory() argument
71 : mNnApi(nnapi), mSize(size) { in Memory()
141 Model(const NnApiSupportLibrary* nnapi) : mNnApi(nnapi) { in Model() argument
349 static std::pair<Result, Compilation> createForDevice(const NnApiSupportLibrary* nnapi, in createForDevice() argument
[all …]
DShimConverter.h51 std::optional<ShimConvertedModel> convertFromHAL(const NnApiSupportLibrary* nnapi,
56 const NnApiSupportLibrary* nnapi, const neuralnetworks::Memory& pool);
DShimPreparedModel.h33 ShimPreparedModel(std::shared_ptr<const NnApiSupportLibrary> nnapi, in ShimPreparedModel() argument
39 : mNnapi(nnapi), in ShimPreparedModel()
/packages/modules/NeuralNetworks/runtime/test/
DGeneratedTestUtils.cpp59 static std::unique_ptr<MemoryAHWB> create(const NnApiSupportLibrary* nnapi, uint32_t size) { in create() argument
81 return std::unique_ptr<MemoryAHWB>(new MemoryAHWB(nnapi, ahwb, buffer)); in create()
96 MemoryAHWB(const NnApiSupportLibrary* nnapi, AHardwareBuffer* ahwb, void* buffer) in create() argument
97 : Memory(nnapi, ahwb, false, {}), mAhwb(ahwb), mBuffer(buffer) {} in create()
107 static std::unique_ptr<MemoryAHWB> createConstantReferenceMemory(const NnApiSupportLibrary* nnapi, argument
127 return size == 0 ? nullptr : MemoryAHWB::create(nnapi, size);
188 void createModel(const NnApiSupportLibrary* nnapi, const TestModel& testModel, argument
196 std::unique_ptr<MemoryAHWB> memory = createConstantReferenceMemory(nnapi, testModel);
205 refModels.push_back(Model(nnapi));
DGeneratedTestUtils.h58 GeneratedModel(const NnApiSupportLibrary* nnapi) : sl_wrapper::Model(nnapi) {} in GeneratedModel() argument
87 void createModel(const NnApiSupportLibrary* nnapi, const test_helper::TestModel& testModel,
89 inline void createModel(const NnApiSupportLibrary* nnapi, const test_helper::TestModel& testModel, in createModel() argument
91 createModel(nnapi, testModel, /*testDynamicOutputShape=*/false, model); in createModel()
DSupportLibraryTestUtils.h39 static std::unique_ptr<TestAshmem> createFrom(const NnApiSupportLibrary* nnapi, in createFrom() argument
41 return createFrom(nnapi, buffer.get<void>(), buffer.size()); in createFrom()
45 static std::unique_ptr<TestAshmem> createFrom(const NnApiSupportLibrary* nnapi, in createFrom() argument
59 sl_wrapper::Memory memory(nnapi, length, PROT_READ | PROT_WRITE, fd, 0); in createFrom()
DTestGpuNnapi.cpp805 auto nnapi = std::make_unique<NnapiExecutor>(input, output); in create() local
806 nnapi->initialize(device); in create()
807 return nnapi->mIsValid ? std::move(nnapi) : nullptr; in create()
952 auto nnapi = NnapiExecutor<dataType>::create(kDevice, mGpuOutput, mNnapiOutput); in runTest() local
953 if (nnapi == nullptr) return; in runTest()
960 auto [nnapiSuccess, nnapiSyncFd] = nnapi->run(gpuSyncFd); in runTest()
/packages/modules/NeuralNetworks/shim_and_sl/
DShimDeviceManager.cpp84 const std::shared_ptr<const NnApiSupportLibrary>& nnapi) { in getNamedDevices() argument
86 if (nnapi->ANeuralNetworks_getDeviceCount(&numDevices) != ANEURALNETWORKS_NO_ERROR) { in getNamedDevices()
94 if (nnapi->ANeuralNetworks_getDevice(i, &device) != ANEURALNETWORKS_NO_ERROR) { in getNamedDevices()
100 if (nnapi->ANeuralNetworksDevice_getName(device, &name) != ANEURALNETWORKS_NO_ERROR) { in getNamedDevices()
139 const std::shared_ptr<const NnApiSupportLibrary> nnapi = in registerDevices() local
145 const auto nameToDevice = getNamedDevices(nnapi); in registerDevices()
156 auto shimDevice = ndk::SharedRefBase::make<ShimDevice>(nnapi, device, info.serviceName); in registerDevices()
DShimDevice.cpp101 Capabilities getCapabilities(const NnApiSupportLibrary* nnapi, ANeuralNetworksDevice* device) { in getCapabilities() argument
105 nnapi->SL_ANeuralNetworksDevice_getPerformanceInfo( in getCapabilities()
109 nnapi->SL_ANeuralNetworksDevice_getPerformanceInfo( in getCapabilities()
113 nnapi->SL_ANeuralNetworksDevice_getPerformanceInfo( in getCapabilities()
117 nnapi->SL_ANeuralNetworksDevice_getPerformanceInfo( in getCapabilities()
129 nnapi->SL_ANeuralNetworksDevice_forEachOperandPerformanceInfo( in getCapabilities()
135 NumberOfCacheFiles getNumberOfCacheFilesNeeded(const NnApiSupportLibrary* nnapi, in getNumberOfCacheFilesNeeded() argument
139 nnapi->SL_ANeuralNetworksDevice_getNumberOfCacheFilesNeeded(device, &numModelCacheFiles, in getNumberOfCacheFilesNeeded()
147 std::vector<Extension> getVendorExtensions(const NnApiSupportLibrary* nnapi, in getVendorExtensions() argument
150 nnapi->SL_ANeuralNetworksDevice_getVendorExtensionCount(device, &vendorExtensionCount); in getVendorExtensions()
[all …]
DShimConverter.cpp47 const NnApiSupportLibrary* nnapi, in convertSubgraphFromHAL() argument
59 ::android::nn::sl_wrapper::Model resultModel(nnapi); in convertSubgraphFromHAL()
154 auto subgraph = convertSubgraphFromHAL(nnapi, memoryPools, model, allModels, in convertSubgraphFromHAL()
355 std::optional<ShimConvertedModel> convertFromHAL(const NnApiSupportLibrary* nnapi, in convertFromHAL() argument
375 std::unique_ptr<::android::nn::sl_wrapper::Memory> memory = convertFromHAL(nnapi, pool); in convertFromHAL()
392 if (convertSubgraphFromHAL(nnapi, memoryPools, model, &allModels, i, *copiedOperandValues, in convertFromHAL()
415 const NnApiSupportLibrary* nnapi, const neuralnetworks::Memory& pool) { in convertFromHAL() argument
424 nnapi, size, PROT_READ | PROT_WRITE, fd, 0, /*ownsFd=*/false); in convertFromHAL()
438 nnapi, size, prot, fd, offset, /*ownsFd=*/false); in convertFromHAL()
484 std::make_unique<::android::nn::sl_wrapper::Memory>(nnapi, ahwb, in convertFromHAL()
/packages/modules/NeuralNetworks/tools/api/
DTypes.t37 #include "nnapi/OperandTypes.h"
38 #include "nnapi/OperationTypes.h"
39 #include "nnapi/Result.h"
Dgenerate_api.sh31 CANONICALDIR=${ANDROID_BUILD_TOP}/packages/modules/NeuralNetworks/common/include/nnapi
/packages/modules/NeuralNetworks/driver/sample_shim/config/
Dandroid.hardware.neuralnetworks-shell-service-sample.rc2 interface aidl android.hardware.neuralnetworks.IDevice/nnapi-sample_sl_updatable
/packages/modules/NeuralNetworks/runtime/test/specs/
Dvisualize_spec.sh27 LOG_DIR=$(mktemp -d)/nnapi-spec-html
/packages/modules/NeuralNetworks/
DTEST_MAPPING41 "path": "external/tensorflow/tensorflow/lite/delegates/nnapi"
/packages/modules/NeuralNetworks/runtime/test/fuzzing/
Dvisualize_random_graph.sh27 LOG_DIR=$(mktemp -d)/nnapi-fuzzing-logs
/packages/modules/NeuralNetworks/tools/test_generator/test_harness/
DAndroid.bp44 local_include_dirs: ["include/nnapi"],
/packages/modules/NeuralNetworks/tools/
Dbuild_and_run_benchmark.sh25 LOGDIR=$(mktemp -d)/nnapi-logs
/packages/modules/NeuralNetworks/common/
DAndroid.bp433 local_include_dirs: ["include/nnapi"],
461 local_include_dirs: ["include/nnapi"],