Skip to content

Commit c3eece3

Browse files
Add MIGraphX recipes. (microsoft#138)
1 parent 79b4e5c commit c3eece3

66 files changed

Lines changed: 2635 additions & 36 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.aitk/configs/checks.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
2-
"configCheck": 98,
3-
"copyCheck": 164,
2+
"configCheck": 109,
3+
"copyCheck": 186,
44
"extensionCheck": 1,
55
"gitignoreCheck": 35,
66
"inferenceModelCheck": 25,
77
"ipynbCheck": 35,
88
"licenseCheck": 34,
99
"modelProjectCheck": 36,
1010
"oliveCheck": 0,
11-
"oliveJsonCheck": 98,
12-
"pathCheck": 642,
11+
"oliveJsonCheck": 109,
12+
"pathCheck": 704,
1313
"requirementsCheck": 35,
1414
"templateCheck": 1,
1515
"venvRequirementsCheck": 12

.aitk/configs/model_list.json

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"runtimes": [
99
"QNN",
1010
"AMDNPU",
11+
"AMDGPU",
1112
"NvidiaTRTRTX",
1213
"IntelCPU",
1314
"IntelGPU",
@@ -28,6 +29,7 @@
2829
"runtimes": [
2930
"QNN",
3031
"AMDNPU",
32+
"AMDGPU",
3133
"NvidiaTRTRTX",
3234
"IntelCPU",
3335
"IntelGPU",
@@ -37,7 +39,7 @@
3739
"architecture": "CNN",
3840
"status": "Ready",
3941
"relativePath": "microsoft-resnet-50/aitk",
40-
"version": 3,
42+
"version": 4,
4143
"p0": true
4244
},
4345
{
@@ -50,6 +52,7 @@
5052
"runtimes": [
5153
"QNN",
5254
"AMDNPU",
55+
"AMDGPU",
5356
"NvidiaTRTRTX",
5457
"IntelCPU",
5558
"IntelGPU",
@@ -70,6 +73,7 @@
7073
"runtimes": [
7174
"QNN",
7275
"AMDNPU",
76+
"AMDGPU",
7377
"NvidiaTRTRTX",
7478
"IntelCPU",
7579
"IntelGPU",
@@ -90,6 +94,7 @@
9094
"runtimes": [
9195
"QNN",
9296
"AMDNPU",
97+
"AMDGPU",
9398
"NvidiaTRTRTX",
9499
"IntelCPU",
95100
"IntelGPU",
@@ -99,7 +104,7 @@
99104
"architecture": "Transformer",
100105
"status": "Ready",
101106
"relativePath": "google-vit-base-patch16-224/aitk",
102-
"version": 3,
107+
"version": 4,
103108
"p0": true
104109
},
105110
{
@@ -110,6 +115,7 @@
110115
"runtimes": [
111116
"QNN",
112117
"AMDNPU",
118+
"AMDGPU",
113119
"NvidiaTRTRTX",
114120
"IntelCPU",
115121
"IntelGPU",
@@ -130,6 +136,7 @@
130136
"runtimes": [
131137
"QNN",
132138
"AMDNPU",
139+
"AMDGPU",
133140
"NvidiaTRTRTX",
134141
"IntelCPU",
135142
"IntelGPU",
@@ -139,7 +146,7 @@
139146
"architecture": "Transformer",
140147
"status": "Ready",
141148
"relativePath": "laion-CLIP-ViT-B-32-laion2B-s34B-b79K/aitk",
142-
"version": 4,
149+
"version": 5,
143150
"p0": true
144151
},
145152
{
@@ -150,6 +157,7 @@
150157
"runtimes": [
151158
"QNN",
152159
"AMDNPU",
160+
"AMDGPU",
153161
"NvidiaTRTRTX",
154162
"IntelCPU",
155163
"IntelGPU",
@@ -170,6 +178,7 @@
170178
"runtimes": [
171179
"QNN",
172180
"AMDNPU",
181+
"AMDGPU",
173182
"NvidiaTRTRTX",
174183
"IntelCPU",
175184
"IntelGPU",
@@ -179,7 +188,7 @@
179188
"architecture": "Transformer",
180189
"status": "Ready",
181190
"relativePath": "openai-clip-vit-base-patch16/aitk",
182-
"version": 4,
191+
"version": 5,
183192
"p0": true
184193
},
185194
{
@@ -190,6 +199,7 @@
190199
"runtimes": [
191200
"QNN",
192201
"AMDNPU",
202+
"AMDGPU",
193203
"NvidiaTRTRTX",
194204
"IntelCPU",
195205
"IntelGPU",
@@ -199,7 +209,7 @@
199209
"architecture": "Transformer",
200210
"status": "Ready",
201211
"relativePath": "openai-clip-vit-base-patch32/aitk",
202-
"version": 4,
212+
"version": 5,
203213
"p0": true
204214
},
205215
{
@@ -212,6 +222,7 @@
212222
"runtimes": [
213223
"QNN",
214224
"AMDNPU",
225+
"AMDGPU",
215226
"NvidiaTRTRTX",
216227
"IntelCPU",
217228
"IntelGPU",
@@ -652,6 +663,7 @@
652663
"Intel NPU": "IntelNPU",
653664
"Intel GPU": "IntelGPU",
654665
"AMD NPU": "AMDNPU",
666+
"AMD GPU": "AMDGPU",
655667
"NVIDIA GPU": "NvidiaGPU",
656668
"NVIDIA TensorRT for RTX": "NvidiaTRTRTX",
657669
"DirectML": "DML",
@@ -665,6 +677,7 @@
665677
"IntelNPU": "Intel NPU",
666678
"IntelGPU": "Intel GPU",
667679
"AMDNPU": "AMD NPU",
680+
"AMDGPU": "AMD GPU",
668681
"NvidiaGPU": "NVIDIA GPU",
669682
"NvidiaTRTRTX": "NVIDIA TensorRT for RTX",
670683
"DML": "DirectML",

.aitk/docs/guide/ModelList.md

Lines changed: 11 additions & 11 deletions
Large diffs are not rendered by default.

.aitk/scripts/model_lab/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ class RuntimeEnum(Enum):
55
CPU = "CPU"
66
QNN = "QNN"
77
AMDNPU = "AMDNPU"
8+
AMDGPU = "AMDGPU"
89
NvidiaTRTRTX = "NvidiaTRTRTX"
910
IntelAny = "IntelAny"
1011
IntelCPU = "IntelCPU"

.aitk/scripts/sanitize/constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ class EPNames(Enum):
8989
CUDAExecutionProvider = "CUDAExecutionProvider"
9090
QNNExecutionProvider = "QNNExecutionProvider"
9191
OpenVINOExecutionProvider = "OpenVINOExecutionProvider"
92+
MIGraphXExecutionProvider = "MIGraphXExecutionProvider"
9293
VitisAIExecutionProvider = "VitisAIExecutionProvider"
9394
NvTensorRTRTXExecutionProvider = "NvTensorRTRTXExecutionProvider"
9495
DmlExecutionProvider = "DmlExecutionProvider"

.aitk/scripts/sanitize/utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class GlobalVars:
4343
RuntimeEnum.IntelNPU: EPNames.OpenVINOExecutionProvider,
4444
RuntimeEnum.IntelGPU: EPNames.OpenVINOExecutionProvider,
4545
RuntimeEnum.AMDNPU: EPNames.VitisAIExecutionProvider,
46+
RuntimeEnum.AMDGPU: EPNames.MIGraphXExecutionProvider,
4647
RuntimeEnum.NvidiaGPU: EPNames.CUDAExecutionProvider,
4748
RuntimeEnum.NvidiaTRTRTX: EPNames.NvTensorRTRTXExecutionProvider,
4849
RuntimeEnum.DML: EPNames.DmlExecutionProvider,
@@ -56,6 +57,7 @@ class GlobalVars:
5657
RuntimeEnum.IntelNPU: OliveDeviceTypes.NPU,
5758
RuntimeEnum.IntelGPU: OliveDeviceTypes.GPU,
5859
RuntimeEnum.AMDNPU: OliveDeviceTypes.NPU,
60+
RuntimeEnum.AMDGPU: OliveDeviceTypes.GPU,
5961
RuntimeEnum.NvidiaGPU: OliveDeviceTypes.GPU,
6062
RuntimeEnum.DML: OliveDeviceTypes.GPU,
6163
RuntimeEnum.WebGPU: OliveDeviceTypes.GPU,
@@ -68,6 +70,7 @@ class GlobalVars:
6870
RuntimeEnum.IntelNPU: "Intel NPU",
6971
RuntimeEnum.IntelGPU: "Intel GPU",
7072
RuntimeEnum.AMDNPU: "AMD NPU",
73+
RuntimeEnum.AMDGPU: "AMD GPU",
7174
RuntimeEnum.NvidiaGPU: "NVIDIA GPU",
7275
RuntimeEnum.NvidiaTRTRTX: "NVIDIA TensorRT for RTX",
7376
RuntimeEnum.DML: "DirectML",

Qwen-Qwen2.5-1.5B-Instruct/aitk/_copy.json.config

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,30 @@
116116
{
117117
"src": "../../intel-bert-base-uncased-mrpc/aitk/winml.py",
118118
"dst": "winml.py"
119+
},
120+
{
121+
"src": "qwen2_5_dml_config.json",
122+
"dst": "qwen2_5_migraphx_config.json",
123+
"replacements": [
124+
{
125+
"find": "DmlExecutionProvider",
126+
"replace": "MIGraphXExecutionProvider"
127+
}
128+
]
129+
},
130+
{
131+
"src": "qwen2_5_dml_config.json.config",
132+
"dst": "qwen2_5_migraphx_config.json.config",
133+
"replacements": [
134+
{
135+
"find": "DmlExecutionProvider",
136+
"replace": "MIGraphXExecutionProvider"
137+
},
138+
{
139+
"find": "DirectML",
140+
"replace": "AMD GPU"
141+
}
142+
]
119143
}
120144
]
121145
}

Qwen-Qwen2.5-1.5B-Instruct/aitk/info.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ recipes:
3737
- file: "qwen2_5_dml_config.json"
3838
device: gpu
3939
ep: DmlExecutionProvider
40+
- file: "qwen2_5_migraphx_config.json"
41+
device: gpu
42+
ep: MIGraphXExecutionProvider
4043
aitk:
4144
modelInfo:
4245
id: "huggingface/Qwen/Qwen2.5-1.5B-Instruct"

Qwen-Qwen2.5-1.5B-Instruct/aitk/model_project.config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
{
2424
"file": "qwen2_5_dml_config.json",
2525
"templateName": "qwen2_5_dml_config"
26+
},
27+
{
28+
"file": "qwen2_5_migraphx_config.json",
29+
"templateName": "qwen2_5_migraphx_config"
2630
}
2731
],
2832
"modelInfo": {
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"input_model": {
3+
"type": "HfModel",
4+
"model_path": "Qwen/Qwen2.5-1.5B-Instruct"
5+
},
6+
"systems": {
7+
"host_system": {
8+
"type": "LocalSystem",
9+
"accelerators": [
10+
{
11+
"device":"cpu",
12+
"execution_providers": [
13+
"CPUExecutionProvider"
14+
]
15+
}
16+
]
17+
},
18+
"target_system": {
19+
"type": "LocalSystem",
20+
"accelerators": [
21+
{
22+
"device":"gpu",
23+
"execution_providers": [
24+
"MIGraphXExecutionProvider"
25+
]
26+
}
27+
]
28+
}
29+
},
30+
"passes": {
31+
"q": {
32+
"type": "AutoAWQQuantizer"
33+
},
34+
"mb": {
35+
"type": "ModelBuilder",
36+
"precision": "int4"
37+
}
38+
},
39+
"host": "host_system",
40+
"target": "target_system",
41+
"log_severity_level": 1,
42+
"output_dir": "model/qwen2_5",
43+
"cache_dir": "cache",
44+
"no_artifacts": true,
45+
"evaluate_input_model": false
46+
}

0 commit comments

Comments
 (0)