Home
last modified time | relevance | path

Searched refs:model (Results 1 – 25 of 213) sorted by relevance

123456789

/hardware/interfaces/neuralnetworks/1.0/vts/functional/
DValidateModel.cpp37 const Model& model) { in validateGetSupportedOperations() argument
41 device->getSupportedOperations(model, [&](ErrorStatus status, const hidl_vec<bool>&) { in validateGetSupportedOperations()
48 const Model& model) { in validatePrepareModel() argument
52 Return<ErrorStatus> prepareLaunchStatus = device->prepareModel(model, preparedModelCallback); in validatePrepareModel()
68 Model model = originalModel; in validate() local
69 mutate(&model); in validate()
71 validateGetSupportedOperations(device, message, model); in validate()
72 validatePrepareModel(device, message, model); in validate()
75 static uint32_t addOperand(Model* model) { in addOperand() argument
76 return hidl_vec_push_back(&model->operands, in addOperand()
[all …]
DVtsHalNeuralnetworks.cpp33 void createPreparedModel(const sp<IDevice>& device, const Model& model, in createPreparedModel() argument
41 model, [&fullySupportsModel](ErrorStatus status, const hidl_vec<bool>& supported) { in createPreparedModel()
52 device->prepareModel(model, preparedModelCallback); in createPreparedModel()
117 void validateModel(const sp<IDevice>& device, const Model& model);
121 void validateEverything(const sp<IDevice>& device, const Model& model, const Request& request) { in validateEverything() argument
122 validateModel(device, model); in validateEverything()
126 createPreparedModel(device, model, &preparedModel); in validateEverything()
133 const Model model = createModel(kTestModel); in TEST_P() local
137 validateEverything(kDevice, model, request); in TEST_P()
/hardware/interfaces/neuralnetworks/1.1/vts/functional/
DValidateModel.cpp44 const Model& model) { in validateGetSupportedOperations() argument
48 model, [&](ErrorStatus status, const hidl_vec<bool>&) { in validateGetSupportedOperations()
55 const Model& model, ExecutionPreference preference) { in validatePrepareModel() argument
60 device->prepareModel_1_1(model, preference, preparedModelCallback); in validatePrepareModel()
83 Model model = originalModel; in validate() local
85 mutate(&model, &preference); in validate()
88 validateGetSupportedOperations(device, message, model); in validate()
91 validatePrepareModel(device, message, model, preference); in validate()
94 static uint32_t addOperand(Model* model) { in addOperand() argument
95 return hidl_vec_push_back(&model->operands, in addOperand()
[all …]
DVtsHalNeuralnetworks.cpp36 void createPreparedModel(const sp<IDevice>& device, const Model& model, in createPreparedModel() argument
44 model, [&fullySupportsModel](ErrorStatus status, const hidl_vec<bool>& supported) { in createPreparedModel()
55 model, ExecutionPreference::FAST_SINGLE_ANSWER, preparedModelCallback); in createPreparedModel()
120 void validateModel(const sp<IDevice>& device, const Model& model);
124 void validateEverything(const sp<IDevice>& device, const Model& model, const Request& request) { in validateEverything() argument
125 validateModel(device, model); in validateEverything()
129 createPreparedModel(device, model, &preparedModel); in validateEverything()
136 const Model model = createModel(kTestModel); in TEST_P() local
140 validateEverything(kDevice, model, request); in TEST_P()
/hardware/interfaces/neuralnetworks/1.2/vts/functional/
DValidateModel.cpp44 const Model& model) { in validateGetSupportedOperations() argument
48 model, [&](ErrorStatus status, const hidl_vec<bool>&) { in validateGetSupportedOperations()
55 const Model& model, ExecutionPreference preference) { in validatePrepareModel() argument
60 device->prepareModel_1_2(model, preference, hidl_vec<hidl_handle>(), in validatePrepareModel()
84 Model model = originalModel; in validate() local
86 mutate(&model, &preference); in validate()
89 validateGetSupportedOperations(device, message, model); in validate()
92 validatePrepareModel(device, message, model, preference); in validate()
95 static uint32_t addOperand(Model* model) { in addOperand() argument
96 return hidl_vec_push_back(&model->operands, in addOperand()
[all …]
DVtsHalNeuralnetworks.cpp38 void createPreparedModel(const sp<IDevice>& device, const Model& model, in createPreparedModel() argument
46 model, [&fullySupportsModel](ErrorStatus status, const hidl_vec<bool>& supported) { in createPreparedModel()
57 model, ExecutionPreference::FAST_SINGLE_ANSWER, hidl_vec<hidl_handle>(), in createPreparedModel()
123 void validateModel(const sp<IDevice>& device, const Model& model);
131 void validateEverything(const sp<IDevice>& device, const Model& model, const Request& request) { in validateEverything() argument
132 validateModel(device, model); in validateEverything()
136 createPreparedModel(device, model, &preparedModel); in validateEverything()
143 void validateFailure(const sp<IDevice>& device, const Model& model, const Request& request) { in validateFailure() argument
146 validateModel(device, model); in validateFailure()
150 createPreparedModel(device, model, &preparedModel); in validateFailure()
[all …]
/hardware/interfaces/neuralnetworks/1.3/vts/functional/
DValidateModel.cpp45 const Model& model) { in validateGetSupportedOperations() argument
49 model, [&](ErrorStatus status, const hidl_vec<bool>&) { in validateGetSupportedOperations()
56 const Model& model, ExecutionPreference preference, in validatePrepareModel() argument
62 device->prepareModel_1_3(model, preference, priority, {}, hidl_vec<hidl_handle>(), in validatePrepareModel()
90 Model model = originalModel; in validate() local
93 mutate(&model, &preference, &priority); in validate()
96 validateGetSupportedOperations(device, message, model); in validate()
99 validatePrepareModel(device, message, model, preference, priority); in validate()
102 static uint32_t addOperand(Model* model) { in addOperand() argument
103 return hidl_vec_push_back(&model->main.operands, in addOperand()
[all …]
DVtsHalNeuralnetworks.cpp39 void createPreparedModel(const sp<IDevice>& device, const Model& model, in createPreparedModel() argument
47 model, [&fullySupportsModel](ErrorStatus status, const hidl_vec<bool>& supported) { in createPreparedModel()
58 model, ExecutionPreference::FAST_SINGLE_ANSWER, kDefaultPriority, {}, in createPreparedModel()
128 void validateModel(const sp<IDevice>& device, const Model& model);
150 void validateEverything(const sp<IDevice>& device, const Model& model, const Request& request) { in validateEverything() argument
151 validateModel(device, model); in validateEverything()
155 createPreparedModel(device, model, &preparedModel); in validateEverything()
167 void validateFailure(const sp<IDevice>& device, const Model& model, const Request& request) { in validateFailure() argument
170 validateModel(device, model); in validateFailure()
174 createPreparedModel(device, model, &preparedModel); in validateFailure()
[all …]
/hardware/interfaces/neuralnetworks/aidl/vts/functional/
DValidateModel.cpp46 const std::string& message, const Model& model) { in validateGetSupportedOperations() argument
50 const auto retStatus = device->getSupportedOperations(model, &supported); in validateGetSupportedOperations()
59 const Model& model, ExecutionPreference preference, in validatePrepareModel() argument
66 device->prepareModel(model, preference, priority, kNoDeadline, {}, {}, kEmptyCacheToken, in validatePrepareModel()
81 const std::string& message, const Model& model, in validatePrepareModelWithConfig() argument
88 model, {preference, priority, kNoDeadline, {}, {}, kEmptyCacheTokenArray, {}, {}}, in validatePrepareModelWithConfig()
118 Model model = utils::clone(originalModel).value(); in validate() local
121 mutate(&model, &preference, &priority); in validate()
124 validateGetSupportedOperations(device, message, model); in validate()
127 validatePrepareModel(device, message, model, preference, priority); in validate()
[all …]
DVtsHalNeuralnetworks.cpp50 void createPreparedModel(const std::shared_ptr<IDevice>& device, const Model& model, in createPreparedModel() argument
58 const auto supportedCallStatus = device->getSupportedOperations(model, &supportedOperations); in createPreparedModel()
69 device->prepareModelWithConfig(model, in createPreparedModel()
82 model, ExecutionPreference::FAST_SINGLE_ANSWER, kDefaultPriority, kNoDeadline, {}, in createPreparedModel()
160 void validateModel(const std::shared_ptr<IDevice>& device, const Model& model);
169 void validateEverything(const std::shared_ptr<IDevice>& device, const Model& model, in validateEverything() argument
171 validateModel(device, model); in validateEverything()
175 createPreparedModel(device, model, &preparedModel); in validateEverything()
184 void validateFailure(const std::shared_ptr<IDevice>& device, const Model& model, in validateFailure() argument
188 validateModel(device, model); in validateFailure()
[all …]
DCompilationCachingTests.cpp306 bool isModelFullySupported(const Model& model) { in isModelFullySupported() argument
308 const auto supportedCall = kDevice->getSupportedOperations(model, &supportedOps); in isModelFullySupported()
310 EXPECT_EQ(supportedOps.size(), model.main.operations.size()); in isModelFullySupported()
311 if (!supportedCall.isOk() || supportedOps.size() != model.main.operations.size()) { in isModelFullySupported()
318 void saveModelToCache(const Model& model, in saveModelToCache() argument
329 model, ExecutionPreference::FAST_SINGLE_ANSWER, kDefaultPriority, kNoDeadline, in saveModelToCache()
353 bool checkEarlyTermination(const Model& model) { in checkEarlyTermination() argument
354 if (!isModelFullySupported(model)) { in checkEarlyTermination()
421 const Model* model, const TestModel& testModel) { in verifyModelPreparationBehaviour() argument
438 /*fallbackModel=*/model); in verifyModelPreparationBehaviour()
[all …]
/hardware/interfaces/soundtrigger/aidl/cli/java/android/hardware/soundtrigger3/cli/
DSthalCli.java152 final SoundModel model; field in SthalCli.SoundTriggerImpl.Model
156 Model(ISoundTriggerHwCallback callback, SoundModel model) { in Model() argument
158 this.model = model; in Model()
162 Model(ISoundTriggerHwCallback callback, PhraseSoundModel model) { in Model() argument
164 this.model = null; in Model()
165 this.phraseModel = model; in Model()
174 mLoadedModels.forEach((handle, model) -> { in dumpModels() argument
176 System.out.println(" config = " + model.config); in dumpModels()
177 RecognitionConfig recognitionConfig = model.config; in dumpModels()
197 Model model = mLoadedModels.get(modelHandle); in sendRecognitionEvent() local
[all …]
/hardware/interfaces/soundtrigger/2.3/cli/java/android/hardware/soundtrigger/V2_3/cli/
DSthalCli.java118 final SoundModel model; field in SthalCli.SoundTriggerImpl.Model
122 Model(ISoundTriggerHwCallback callback, SoundModel model) { in Model() argument
124 this.model = model; in Model()
128 Model(ISoundTriggerHwCallback callback, PhraseSoundModel model) { in Model() argument
130 this.model = null; in Model()
131 this.phraseModel = model; in Model()
139 mLoadedModels.forEach((handle, model) -> { in dumpModels() argument
141 System.out.println(" config = " + model.config); in dumpModels()
143 model.config; in dumpModels()
153 Model model = mLoadedModels.get(modelHandle); in sendRecognitionEvent() local
[all …]
/hardware/interfaces/neuralnetworks/1.1/utils/src/
DConversions.cpp99 GeneralResult<Model> unvalidatedConvert(const hal::V1_1::Model& model) { in unvalidatedConvert() argument
100 auto operations = NN_TRY(unvalidatedConvert(model.operations)); in unvalidatedConvert()
104 NN_TRY(countNumberOfConsumers(model.operands.size(), operations)); in unvalidatedConvert()
105 CHECK(model.operands.size() == numberOfConsumers.size()); in unvalidatedConvert()
106 for (size_t i = 0; i < model.operands.size(); ++i) { in unvalidatedConvert()
107 if (model.operands[i].numberOfConsumers != numberOfConsumers[i]) { in unvalidatedConvert()
110 << numberOfConsumers[i] << " but found " << model.operands[i].numberOfConsumers; in unvalidatedConvert()
114 auto operands = NN_TRY(unvalidatedConvert(model.operands)); in unvalidatedConvert()
118 .inputIndexes = model.inputIndexes, in unvalidatedConvert()
119 .outputIndexes = model.outputIndexes, in unvalidatedConvert()
[all …]
/hardware/interfaces/neuralnetworks/1.1/
DIDevice.hal42 * Gets the supported operations in a model.
44 * getSupportedOperations indicates which operations of a model are fully
48 * @param model A model whose operations--and their corresponding
54 * - INVALID_ARGUMENT if provided model is invalid
62 getSupportedOperations_1_1(Model model)
66 * Creates a prepared model for execution.
69 * representations to a model for execution, possiblly including
70 * transformations on the constant data, optimization on the model's graph,
71 * or compilation into the device's native binary format. The model itself
74 * The model is prepared asynchronously with respect to the caller. The
[all …]
/hardware/interfaces/neuralnetworks/1.0/
DIDevice.hal37 * Gets the supported operations in a model.
39 * getSupportedOperations indicates which operations of a model are fully
43 * @param model A model whose operations--and their corresponding
49 * - INVALID_ARGUMENT if provided model is invalid
57 getSupportedOperations(Model model)
61 * Creates a prepared model for execution.
64 * representations to a model for execution, possiblly including
65 * transformations on the constant data, optimization on the model's graph,
66 * or compilation into the device's native binary format. The model itself
69 * The model is prepared asynchronously with respect to the caller. The
[all …]
DIPreparedModelCallback.hal22 * IPreparedModelCallback must be used to return a prepared model produced by an
29 * this callback has finished preparing the model. If the model was
31 * the prepared model. If the model was not able to be successfully
34 * callback fails to launch or if the model provided to
38 * @param status Error status returned from the asynchronous model
41 * model
47 * @param preparedModel A model that has been asynchronously prepared for
48 * execution. If the model was unable to be prepared
/hardware/interfaces/soundtrigger/2.0/
DISoundTriggerHw.hal65 * Base sound model descriptor. This struct is the header of a larger block
67 * sound model.
72 /** Unique sound model ID. */
75 * Unique vendor ID. Identifies the engine the sound model
97 * Specialized sound model for key phrase detection.
102 /** Common part of sound model descriptor */
104 /** List of descriptors for key phrases supported by this sound model */
138 * Load a sound model. Once loaded, recognition of this model can be
139 * started and stopped. Only one active recognition per model at a time.
141 * different users/applications on the same model.
[all …]
/hardware/interfaces/soundtrigger/2.1/
DISoundTriggerHw.hal31 * Base sound model descriptor. This struct is the header of a larger block
33 * sound model.
36 /** Sound model header. Any data contained in the 'header.data' field
44 * Specialized sound model for key phrase detection.
49 /** Common part of sound model descriptor */
51 /** List of descriptors for key phrases supported by this sound model */
68 * Load a sound model. Once loaded, recognition of this model can be
69 * started and stopped. Only one active recognition per model at a time.
71 * different users/applications on the same model.
79 * @param soundModel A SoundModel structure describing the sound model
[all …]
/hardware/interfaces/neuralnetworks/1.2/
DIDevice.hal105 * Gets the supported operations in a model.
107 * getSupportedOperations indicates which operations of a model are fully
111 * @param model A model whose operations--and their corresponding operands--
117 * - INVALID_ARGUMENT if provided model is invalid
123 getSupportedOperations_1_2(Model model)
129 * There are two types of cache file descriptors provided to the driver: model cache
136 * The model cache is for caching security-sensitive data such as compiled
138 * to the model cache may affect the driver's execution behavior, and a malicious
140 * the driver must always check whether the model cache is corrupted before
141 * preparing the model from cache.
[all …]
DIPreparedModelCallback.hal24 * IPreparedModelCallback must be used to return a prepared model produced by an
31 * task holding this callback has finished preparing the model. If the model was
33 * ErrorStatus::NONE and the prepared model. If the model was not able to be
36 * task holding this callback fails to launch or if the model provided to
40 * @param status Error status returned from the asynchronous model
43 * model
49 * @param preparedModel A model that has been asynchronously prepared for
50 * execution. If the model was unable to be prepared
/hardware/interfaces/neuralnetworks/1.3/
DIDevice.hal51 * Gets the supported operations in a model.
62 * @param model A model whose operations--and their corresponding operands--
68 * - INVALID_ARGUMENT if provided model is invalid
74 getSupportedOperations_1_3(Model model)
78 * Asynchronously creates a prepared model for execution and optionally
82 * alternative representations to a model for execution, possibly including
83 * transformations on the constant data, optimization on the model's graph,
84 * or compilation into the device's native binary format. The model itself
88 * the prepared model to cache files for faster model compilation time when
89 * the same model preparation is requested in the future. There are two
[all …]
DIPreparedModelCallback.hal23 * IPreparedModelCallback must be used to return a prepared model produced by an
32 * task holding this callback has finished preparing the model. If the model was
34 * ErrorStatus::NONE and the prepared model. If the model was not able to be
37 * task holding this callback fails to launch or if the model provided to
41 * @param status Error status returned from the asynchronous model
44 * model
51 * the model cannot be prepared by the deadline
54 * @param preparedModel A model that has been asynchronously prepared for
55 * execution. If the model was unable to be prepared
/hardware/interfaces/soundtrigger/2.3/
DISoundTriggerHw.hal43 * Start recognition on a given model. Only one recognition active
44 * at a time per model. Once recognition succeeds or fails, the callback
45 * associated with the model handle is called.
51 * @param modelHandle the handle of the sound model to use for recognition
56 * -ENOSYS in case of invalid model handle,
64 * Set a model specific parameter with the given value. This parameter
65 * will keep its value for the duration the model is loaded regardless of starting and stopping
66 * recognition. Once the model is unloaded, the value will be lost.
70 * @param modelHandle The sound model handle indicating which model to modify parameters
75 * @param value The value to set for the given model parameter
[all …]
/hardware/interfaces/neuralnetworks/utils/adapter/hidl/include/nnapi/hal/
DDevice.h53 Return<void> getSupportedOperations(const V1_0::Model& model,
55 Return<void> getSupportedOperations_1_1(const V1_1::Model& model,
57 Return<void> getSupportedOperations_1_2(const V1_2::Model& model,
59 Return<void> getSupportedOperations_1_3(const V1_3::Model& model,
63 const V1_0::Model& model, const sp<V1_0::IPreparedModelCallback>& callback) override;
65 const V1_1::Model& model, V1_1::ExecutionPreference preference,
68 const V1_2::Model& model, V1_1::ExecutionPreference preference,
72 const V1_3::Model& model, V1_1::ExecutionPreference preference, V1_3::Priority priority,

123456789