After you call blade.optimize to optimize a model with PAI-Blade, the system generates an optimization report in JSON format. This reference describes the report structure and each field.
Report structure
The following example shows a complete optimization report:
{
"software_context": [
{
"software": "tensorflow",
"version": "1.15.0"
},
{
"software": "cuda",
"version": "9.0.176"
}
],
"hardware_context": {
"device_type": "gpu",
"microarchitecture": "T4"
},
"user_config": "",
"diagnosis": {
"model": "tmp_graph.pbtxt",
"test_data_source": "user provided",
"shape_variation": "dynamic",
"message": "",
"test_data_info": "input_ids_a_1:0 shape: (1, 9240) data type: int32"
},
"optimizations": [
{
"name": "TfStripUnusedNodes",
"status": "effective",
"speedup": "na",
"pre_run": "na",
"post_run": "na"
},
{
"name": "TfAutoMixedPrecisionGpu",
"status": "effective",
"speedup": "1.42",
"pre_run": "9.35 ms",
"post_run": "6.59 ms"
}
],
"overall": {
"baseline": "10.00 ms",
"optimized": "4.38 ms",
"speedup": "2.28"
},
"model_info": {
"input_format": "frozen_pb"
},
"compatibility_list": [
{
"device_type": "gpu",
"microarchitecture": "T4"
}
],
"model_sdk": {}
}The two most important fields to check first are overall.speedup (the end-to-end speedup ratio) and optimizations[].status (whether each optimization took effect). Use the remaining fields to understand the environment, diagnose issues, and determine deployment constraints.
Parameter reference
Primary fields
| Parameter | Description |
|---|---|
software_context | Software environment, including the ML framework and Compute Unified Device Architecture (CUDA) version. |
hardware_context | Hardware environment, including the device type and GPU microarchitecture. |
user_config | User configuration. This field is blank in PAI-Blade optimization reports. |
diagnosis | Diagnostic information about the model and test data. See Diagnosis fields. |
optimizations | List of optimizations that PAI-Blade attempted. See Optimizations fields. |
overall | End-to-end optimization results. See Overall fields. |
model_info | Model format information. |
compatibility_list | Hardware requirements for the optimized model. Deploy the model only on devices listed here to ensure correct behavior and expected performance. |
model_sdk | Additional SDK information required for model deployment. This field is blank. |
Diagnosis fields
| Parameter | Description |
|---|---|
model | Name of the model file. |
test_data_source | Source of the test data. user provided means the data came from you; blade deduced means PAI-Blade inferred it automatically. |
shape_variation | How input shapes vary. Valid values: static, multiple_static_shapes, dynamic. |
message | Error message returned when PAI-Blade fails to infer test data. |
test_data_info | Shape and data type of the test data. |
Optimizations fields
Each entry in the optimizations array describes one optimization that PAI-Blade attempted.
| Parameter | Description |
|---|---|
name | Name of the optimization. |
status | Whether the optimization took effect. effective means it was applied; ineffective means it did not take effect. |
speedup | Speedup ratio for this optimization, calculated as pre_run / post_run. |
pre_run | Model latency before this optimization. |
post_run | Model latency after this optimization. |
Overall fields
The overall object reports the end-to-end result across all optimizations applied.
| Parameter | Description |
|---|---|
baseline | Model latency before any optimization. |
optimized | Model latency after all optimizations. |
speedup | Overall speedup ratio, calculated as baseline / optimized. For example, a value of 2.28 means the optimized model runs 2.28× faster than the original. |
Model info fields
| Parameter | Description |
|---|---|
model_info.input_format | Format of the original model. |