Skip to content

Commit 0389d6d

Browse files
committed
updates from debugging
1 parent 4f700a5 commit 0389d6d

3 files changed

Lines changed: 18 additions & 9 deletions

File tree

microsoft-Phi-4-reasoning/QAIRT/htp_sc8380xp.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"passes": {
77
"qp": {
88
"type": "QairtPreparation",
9-
"script_path": "phi4_script.py",
9+
"script_path": "phi4_reasoning_script.py",
1010
"script_config": {
1111
"PLATFORM_GEN": 2
1212
}
@@ -29,7 +29,7 @@
2929
}
3030
},
3131
"log_severity_level": 1,
32-
"output_dir": "models/phi4-qairt-htp-sc8380xp",
32+
"output_dir": "models/phi4_reasoning-qairt-htp-sc8380xp",
3333
"cache_dir": "cache",
3434
"no_artifacts": true
35-
}
35+
}

microsoft-Phi-4-reasoning/QAIRT/htp_sc8480xp.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"soc_details": "chipset:SC8480XP",
1616
"vtcm_size_in_mb": 8,
1717
"hvx_threads": 8,
18-
"extended_udma": true,
19-
"sequence_lengths": [32, 128],
18+
"extended_udma": true,
19+
"sequence_lengths": [32, 128],
2020
"native_kv": true,
2121
"multi_graph": true
2222
},
@@ -27,7 +27,7 @@
2727
}
2828
},
2929
"log_severity_level": 1,
30-
"output_dir": "models/phi4-qairt-htp-sc8480xp",
30+
"output_dir": "models/phi4_reasoning-qairt-htp-sc8480xp",
3131
"cache_dir": "cache",
3232
"no_artifacts": true
33-
}
33+
}

microsoft-Phi-4-reasoning/QAIRT/phi4_reasoning_script.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,16 @@
1111

1212
# ---
1313
# ### Required packages
14-
# The script assumes AIMET and Phi4 related packages are already installed.
14+
# The script assumes QAIRT, AIMET and Phi4 related packages are already installed.
15+
16+
try:
17+
# Required for proper Python environment configuration of qairt-dev
18+
import qairt # noqa: F401 # pylint: disable=unused-import
19+
except ImportError as exc:
20+
raise ImportError(
21+
"Failed to import QAIRT SDK - please install olive-ai[qairt] to use QAIRT passes."
22+
"If already installed, please run `qairt-vm -i` for help troubleshooting issues."
23+
) from exc
1524

1625
# Guard to prevent child processes from executing the main script
1726
if __name__ != '__main__':
@@ -1255,4 +1264,4 @@ def _get_anchor_buffer_names(sfx, n_layers):
12551264

12561265
print("=" * 80)
12571266
print("Script End")
1258-
print("=" * 80)
1267+
print("=" * 80)

0 commit comments

Comments
 (0)