diff --git a/examples/recipes/caidas_swin2SR-classical-sr-x2-64/qnn/npu/image-to-image_fp32_config.json b/examples/recipes/caidas_swin2SR-classical-sr-x2-64/qnn/npu/image-to-image_fp32_config.json new file mode 100644 index 000000000..b25e8cfe3 --- /dev/null +++ b/examples/recipes/caidas_swin2SR-classical-sr-x2-64/qnn/npu/image-to-image_fp32_config.json @@ -0,0 +1,65 @@ +{ + "auto": false, + "export": { + "opset_version": 17, + "batch_size": 1, + "export_params": true, + "do_constant_folding": true, + "verbose": false, + "dynamo": false, + "enable_hierarchy_tags": true, + "clean_onnx": false, + "hierarchy_tag_format": "full", + "input_tensors": [ + { + "name": "pixel_values", + "dtype": "float32", + "shape": [ + 1, + 3, + 64, + 64 + ], + "value_range": [ + 0, + 1 + ] + } + ], + "output_tensors": [ + { + "name": "reconstruction" + } + ], + "compatibility": { + "transformers_attention": "eager" + } + }, + "optim": { + "gelu_fusion": true, + "highdimRTR_lowdimRTR": true, + "matmul_add_fusion": false + }, + "quant": null, + "compile": { + "execution_provider": "qnn", + "provider_options": { + "device_type": "NPU", + "htp_performance_mode": "burst", + "htp_graph_finalization_optimization_mode": "3" + }, + "provider_option_file_keys": [], + "enable_ep_context": true, + "embed_context": false, + "compiler": "ort", + "qnn_sdk_root": null, + "device": "npu", + "ep_device": null, + "validate": true + }, + "loader": { + "task": "image-to-image", + "model_class": "AutoModelForImageToImage", + "model_type": "swin2sr" + } +} diff --git a/examples/recipes/caidas_swin2SR-classical-sr-x2-64/qnn/npu/image-to-image_w8a16_config.json b/examples/recipes/caidas_swin2SR-classical-sr-x2-64/qnn/npu/image-to-image_w8a16_config.json new file mode 100644 index 000000000..4386d91e1 --- /dev/null +++ b/examples/recipes/caidas_swin2SR-classical-sr-x2-64/qnn/npu/image-to-image_w8a16_config.json @@ -0,0 +1,85 @@ +{ + "auto": false, + "export": { + "opset_version": 17, + "batch_size": 1, + "export_params": true, + "do_constant_folding": true, + "verbose": false, + "dynamo": false, + "enable_hierarchy_tags": true, + "clean_onnx": false, + "hierarchy_tag_format": "full", + "input_tensors": [ + { + "name": "pixel_values", + "dtype": "float32", + "shape": [ + 1, + 3, + 64, + 64 + ], + "value_range": [ + 0, + 1 + ] + } + ], + "output_tensors": [ + { + "name": "reconstruction" + } + ], + "compatibility": { + "transformers_attention": "eager" + } + }, + "optim": { + "gelu_fusion": true, + "highdimRTR_lowdimRTR": true, + "matmul_add_fusion": false + }, + "quant": { + "mode": "static", + "samples": 10, + "calibration_method": "minmax", + "weight_type": "uint8", + "activation_type": "uint16", + "per_channel": false, + "symmetric": false, + "weight_symmetric": null, + "activation_symmetric": null, + "save_calibration": false, + "distribution": "uniform", + "seed": 42, + "calibration_load_path": null, + "calibration_save_path": null, + "op_types_to_quantize": null, + "nodes_to_exclude": null, + "task": "image-to-image", + "model_id": "caidas/swin2SR-classical-sr-x2-64", + "model_type": "swin2sr" + }, + "compile": { + "execution_provider": "qnn", + "provider_options": { + "device_type": "NPU", + "htp_performance_mode": "burst", + "htp_graph_finalization_optimization_mode": "3" + }, + "provider_option_file_keys": [], + "enable_ep_context": true, + "embed_context": false, + "compiler": "ort", + "qnn_sdk_root": null, + "device": "npu", + "ep_device": null, + "validate": true + }, + "loader": { + "task": "image-to-image", + "model_class": "AutoModelForImageToImage", + "model_type": "swin2sr" + } +} diff --git a/examples/recipes/caidas_swin2SR-classical-sr-x2-64/qnn/npu/image-to-image_w8a8_config.json b/examples/recipes/caidas_swin2SR-classical-sr-x2-64/qnn/npu/image-to-image_w8a8_config.json new file mode 100644 index 000000000..1af9e6046 --- /dev/null +++ b/examples/recipes/caidas_swin2SR-classical-sr-x2-64/qnn/npu/image-to-image_w8a8_config.json @@ -0,0 +1,85 @@ +{ + "auto": false, + "export": { + "opset_version": 17, + "batch_size": 1, + "export_params": true, + "do_constant_folding": true, + "verbose": false, + "dynamo": false, + "enable_hierarchy_tags": true, + "clean_onnx": false, + "hierarchy_tag_format": "full", + "input_tensors": [ + { + "name": "pixel_values", + "dtype": "float32", + "shape": [ + 1, + 3, + 64, + 64 + ], + "value_range": [ + 0, + 1 + ] + } + ], + "output_tensors": [ + { + "name": "reconstruction" + } + ], + "compatibility": { + "transformers_attention": "eager" + } + }, + "optim": { + "gelu_fusion": true, + "highdimRTR_lowdimRTR": true, + "matmul_add_fusion": false + }, + "quant": { + "mode": "static", + "samples": 10, + "calibration_method": "minmax", + "weight_type": "uint8", + "activation_type": "uint8", + "per_channel": false, + "symmetric": false, + "weight_symmetric": null, + "activation_symmetric": null, + "save_calibration": false, + "distribution": "uniform", + "seed": 42, + "calibration_load_path": null, + "calibration_save_path": null, + "op_types_to_quantize": null, + "nodes_to_exclude": null, + "task": "image-to-image", + "model_id": "caidas/swin2SR-classical-sr-x2-64", + "model_type": "swin2sr" + }, + "compile": { + "execution_provider": "qnn", + "provider_options": { + "device_type": "NPU", + "htp_performance_mode": "burst", + "htp_graph_finalization_optimization_mode": "3" + }, + "provider_option_file_keys": [], + "enable_ep_context": true, + "embed_context": false, + "compiler": "ort", + "qnn_sdk_root": null, + "device": "npu", + "ep_device": null, + "validate": true + }, + "loader": { + "task": "image-to-image", + "model_class": "AutoModelForImageToImage", + "model_type": "swin2sr" + } +}