Skip to content

Commit a92b859

Browse files
committed
Support olive-ai 0.5.x.
1 parent 674c5ca commit a92b859

20 files changed

+414
-510
lines changed

configs/olive/sd/text_encoder.json

+13-12
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,14 @@
1616
"systems": {
1717
"local_system": {
1818
"type": "LocalSystem",
19-
"config": { "accelerators": ["gpu"] }
19+
"config": {
20+
"accelerators": [
21+
{
22+
"device": "gpu",
23+
"execution_providers": ["DmlExecutionProvider"]
24+
}
25+
]
26+
}
2027
}
2128
},
2229
"evaluators": {
@@ -38,7 +45,6 @@
3845
"passes": {
3946
"optimize_CPUExecutionProvider": {
4047
"type": "OrtTransformersOptimization",
41-
"disable_search": true,
4248
"config": {
4349
"model_type": "clip",
4450
"opt_level": 0,
@@ -49,7 +55,6 @@
4955
},
5056
"optimize_DmlExecutionProvider": {
5157
"type": "OrtTransformersOptimization",
52-
"disable_search": true,
5358
"config": {
5459
"model_type": "clip",
5560
"opt_level": 0,
@@ -78,12 +83,13 @@
7883
"group_norm_channels_last": false
7984
},
8085
"force_fp32_ops": ["RandomNormalLike"],
81-
"force_fp16_inputs": { "GroupNorm": [0, 1, 2] }
86+
"force_fp16_inputs": {
87+
"GroupNorm": [0, 1, 2]
88+
}
8289
}
8390
},
8491
"optimize_CUDAExecutionProvider": {
8592
"type": "OrtTransformersOptimization",
86-
"disable_search": true,
8793
"config": {
8894
"model_type": "clip",
8995
"opt_level": 0,
@@ -94,7 +100,6 @@
94100
},
95101
"optimize_ROCMExecutionProvider": {
96102
"type": "OrtTransformersOptimization",
97-
"disable_search": true,
98103
"config": {
99104
"model_type": "clip",
100105
"opt_level": 0,
@@ -117,17 +122,13 @@
117122
},
118123
"pass_flows": [["optimize_AutoExecutionProvider"]],
119124
"engine": {
120-
"search_strategy": {
121-
"execution_order": "joint",
122-
"search_algorithm": "exhaustive"
123-
},
125+
"log_severity_level": 0,
124126
"evaluator": "common_evaluator",
125127
"evaluate_input_model": false,
126128
"host": "local_system",
127129
"target": "local_system",
128130
"cache_dir": "cache",
129131
"output_name": "text_encoder",
130-
"output_dir": "footprints",
131-
"execution_providers": ["DmlExecutionProvider"]
132+
"output_dir": "footprints"
132133
}
133134
}

configs/olive/sd/unet.json

+13-12
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,14 @@
3333
"systems": {
3434
"local_system": {
3535
"type": "LocalSystem",
36-
"config": { "accelerators": ["gpu"] }
36+
"config": {
37+
"accelerators": [
38+
{
39+
"device": "gpu",
40+
"execution_providers": ["DmlExecutionProvider"]
41+
}
42+
]
43+
}
3744
}
3845
},
3946
"evaluators": {
@@ -55,7 +62,6 @@
5562
"passes": {
5663
"optimize_CPUExecutionProvider": {
5764
"type": "OrtTransformersOptimization",
58-
"disable_search": true,
5965
"config": {
6066
"model_type": "clip",
6167
"opt_level": 0,
@@ -66,7 +72,6 @@
6672
},
6773
"optimize_DmlExecutionProvider": {
6874
"type": "OrtTransformersOptimization",
69-
"disable_search": true,
7075
"config": {
7176
"model_type": "unet",
7277
"opt_level": 0,
@@ -95,12 +100,13 @@
95100
"group_norm_channels_last": false
96101
},
97102
"force_fp32_ops": ["RandomNormalLike"],
98-
"force_fp16_inputs": { "GroupNorm": [0, 1, 2] }
103+
"force_fp16_inputs": {
104+
"GroupNorm": [0, 1, 2]
105+
}
99106
}
100107
},
101108
"optimize_CUDAExecutionProvider": {
102109
"type": "OrtTransformersOptimization",
103-
"disable_search": true,
104110
"config": {
105111
"model_type": "unet",
106112
"opt_level": 0,
@@ -111,7 +117,6 @@
111117
},
112118
"optimize_ROCMExecutionProvider": {
113119
"type": "OrtTransformersOptimization",
114-
"disable_search": true,
115120
"config": {
116121
"model_type": "unet",
117122
"opt_level": 0,
@@ -134,17 +139,13 @@
134139
},
135140
"pass_flows": [["optimize_AutoExecutionProvider"]],
136141
"engine": {
137-
"search_strategy": {
138-
"execution_order": "joint",
139-
"search_algorithm": "exhaustive"
140-
},
142+
"log_severity_level": 0,
141143
"evaluator": "common_evaluator",
142144
"evaluate_input_model": false,
143145
"host": "local_system",
144146
"target": "local_system",
145147
"cache_dir": "cache",
146148
"output_name": "unet",
147-
"output_dir": "footprints",
148-
"execution_providers": ["DmlExecutionProvider"]
149+
"output_dir": "footprints"
149150
}
150151
}

configs/olive/sd/vae_decoder.json

+13-12
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,14 @@
2323
"systems": {
2424
"local_system": {
2525
"type": "LocalSystem",
26-
"config": { "accelerators": ["gpu"] }
26+
"config": {
27+
"accelerators": [
28+
{
29+
"device": "gpu",
30+
"execution_providers": ["DmlExecutionProvider"]
31+
}
32+
]
33+
}
2734
}
2835
},
2936
"evaluators": {
@@ -45,7 +52,6 @@
4552
"passes": {
4653
"optimize_CPUExecutionProvider": {
4754
"type": "OrtTransformersOptimization",
48-
"disable_search": true,
4955
"config": {
5056
"model_type": "clip",
5157
"opt_level": 0,
@@ -56,7 +62,6 @@
5662
},
5763
"optimize_DmlExecutionProvider": {
5864
"type": "OrtTransformersOptimization",
59-
"disable_search": true,
6065
"config": {
6166
"model_type": "vae",
6267
"opt_level": 0,
@@ -85,12 +90,13 @@
8590
"group_norm_channels_last": false
8691
},
8792
"force_fp32_ops": ["RandomNormalLike"],
88-
"force_fp16_inputs": { "GroupNorm": [0, 1, 2] }
93+
"force_fp16_inputs": {
94+
"GroupNorm": [0, 1, 2]
95+
}
8996
}
9097
},
9198
"optimize_CUDAExecutionProvider": {
9299
"type": "OrtTransformersOptimization",
93-
"disable_search": true,
94100
"config": {
95101
"model_type": "vae",
96102
"opt_level": 0,
@@ -101,7 +107,6 @@
101107
},
102108
"optimize_ROCMExecutionProvider": {
103109
"type": "OrtTransformersOptimization",
104-
"disable_search": true,
105110
"config": {
106111
"model_type": "vae",
107112
"opt_level": 0,
@@ -124,17 +129,13 @@
124129
},
125130
"pass_flows": [["optimize_AutoExecutionProvider"]],
126131
"engine": {
127-
"search_strategy": {
128-
"execution_order": "joint",
129-
"search_algorithm": "exhaustive"
130-
},
132+
"log_severity_level": 0,
131133
"evaluator": "common_evaluator",
132134
"evaluate_input_model": false,
133135
"host": "local_system",
134136
"target": "local_system",
135137
"cache_dir": "cache",
136138
"output_name": "vae_decoder",
137-
"output_dir": "footprints",
138-
"execution_providers": ["DmlExecutionProvider"]
139+
"output_dir": "footprints"
139140
}
140141
}

configs/olive/sd/vae_encoder.json

+13-12
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,14 @@
2323
"systems": {
2424
"local_system": {
2525
"type": "LocalSystem",
26-
"config": { "accelerators": ["gpu"] }
26+
"config": {
27+
"accelerators": [
28+
{
29+
"device": "gpu",
30+
"execution_providers": ["DmlExecutionProvider"]
31+
}
32+
]
33+
}
2734
}
2835
},
2936
"evaluators": {
@@ -45,7 +52,6 @@
4552
"passes": {
4653
"optimize_CPUExecutionProvider": {
4754
"type": "OrtTransformersOptimization",
48-
"disable_search": true,
4955
"config": {
5056
"model_type": "clip",
5157
"opt_level": 0,
@@ -56,7 +62,6 @@
5662
},
5763
"optimize_DmlExecutionProvider": {
5864
"type": "OrtTransformersOptimization",
59-
"disable_search": true,
6065
"config": {
6166
"model_type": "vae",
6267
"opt_level": 0,
@@ -85,12 +90,13 @@
8590
"group_norm_channels_last": false
8691
},
8792
"force_fp32_ops": ["RandomNormalLike"],
88-
"force_fp16_inputs": { "GroupNorm": [0, 1, 2] }
93+
"force_fp16_inputs": {
94+
"GroupNorm": [0, 1, 2]
95+
}
8996
}
9097
},
9198
"optimize_CUDAExecutionProvider": {
9299
"type": "OrtTransformersOptimization",
93-
"disable_search": true,
94100
"config": {
95101
"model_type": "vae",
96102
"opt_level": 0,
@@ -101,7 +107,6 @@
101107
},
102108
"optimize_ROCMExecutionProvider": {
103109
"type": "OrtTransformersOptimization",
104-
"disable_search": true,
105110
"config": {
106111
"model_type": "vae",
107112
"opt_level": 0,
@@ -124,17 +129,13 @@
124129
},
125130
"pass_flows": [["optimize_AutoExecutionProvider"]],
126131
"engine": {
127-
"search_strategy": {
128-
"execution_order": "joint",
129-
"search_algorithm": "exhaustive"
130-
},
132+
"log_severity_level": 0,
131133
"evaluator": "common_evaluator",
132134
"evaluate_input_model": false,
133135
"host": "local_system",
134136
"target": "local_system",
135137
"cache_dir": "cache",
136138
"output_name": "vae_encoder",
137-
"output_dir": "footprints",
138-
"execution_providers": ["DmlExecutionProvider"]
139+
"output_dir": "footprints"
139140
}
140141
}

configs/olive/sdxl/text_encoder.json

+7-10
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@
5050
"local_system": {
5151
"type": "LocalSystem",
5252
"config": {
53-
"accelerators": ["gpu"]
53+
"accelerators": [
54+
{
55+
"device": "gpu",
56+
"execution_providers": ["DmlExecutionProvider"]
57+
}
58+
]
5459
}
5560
}
5661
},
@@ -73,7 +78,6 @@
7378
"passes": {
7479
"optimize_DmlExecutionProvider": {
7580
"type": "OrtTransformersOptimization",
76-
"disable_search": true,
7781
"config": {
7882
"model_type": "clip",
7983
"opt_level": 0,
@@ -109,7 +113,6 @@
109113
},
110114
"optimize_CUDAExecutionProvider": {
111115
"type": "OrtTransformersOptimization",
112-
"disable_search": true,
113116
"config": {
114117
"model_type": "clip",
115118
"opt_level": 0,
@@ -120,7 +123,6 @@
120123
},
121124
"optimize_ROCMExecutionProvider": {
122125
"type": "OrtTransformersOptimization",
123-
"disable_search": true,
124126
"config": {
125127
"model_type": "clip",
126128
"opt_level": 0,
@@ -132,17 +134,12 @@
132134
},
133135
"pass_flows": [["optimize_AutoExecutionProvider"]],
134136
"engine": {
135-
"search_strategy": {
136-
"execution_order": "joint",
137-
"search_algorithm": "exhaustive"
138-
},
139137
"evaluator": "common_evaluator",
140138
"evaluate_input_model": false,
141139
"host": "local_system",
142140
"target": "local_system",
143141
"cache_dir": "cache",
144142
"output_name": "text_encoder",
145-
"output_dir": "footprints",
146-
"execution_providers": ["DmlExecutionProvider"]
143+
"output_dir": "footprints"
147144
}
148145
}

0 commit comments

Comments
 (0)