Skip to content

Commit 4f8be4d

Browse files
Shiva ChilukamariShiva Chilukamari
authored andcommitted
Add offload_graph_io_quantization as false
1 parent 2aeb556 commit 4f8be4d

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

sam-vit-base/QNN/sam_vision_encoder_qnn_w8a8_ctx.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
"provider_options": {
105105
"htp_performance_mode": "burst",
106106
"htp_graph_finalization_optimization_mode": "3",
107+
"offload_graph_io_quantization": "0",
107108
"soc_model": "60"
108109
},
109110
"weight_sharing": false

sam-vit-base/QNN/user_script.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def sam_mask_decoder_load(model_name):
164164

165165
def ve_generate_quant_data(num_samples):
166166
p = Path(ModelConfig.data_dir)
167-
if p.is_dir() and (len(p.glob("*images.npz")) >= num_samples):
167+
if p.is_dir() and (len([f for f in p.glob("*images.npz")]) >= num_samples):
168168
return
169169

170170
processor = SamProcessor.from_pretrained(ModelConfig.model_name)
@@ -182,7 +182,7 @@ def ve_generate_quant_data(num_samples):
182182

183183
def md_generate_quant_data(num_samples):
184184
p = Path(ModelConfig.data_dir)
185-
if p.is_dir() and (len(p.glob("*points.npz")) >= num_samples):
185+
if p.is_dir() and (len([f for f in p.glob("*points.npz")]) >= num_samples):
186186
return
187187

188188
model = SamModel.from_pretrained(ModelConfig.model_name).to(device)

0 commit comments

Comments
 (0)