fix: try fix QNN_GRAPH_ERROR_INVALID_OP_CONFIG
This commit is contained in:
parent
1679dcf47e
commit
28a00e5e6c
2 changed files with 13 additions and 12 deletions
|
@ -123,12 +123,6 @@ struct ggml_backend_qnn_buffer_type_context {
|
||||||
std::string name;
|
std::string name;
|
||||||
};
|
};
|
||||||
|
|
||||||
// =================================================================================================
|
|
||||||
//
|
|
||||||
// QNN backend internal helper functions
|
|
||||||
//
|
|
||||||
// =================================================================================================
|
|
||||||
|
|
||||||
// =================================================================================================
|
// =================================================================================================
|
||||||
//
|
//
|
||||||
// implementation of QNN backend for GGML
|
// implementation of QNN backend for GGML
|
||||||
|
|
|
@ -101,12 +101,19 @@ public:
|
||||||
_tensor_inputs = tensor_inputs;
|
_tensor_inputs = tensor_inputs;
|
||||||
_tensor_outputs = tensor_outputs;
|
_tensor_outputs = tensor_outputs;
|
||||||
|
|
||||||
Qnn_OpConfig_t op_config = { /*.version = */ QNN_OPCONFIG_VERSION_1,
|
Qnn_OpConfig_t config = QNN_OPCONFIG_INIT;
|
||||||
/*.v1 = */ { _graph_name.c_str(), QNN_OP_PACKAGE_NAME_QTI_AISW, op_name.c_str(),
|
config.version = QNN_OPCONFIG_VERSION_1;
|
||||||
(uint32_t)_param_types.size(), _param_types.data(),
|
auto &op_config = config.v1;
|
||||||
(uint32_t)_tensor_inputs.size(), _tensor_inputs.data(),
|
op_config.name = _graph_name.c_str();
|
||||||
(uint32_t)_tensor_outputs.size(), _tensor_outputs.data() } };
|
op_config.packageName = QNN_OP_PACKAGE_NAME_QTI_AISW;
|
||||||
auto error = _qnn_interface->qnn_graph_add_node(_graph_handle, op_config);
|
op_config.typeName = op_name.c_str();
|
||||||
|
op_config.numOfParams = (uint32_t)_param_types.size();
|
||||||
|
op_config.params = _param_types.data();
|
||||||
|
op_config.numOfInputs = (uint32_t)_tensor_inputs.size();
|
||||||
|
op_config.inputTensors = _tensor_inputs.data();
|
||||||
|
op_config.numOfOutputs = (uint32_t)_tensor_outputs.size();
|
||||||
|
op_config.outputTensors = _tensor_outputs.data();
|
||||||
|
auto error = _qnn_interface->qnn_graph_add_node(_graph_handle, config);
|
||||||
if (error != QNN_SUCCESS) {
|
if (error != QNN_SUCCESS) {
|
||||||
auto *error_str = get_qnn_error_string(error);
|
auto *error_str = get_qnn_error_string(error);
|
||||||
if (error_str) {
|
if (error_str) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue