Skip to content

Commit 43deb2d

Browse files
committed
finale
1 parent b8ac640 commit 43deb2d

2 files changed

Lines changed: 41 additions & 4 deletions

File tree

_scripts/export_qwen25_vl_visual.py

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ def fprint(s):
364364
for i, feed in enumerate(tqdm.tqdm(feeds)):
365365
if (
366366
device == "cpu"
367+
and dtype == "float16"
367368
and os.environ.get("QWEN25ATTENTION", "default") == "LOOPA23"
368369
and i >= 2
369370
):
@@ -437,9 +438,27 @@ def fprint(s):
437438
"latency_torch",
438439
"latency_ort_n",
439440
]
440-
stat = df[[*index, *values]].groupby(index).max()
441+
stat = (
442+
df[[*index, *values]]
443+
.groupby(index)
444+
.agg(
445+
{
446+
**{c: "max" for c in values if c != "speedup"},
447+
"speedup": "min",
448+
}
449+
)
450+
)
441451
stat.to_excel(statistics + ".agg.xlsx")
442-
stat = df[df.exporter == "onnx-dynamo"][[*index, *values]].groupby(index).max()
452+
stat = (
453+
df[df.exporter == "onnx-dynamo"][[*index, *values]]
454+
.groupby(index)
455+
.agg(
456+
{
457+
**{c: "max" for c in values if c != "speedup"},
458+
"speedup": "min",
459+
}
460+
)
461+
)
443462
stat.to_excel(statistics + ".agg.onnx-dynamo.xlsx")
444463

445464
if make_zip:

_scripts/investigate.ipynb

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,16 @@
161161
" \"latency_ort_n\",\n",
162162
"]\n",
163163
"df = pandas.read_json(\"dump_models/collection_statistics.js\", lines=True)\n",
164-
"stat = df[[*index, *values]].groupby(index).max()\n",
164+
"stat = (\n",
165+
" df[[*index, *values]]\n",
166+
" .groupby(index)\n",
167+
" .agg(\n",
168+
" {\n",
169+
" **{c: \"max\" for c in values if c != \"speedup\"},\n",
170+
" \"speedup\": \"min\",\n",
171+
" }\n",
172+
" )\n",
173+
")\n",
165174
"stat"
166175
]
167176
},
@@ -173,7 +182,16 @@
173182
"outputs": [],
174183
"source": [
175184
"df = pandas.read_json(\"dump_models/collection_statistics.js\", lines=True)\n",
176-
"stat = df[df.exporter == \"onnx-dynamo\"][[*index, *values]].groupby(index).max()\n",
185+
"stat = (\n",
186+
" df[df.exporter == \"onnx-dynamo\"][[*index, *values]]\n",
187+
" .groupby(index)\n",
188+
" .agg(\n",
189+
" {\n",
190+
" **{c: \"max\" for c in values if c != \"speedup\"},\n",
191+
" \"speedup\": \"min\",\n",
192+
" }\n",
193+
" )\n",
194+
")\n",
177195
"stat"
178196
]
179197
},

0 commit comments

Comments
 (0)