fix(qairt): name recognized dsp_arch values when device creation fails - #1259
fix(qairt): name recognized dsp_arch values when device creation fails#1259MAN$I VERMA (mansiverma897993) wants to merge 1 commit into
Conversation
2439bb9 to
60f1566
Compare
|
Test report (logic verification; no Snapdragon 8 Elite Gen 5 hardware on my side)
|
|
Hi MAN$I VERMA (@mansiverma897993) , Compiled this branch for Root cause: Fix: use the --- a/sdk/plugins/qairt/include/qnn_runtime_utils.h
+++ b/sdk/plugins/qairt/include/qnn_runtime_utils.h
@@ -16,8 +16,8 @@
#include <string>
#include <vector>
-#include "external/json.hpp"
#include "types.h"
+#include "utils/detail/json.hpp"
namespace geniex::qairt::runtime {
@@ -48,16 +48,16 @@ inline std::optional<std::string> dsp_arch_diagnostic(const std::string& htp_con
if (!file.is_open()) {
return std::nullopt;
}
- const nlohmann::json root = nlohmann::json::parse(file, nullptr, /*allow_exceptions=*/false);
+ const qualla::json root = qualla::json::parse(file, nullptr, /*allow_exceptions=*/false);
if (root.is_discarded()) {
return std::nullopt;
}
// Exporters nest dsp_arch differently, so walk the whole document.
- std::vector<std::string> unrecognized;
- std::vector<const nlohmann::json*> stack{&root};
+ std::vector<std::string> unrecognized;
+ std::vector<const qualla::json*> stack{&root};
while (!stack.empty()) {
- const nlohmann::json* node = stack.back();
+ const qualla::json* node = stack.back();
stack.pop_back();
if (node->is_object()) {
for (auto it = node->begin(); it != node->end(); ++it) {With this change, compiles clean and verified end-to-end on a real Snapdragon 8 Elite Gen 5 (SM8850) device via QDC: patched |
60f1566 to
df6de3f
Compare
Thanks zdc (@Hahahaooovvv) for the detailed root-cause and the diff! Applied it as suggested switched to the vendored qualla::json (utils/detail/json.hpp) and dropped the conflicting nlohmann include. Verified llm.cpp / vlm.cpp now compile clean with the same include chain that broke before. Force-pushed to the branch, ready for another look. |
A bundle whose htp_backend_ext_config.json specifies a dsp_arch this QAIRT release does not recognize (e.g. "v85") fails with a bare QNN error 1008, which reads as unsupported silicon. Validate the config up front and, when pipeline creation fails, log which dsp_arch was unrecognized and which values are supported, returning PARAM_NOT_SUPPORTED instead of MODEL_LOAD. Not a hard gate: a QAIRT that accepts the value still loads normally. Fixes qualcomm#1254 Signed-off-by: mansiverma897993 <vmansi756@gmail.com>
df6de3f to
dbefb8b
Compare
|
zdc (@Hahahaooovvv) RemiliaForever (@RemiliaForever) CI fails resolved: rebased onto the latest main, and all CI runs (QC Preflight, PR Check, zizmor) are fresh on commit dbefb8b. Code is verified against current main (vendored qualla::json, PARAM_NOT_SUPPORTED). Please Approve and run the checks so they can pass. |
Fixes #1254.
A bundle whose
htp_backend_ext_config.jsonspecifies adsp_archthis QAIRT release doesn't recognize (e.g."v85") fails with a bare QNN error 1008, which reads as unsupported silicon.This adds
dsp_arch_diagnostic()to the qairt runtime utils: it scans the config (schema-agnostic walk) and produces a message naming the offending value and the recognized set (v68-v81). Both LLM and VLM create paths log it as a warning, and on pipeline-creation failure returnPARAM_NOT_SUPPORTEDwith the diagnostic instead of the bare error.Not a hard gate: a missing/unparseable config or a QAIRT that accepts the value changes nothing. Test report in the comment below.