Home
last modified time | relevance | path

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

1234

/hardware/qcom/neuralnetworks/hvxservice/1.0/
DHexagonOperationsPrepare.cpp35 bool add(const std::vector<uint32_t>& ins, const std::vector<uint32_t>& outs, HexagonModel* model) { in add() argument
40 const hexagon_nn_input& in1 = model->getTensor(ins[0]); in add()
41 const hexagon_nn_input& in2 = model->getTensor(ins[1]); in add()
43 const op_type act = model->getFloatActivation(ins[2]); in add()
46 return model->addFusedFloatOperation(OP_Add_f, NN_PAD_NA, {}, act, {in1, in2}, outs); in add()
50 HexagonModel* model) { in average_pool_2d() argument
56 const hexagon_nn_input& input = model->getTensor(ins[0]); in average_pool_2d()
68 const int32_t padding_left = model->getScalar<int32_t>(ins[1]); in average_pool_2d()
69 const int32_t padding_right = model->getScalar<int32_t>(ins[2]); in average_pool_2d()
70 const int32_t padding_top = model->getScalar<int32_t>(ins[3]); in average_pool_2d()
[all …]
DHexagonOperationsCheck.cpp35 HexagonModel* model, OperationType op) { in addMul() argument
40 const Shape in1Shape = model->getShape(ins[0]); in addMul()
41 const Shape in2Shape = model->getShape(ins[1]); in addMul()
42 Shape outShape = model->getShape(outs[0]); in addMul()
44 HEXAGON_SOFT_ASSERT(model->setShape(outs[0], outShape), "Error setting shape"); in addMul()
49 bool add(const std::vector<uint32_t>& ins, const std::vector<uint32_t>& outs, HexagonModel* model) { in add() argument
50 return addMul(ins, outs, model, OperationType::ADD); in add()
53 bool mul(const std::vector<uint32_t>& ins, const std::vector<uint32_t>& outs, HexagonModel* model) { in mul() argument
54 return addMul(ins, outs, model, OperationType::MUL); in mul()
57 bool pool(const std::vector<uint32_t>& ins, const std::vector<uint32_t>& outs, HexagonModel* model, in pool() argument
[all …]
DDevice.cpp70 Return<void> Device::getSupportedOperations(const Model& model, in getSupportedOperations() argument
74 if (!nn::validateModel(model)) { in getSupportedOperations()
83 hexagon::Model hexagonModel(model); in getSupportedOperations()
90 static void asyncPrepare(const Model& model, const sp<IPreparedModelCallback>& callback) { in asyncPrepare() argument
91 std::shared_ptr<hexagon::Model> hexagonModel = std::make_shared<hexagon::Model>(model); in asyncPrepare()
95 ret = callback->notify(ErrorStatus::NONE, new PreparedModel(model, hexagonModel)); in asyncPrepare()
104 Return<ErrorStatus> Device::prepareModel(const Model& model, in prepareModel() argument
112 if (!nn::validateModel(model)) { in prepareModel()
123 asyncPrepare(model, callback); in prepareModel()
/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()
115 void validateModel(const sp<IDevice>& device, const Model& model);
119 void validateEverything(const sp<IDevice>& device, const Model& model, const Request& request) { in validateEverything() argument
120 validateModel(device, model); in validateEverything()
124 createPreparedModel(device, model, &preparedModel); in validateEverything()
131 const Model model = createModel(kTestModel); in TEST_P() local
135 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()
118 void validateModel(const sp<IDevice>& device, const Model& model);
122 void validateEverything(const sp<IDevice>& device, const Model& model, const Request& request) { in validateEverything() argument
123 validateModel(device, model); in validateEverything()
127 createPreparedModel(device, model, &preparedModel); in validateEverything()
134 const Model model = createModel(kTestModel); in TEST_P() local
138 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()
121 void validateModel(const sp<IDevice>& device, const Model& model);
129 void validateEverything(const sp<IDevice>& device, const Model& model, const Request& request) { in validateEverything() argument
130 validateModel(device, model); in validateEverything()
134 createPreparedModel(device, model, &preparedModel); in validateEverything()
141 void validateFailure(const sp<IDevice>& device, const Model& model, const Request& request) { in validateFailure() argument
144 validateModel(device, model); in validateFailure()
148 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()
126 void validateModel(const sp<IDevice>& device, const Model& model);
148 void validateEverything(const sp<IDevice>& device, const Model& model, const Request& request) { in validateEverything() argument
149 validateModel(device, model); in validateEverything()
153 createPreparedModel(device, model, &preparedModel); in validateEverything()
165 void validateFailure(const sp<IDevice>& device, const Model& model, const Request& request) { in validateFailure() argument
168 validateModel(device, model); in validateFailure()
172 createPreparedModel(device, model, &preparedModel); in validateFailure()
[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
Dtypes.t71 * The operand is internal to the model. It's created by an operation and
78 * The operand is an input of the model. It must not be an output
81 * An operand can't be both input and output of a model.
86 * The operand is an output of the model. It must be an output
89 * An operand can't be both input and output of a model.
179 * Describes one operand of the model's graph.
197 * dimensions are known at model construction time), a tensor
274 * Describes one operation of the model's graph.
304 * All operands included in the model.
309 * All operations included in the model.
[all …]
/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.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 …]
DISoundTriggerHwCallback.hal38 /** Sound model type for this event. e.g SoundModelType.TYPE_KEYPHRASE */
40 /** Handle of loaded sound model which triggered the event */
41 SoundModelHandle model;
48 * Delay in ms between end of model detection and start of audio
77 * Event sent via load sound model callback
80 /** Sound model status e.g. SoundModelStatus.UPDATED */
82 /** Loaded sound model that triggered the event */
83 SoundModelHandle model;
101 * for a key phrase sound model.
110 * Callback method called by the HAL when the sound model loading completes
[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/soundtrigger/2.1/vts/functional/
DVtsHalSoundtriggerV2_1TargetTest.cpp213 V2_0_ISoundTriggerHw::PhraseSoundModel model; in TEST_P() local
216 model.common.type = SoundModelType::UNKNOWN; in TEST_P()
219 mSoundTriggerHal->loadPhraseSoundModel(model, mCallback, 0, [&](int32_t retval, auto res) { in TEST_P()
242 ISoundTriggerHw::PhraseSoundModel model; in TEST_P() local
245 model.common.header.type = SoundModelType::UNKNOWN; in TEST_P()
247 hidlReturn = mSoundTriggerHal->loadPhraseSoundModel_2_1(model, mCallback, 0, in TEST_P()
266 V2_0_ISoundTriggerHw::SoundModel model; in TEST_P() local
269 model.type = SoundModelType::GENERIC; in TEST_P()
272 mSoundTriggerHal->loadSoundModel(model, mCallback, 0, [&](int32_t retval, auto res) { in TEST_P()
290 V2_0_ISoundTriggerHw::SoundModel model; in TEST_P() local
[all …]
/hardware/knowles/athletico/sound_trigger_hal/
Dsound_trigger_hw_iaxxx.c461 event->common.model = handle; in stdev_keyphrase_event_alloc()
514 event->common.model = model_handle; in stdev_generic_event_alloc()
692 struct model_info *model) in setup_package() argument
696 if (check_uuid_equality(model->uuid, stdev->chre_model_uuid)) { in setup_package()
705 } else if (check_uuid_equality(model->uuid, stdev->hotword_model_uuid)) { in setup_package()
713 err = write_model(stdev->odsp_hdl, model->data, model->data_sz, in setup_package()
714 model->kw_id); in setup_package()
727 } else if (check_uuid_equality(model->uuid, stdev->wakeup_model_uuid)) { in setup_package()
735 err = write_model(stdev->odsp_hdl, model->data, model->data_sz, in setup_package()
736 model->kw_id); in setup_package()
[all …]
/hardware/interfaces/soundtrigger/2.0/vts/functional/
DVtsHalSoundtriggerV2_0TargetTest.cpp184 ISoundTriggerHw::PhraseSoundModel model; in TEST_P() local
187 model.common.type = SoundModelType::UNKNOWN; in TEST_P()
190 model, in TEST_P()
209 ISoundTriggerHw::SoundModel model; in TEST_P() local
212 model.type = SoundModelType::GENERIC; in TEST_P()
213 model.data.resize(100); in TEST_P()
214 for (auto& d : model.data) { in TEST_P()
219 model, in TEST_P()

1234