Skip to content

Commit f29d155

Browse files
shubhagr-qcquic-amitraj
authored andcommitted
Fixed QNN data format config issue. (#480)
Generating data format config file fails for encoder onnx graph without past key or past value. Fixed a coding bug in the function. --------- Signed-off-by: Shubham Agrawal <[email protected]> Signed-off-by: Amit Raj <[email protected]>
1 parent 6c2da52 commit f29d155

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

QEfficient/utils/generate_qnn_network_specialization_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ def generate_data_format_config(
166166
for output in onnx_model.graph.output:
167167
if "past_key" in output.name or "past_value" in output.name:
168168
kv_nodes.append(output.name)
169-
kv_overrides = {}
170169

170+
kv_overrides = {}
171171
kv_overrides["graphs"] = [
172172
{
173173
"graph_name": model_dlc_name + "_configuration_1",

docs/source/quick_start.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ python -m QEfficient.cloud.execute --model_name gpt2 --qpc_path qeff_models/gpt2
9494
You can run the finetune with set of predefined existing datasets on QAIC using the eager pipeline
9595

9696
```bash
97-
python -m QEfficient.cloud.finetune --device qaic:0 --use-peft --output_dir ./meta-sam --num_epochs 2 --context_length 256
97+
python -m QEfficient.cloud.finetune --device qaic:0 --use-peft --output_dir ./meta-sam --num_epochs 2 --context_length 256
9898
```
9999
For more details on finetune, checkout the subsection.
100100

@@ -138,6 +138,28 @@ Users can compile a model with QNN SDK by following the steps below:
138138
* Enabled QNN by passing enable_qnn flag, add --enable_qnn in the cli command.
139139
* An optional config file can be passed to override the default parameters.
140140

141+
**Default Parameters**
142+
143+
QNN Converter Stage:
144+
145+
"--float_bias_bitwidth 32 --float_bitwidth 16 --preserve_io_datatype --onnx_skip_simplification --target_backend AIC"
146+
147+
QNN Context Binary Stage:
148+
149+
LOG_LEVEL = "error"
150+
COMPILER_COMPILATION_TARGET = "hardware"
151+
COMPILER_CONVERT_TO_FP16 = True
152+
COMPILER_DO_DDR_TO_MULTICAST = True
153+
COMPILER_HARDWARE_VERSION = "2.0"
154+
COMPILER_PERF_WARNINGS = False
155+
COMPILER_PRINT_DDR_STATS = False
156+
COMPILER_PRINT_PERF_METRICS = False
157+
COMPILER_RETAINED_STATE = True
158+
COMPILER_STAT_LEVEL = 10
159+
COMPILER_STATS_BATCH_SIZE = 1
160+
COMPILER_TIME_PASSES = False
161+
162+
141163
**CLI Inference Command**
142164

143165
Without QNN Config

0 commit comments

Comments
 (0)