fix fusion type

This commit is contained in:
LaiYongqiang 2021-07-10 11:13:10 +08:00
parent 713e7aa762
commit 898a48d6ea
27 changed files with 160 additions and 86 deletions

View File

@ -188,9 +188,9 @@
{"op_name": "BiasAddGrad", "inputs": [{"index": 0, "name": "output_backprop", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "output", "need_compile": false, "param_type": "required", "shape": "all"}], "attr": [{"name": "format", "param_type": "required", "type": "str", "value": "all"}], "fusion_type": "COMMREDUCE", "dtype_format": [[["float16", "DefaultFormat"], ["float16", "DefaultFormat"]], [["float16", "FRACTAL_NZ"], ["float16", "DefaultFormat"]], [["float32", "DefaultFormat"], ["float32", "DefaultFormat"]], [["float32", "FRACTAL_NZ"], ["float32", "DefaultFormat"]], [["float16", "FRACTAL_NZ"], ["float16", "NHWC"]], [["float32", "FRACTAL_NZ"], ["float32", "NHWC"]], [["float16", "DefaultFormat"], ["float16", "NHWC"]], [["float32", "DefaultFormat"], ["float32", "NHWC"]], [["float16", "NDC1HWC0"], ["float16", "DefaultFormat"]], [["float32", "NDC1HWC0"], ["float32", "DefaultFormat"]], [["float16", "NDC1HWC0"], ["float16", "NHWC"]], [["float32", "NDC1HWC0"], ["float32", "NHWC"]], [["float16", "FRACTAL_Z_3D"], ["float16", "DefaultFormat"]], [["float32", "FRACTAL_Z_3D"], ["float32", "DefaultFormat"]], [["float16", "FRACTAL_Z_3D"], ["float16", "NHWC"]], [["float32", "FRACTAL_Z_3D"], ["float32", "NHWC"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "bias_add_grad.so", "compute_cost": 10, "kernel_name": "bias_add_grad", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "Cast", "inputs": [{"index": 0, "name": "x", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": false, "param_type": "required", "shape": "all"}], "attr": [{"name": "dst_type", "param_type": "required", "type": "int", "value": "all"}], "fusion_type": "OPAQUE", "dtype_format": [[["bool", ""], ["float16", ""]], [["bool", ""], ["uint8", ""]], [["bool", ""], ["float32", ""]], [["bool", ""], ["int32", ""]], [["int8", ""], ["float16", ""]], [["int8", ""], ["float32", ""]], [["int8", ""], ["int32", ""]], [["uint8", ""], ["float16", ""]], [["uint8", ""], ["float32", ""]], [["uint8", ""], ["int32", ""]], [["int32", ""], ["bool", ""]], [["int32", ""], ["float16", ""]], [["int32", ""], ["float32", ""]], [["int32", ""], ["int8", ""]], [["int32", ""], ["uint8", ""]], [["float16", ""], ["uint8", ""]], [["float16", ""], ["float32", ""]], [["float16", ""], ["int32", ""]], [["float32", ""], ["float16", ""]], [["float32", ""], ["int32", ""]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "cast.so", "compute_cost": 10, "kernel_name": "cast", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": true, "is_dynamic_format": false, "op_pattern": "formatAgnostic"}
{"op_name": "Cast", "inputs": [{"index": 0, "name": "x", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": false, "param_type": "required", "shape": "all"}], "attr": [{"name": "dst_type", "param_type": "required", "type": "int", "value": "all"}], "fusion_type": "OPAQUE", "dtype_format": [[["bool", ""], ["float16", ""]], [["bool", ""], ["uint8", ""]], [["bool", ""], ["float32", ""]], [["bool", ""], ["int32", ""]], [["int8", ""], ["float16", ""]], [["int8", ""], ["float32", ""]], [["int8", ""], ["int32", ""]], [["uint8", ""], ["float16", ""]], [["uint8", ""], ["float32", ""]], [["uint8", ""], ["int32", ""]], [["int32", ""], ["bool", ""]], [["int32", ""], ["float16", ""]], [["int32", ""], ["float32", ""]], [["int32", ""], ["int8", ""]], [["int32", ""], ["uint8", ""]], [["float16", ""], ["uint8", ""]], [["float16", ""], ["float32", ""]], [["float16", ""], ["int32", ""]], [["float32", ""], ["float16", ""]], [["float32", ""], ["int32", ""]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "cast.so", "compute_cost": 10, "kernel_name": "cast", "partial_flag": true, "reshape_type": "", "dynamic_shape": true, "need_check_supported": true, "is_dynamic_format": false, "op_pattern": "formatAgnostic"}
{"op_name": "Conv2D", "inputs": [{"index": 0, "name": "x", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "filter", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 2, "name": "bias", "need_compile": false, "param_type": "optional", "shape": "all"}, {"index": 3, "name": "offset_w", "need_compile": false, "param_type": "optional", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": true, "param_type": "required", "shape": "all"}], "attr": [{"name": "stride", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "pad_list", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "dilation", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "groups", "param_type": "optional", "type": "int", "value": "all"}, {"name": "format", "param_type": "optional", "type": "str", "value": "all"}, {"name": "offset_x", "param_type": "optional", "type": "int", "value": "all", "default_value": "0"}], "fusion_type": "CONVLUTION", "dtype_format": [[["float16", ""], ["float16", ""], ["float16", ""], ["int8", ""], ["float16", ""]], [["int8", ""], ["int8", ""], ["int32", ""], ["int8", ""], ["int32", ""]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "conv2d.so", "compute_cost": 10, "kernel_name": "conv2d", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": true, "op_pattern": ""}
{"op_name": "Conv2DBackpropFilter", "inputs": [{"index": 0, "name": "out_backprop", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "x", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": false, "param_type": "required", "shape": "all"}], "attr": [{"name": "filter_sizes", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "stride", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "pad_list", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "dilation", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "groups", "param_type": "optional", "type": "int", "value": "all", "default_value": "1"}, {"name": "format", "param_type": "optional", "type": "str", "value": "all", "default_value": "NHWC"}], "fusion_type": "CONVLUTION", "dtype_format": [[["float16", "NC1HWC0"], ["float16", "NC1HWC0"], ["float32", "FracZ"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "conv2d_backprop_filter_d.so", "compute_cost": 10, "kernel_name": "conv2d_backprop_filter_d", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "Conv2DBackpropInput", "inputs": [{"index": 0, "name": "out_backprop", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "filter", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": true, "param_type": "required", "shape": "all"}], "attr": [{"name": "input_sizes", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "stride", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "pad_list", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "dilation", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "groups", "param_type": "optional", "type": "int", "value": "all"}, {"name": "format", "param_type": "optional", "type": "str", "value": "all"}], "fusion_type": "CONVLUTION", "dtype_format": [[["float16", "NC1HWC0"], ["float16", "FracZ"], ["float16", "NC1HWC0"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "conv2d_backprop_input_d.so", "compute_cost": 10, "kernel_name": "conv2d_backprop_input_d", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "Conv2D", "inputs": [{"index": 0, "name": "x", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "filter", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 2, "name": "bias", "need_compile": false, "param_type": "optional", "shape": "all"}, {"index": 3, "name": "offset_w", "need_compile": false, "param_type": "optional", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": true, "param_type": "required", "shape": "all"}], "attr": [{"name": "stride", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "pad_list", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "dilation", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "groups", "param_type": "optional", "type": "int", "value": "all"}, {"name": "format", "param_type": "optional", "type": "str", "value": "all"}, {"name": "offset_x", "param_type": "optional", "type": "int", "value": "all", "default_value": "0"}], "fusion_type": "CONVOLUTION", "dtype_format": [[["float16", ""], ["float16", ""], ["float16", ""], ["int8", ""], ["float16", ""]], [["int8", ""], ["int8", ""], ["int32", ""], ["int8", ""], ["int32", ""]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "conv2d.so", "compute_cost": 10, "kernel_name": "conv2d", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": true, "op_pattern": ""}
{"op_name": "Conv2DBackpropFilter", "inputs": [{"index": 0, "name": "out_backprop", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "x", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": false, "param_type": "required", "shape": "all"}], "attr": [{"name": "filter_sizes", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "stride", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "pad_list", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "dilation", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "groups", "param_type": "optional", "type": "int", "value": "all", "default_value": "1"}, {"name": "format", "param_type": "optional", "type": "str", "value": "all", "default_value": "NHWC"}], "fusion_type": "CONVOLUTION", "dtype_format": [[["float16", "NC1HWC0"], ["float16", "NC1HWC0"], ["float32", "FracZ"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "conv2d_backprop_filter_d.so", "compute_cost": 10, "kernel_name": "conv2d_backprop_filter_d", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "Conv2DBackpropInput", "inputs": [{"index": 0, "name": "out_backprop", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "filter", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": true, "param_type": "required", "shape": "all"}], "attr": [{"name": "input_sizes", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "stride", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "pad_list", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "dilation", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "groups", "param_type": "optional", "type": "int", "value": "all"}, {"name": "format", "param_type": "optional", "type": "str", "value": "all"}], "fusion_type": "CONVOLUTION", "dtype_format": [[["float16", "NC1HWC0"], ["float16", "FracZ"], ["float16", "NC1HWC0"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "conv2d_backprop_input_d.so", "compute_cost": 10, "kernel_name": "conv2d_backprop_input_d", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "ConfusionMulGrad", "inputs": [{"index": 0, "name": "input0", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "input1", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 2, "name": "input2", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "output0", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "output1", "need_compile": false, "param_type": "required", "shape": "all"}], "attr": [{"name": "axis", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "keep_dims", "param_type": "required", "type": "bool", "value": "all"}], "fusion_type": "OPAQUE", "dtype_format": [[["float16", "DefaultFormat"], ["float16", "DefaultFormat"], ["float16", "DefaultFormat"], ["float16", "DefaultFormat"], ["float16", "DefaultFormat"]], [["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "confusion_mul_grad.so", "compute_cost": 10, "kernel_name": "confusion_mul_grad", "partial_flag": false, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "DropoutDoMask", "inputs": [{"index": 0, "name": "x", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "mask", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 2, "name": "keep_prob", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": false, "param_type": "required", "shape": "all"}], "attr": [], "fusion_type": "OPAQUE", "dtype_format": [[["", ""], ["", ""], ["", ""], ["", ""]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "drop_out_do_mask.so", "compute_cost": 10, "kernel_name": "drop_out_do_mask", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": true, "op_pattern": ""}
{"op_name": "DropoutDoMask", "inputs": [{"index": 0, "name": "x", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "mask", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 2, "name": "keep_prob", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": false, "param_type": "required", "shape": "all"}], "attr": [], "fusion_type": "OPAQUE", "dtype_format": [[["", ""], ["", ""], ["", ""], ["", ""]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "drop_out_do_mask.so", "compute_cost": 10, "kernel_name": "drop_out_do_mask", "partial_flag": true, "reshape_type": "", "dynamic_shape": true, "need_check_supported": false, "is_dynamic_format": true, "op_pattern": ""}
@ -201,7 +201,7 @@
{"op_name": "MaxPool", "inputs": [{"index": 0, "name": "input_data", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "output_data", "need_compile": false, "param_type": "required", "shape": "all"}], "attr": [{"name": "kernel_size", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "strides", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "pad_mode", "param_type": "required", "type": "str", "value": "all"}, {"name": "format", "param_type": "required", "type": "str", "value": "all"}], "fusion_type": "OPAQUE", "dtype_format": [[["float16", "NC1HWC0"], ["float16", "NC1HWC0"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "max_pool.so", "compute_cost": 10, "kernel_name": "max_pool", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "MaxPoolGrad", "inputs": [{"index": 0, "name": "x1", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "x2", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 2, "name": "grad", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": false, "param_type": "required", "shape": "all"}], "attr": [{"name": "kernel_size", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "strides", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "pad_mode", "param_type": "required", "type": "str", "value": "all"}, {"name": "data_format", "param_type": "optional", "type": "str", "value": "all", "default_value": "NHWC"}], "fusion_type": "OPAQUE", "dtype_format": [[["float16", "NC1HWC0"], ["float16", "NC1HWC0"], ["float16", "NC1HWC0"], ["float16", "NC1HWC0"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "max_pool_grad.so", "compute_cost": 10, "kernel_name": "max_pool_grad", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "MaxPoolGradWithArgmax", "inputs": [{"index": 0, "name": "x", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "grad", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 2, "name": "argmax", "need_compile": false, "param_type": "optional", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": false, "param_type": "required", "shape": "all"}], "attr": [{"name": "kernel_size", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "strides", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "pad_mode", "param_type": "required", "type": "str", "value": "all"}], "fusion_type": "OPAQUE", "dtype_format": [[["float16", "NC1HWC0"], ["float16", "NC1HWC0"], ["uint16", "NC1HWC0"], ["float16", "NC1HWC0"]], [["float16", "NC1HWC0"], ["float16", "NC1HWC0"], ["int64", "NC1HWC0"], ["float16", "NC1HWC0"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "max_pool_grad_with_argmax.so", "compute_cost": 10, "kernel_name": "max_pool_grad_with_argmax", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": true, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "MaxPoolWithArgmax", "inputs": [{"index": 0, "name": "x", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "argmax", "need_compile": false, "param_type": "required", "shape": "all"}], "attr": [{"name": "kernel_size", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "strides", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "pad_mode", "param_type": "required", "type": "str", "value": "all"}], "fusion_type": "CONVLUTION", "dtype_format": [[["float16", "NC1HWC0"], ["float16", "NC1HWC0"], ["uint16", "NC1HWC0"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "max_pool_with_argmax.so", "compute_cost": 10, "kernel_name": "max_pool_with_argmax", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": true, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "MaxPoolWithArgmax", "inputs": [{"index": 0, "name": "x", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "argmax", "need_compile": false, "param_type": "required", "shape": "all"}], "attr": [{"name": "kernel_size", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "strides", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "pad_mode", "param_type": "required", "type": "str", "value": "all"}], "fusion_type": "CONVOLUTION", "dtype_format": [[["float16", "NC1HWC0"], ["float16", "NC1HWC0"], ["uint16", "NC1HWC0"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "max_pool_with_argmax.so", "compute_cost": 10, "kernel_name": "max_pool_with_argmax", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": true, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "MaxPool3D", "inputs": [{"index": 0, "name": "x", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": false, "param_type": "required", "shape": "all"}], "attr": [{"name": "kernel_size", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "strides", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "pad_mode", "param_type": "required", "type": "str", "value": "all"}, {"name": "pad_list", "param_type": "optional", "type": "listInt", "value": "all", "default_value": "0,0,0"}, {"name": "dilation", "param_type": "optional", "type": "listInt", "value": "all", "default_value": "1,1,1"}, {"name": "ceil_mode", "param_type": "optional", "type": "int", "value": "all", "default_value": "0"}, {"name": "format", "param_type": "optional", "type": "str", "value": "all"}], "fusion_type": "OPAQUE", "dtype_format": [[["", ""], ["", ""]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "max_pool3d.so", "compute_cost": 10, "kernel_name": "max_pool3d", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": true, "op_pattern": ""}
{"op_name": "MaxPool3DGrad", "inputs": [{"index": 0, "name": "orig_x", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "orig_y", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 2, "name": "grads", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": false, "param_type": "required", "shape": "all"}], "attr": [{"name": "kernel_size", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "strides", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "pad_mode", "param_type": "optional", "type": "str", "value": "all"}, {"name": "pad_list", "param_type": "required", "type": "listInt", "value": "all", "default_value": "0,0,0"}, {"name": "format", "param_type": "optional", "type": "str", "value": "all"}], "fusion_type": "OPAQUE", "dtype_format": [[["float16", "NDC1HWC0"], ["float16", "NDC1HWC0"], ["float16", "NDC1HWC0"], ["float32", "NDC1HWC0"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "max_pool3d_grad.so", "compute_cost": 10, "kernel_name": "max_pool3d_grad", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "MaxPool3DGradGrad", "inputs": [{"index": 0, "name": "orig_in", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "orig_out", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 2, "name": "grads", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 3, "name": "assist", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": false, "param_type": "required", "shape": "all"}], "attr": [{"name": "kernel_size", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "strides", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "pad_list", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "format", "param_type": "optional", "type": "str", "value": "all"}], "fusion_type": "OPAQUE", "dtype_format": [[["float16", "NDC1HWC0"], ["float16", "NDC1HWC0"], ["float16", "NDC1HWC0"], ["float16", "NDC1HWC0"], ["float16", "NDC1HWC0"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "max_pool3d_grad_grad_d.so", "compute_cost": 10, "kernel_name": "max_pool3d_grad_grad_d", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
@ -358,9 +358,9 @@
{"op_name": "Fill", "inputs": [{"index": 0, "name": "dims", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "value", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": false, "param_type": "required", "shape": "all"}], "attr": [], "fusion_type": "ELEMWISE", "dtype_format": [[["int32", "DefaultFormat"], ["int32", "DefaultFormat"], ["int32", "DefaultFormat"]], [["int32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"]], [["int32", "DefaultFormat"], ["float16", "DefaultFormat"], ["int16", "DefaultFormat"]], [["int64", "DefaultFormat"], ["int32", "DefaultFormat"], ["int32", "DefaultFormat"]], [["int64", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"]], [["int64", "DefaultFormat"], ["float16", "DefaultFormat"], ["float16", "DefaultFormat"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "fill.so", "compute_cost": 10, "kernel_name": "fill", "partial_flag": true, "reshape_type": "", "dynamic_shape": true, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "Erf", "inputs": [{"index": 0, "name": "x", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": false, "param_type": "required", "shape": "all"}], "attr": [], "fusion_type": "ELEMWISE", "dtype_format": [[["float16", ""], ["float16", ""]], [["float32", ""], ["float32", ""]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "erf.so", "compute_cost": 10, "kernel_name": "erf", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": "formatAgnostic"}
{"op_name": "Erfc", "inputs": [{"index": 0, "name": "x", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": false, "param_type": "required", "shape": "all"}], "attr": [], "fusion_type": "ELEMWISE", "dtype_format": [[["float16", ""], ["float16", ""]], [["float32", ""], ["float32", ""]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "erfc.so", "compute_cost": 10, "kernel_name": "erfc", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": "formatAgnostic"}
{"op_name": "DepthwiseConv2dNative", "inputs": [{"index": 0, "name": "x", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "filter", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 2, "name": "bias", "need_compile": false, "param_type": "optional", "shape": "all"}, {"index": 3, "name": "offset_w", "need_compile": false, "param_type": "optional", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": true, "param_type": "required", "shape": "all"}], "attr": [{"name": "stride", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "dilation", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "pad_list", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "format", "param_type": "required", "type": "str", "value": "all"}, {"name": "offset_a", "param_type": "optional", "type": "int", "value": "all", "default_value": "0"}], "fusion_type": "CONVLUTION", "dtype_format": [[["float16", "NC1HWC0"], ["float16", "C1HWNCoC0"], ["float16", "DefaultFormat"], ["float16", "DefaultFormat"], ["float16", "NC1HWC0"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "depthwise_conv2d.so", "compute_cost": 10, "kernel_name": "depthwise_conv2d", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "DepthwiseConv2dNativeBackpropFilter", "inputs": [{"index": 0, "name": "input", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "out_backprop", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "filter_grad", "need_compile": false, "param_type": "required", "shape": "all"}], "attr": [{"name": "filter_size", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "stride", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "dilation", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "pad_list", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "format", "param_type": "required", "type": "str", "value": "all"}], "fusion_type": "CONVLUTION", "dtype_format": [[["float16", "NC1HWC0"], ["float16", "NC1HWC0"], ["float32", "C1HWNCoC0"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "depthwise_conv2d_backprop_filter_d.so", "compute_cost": 10, "kernel_name": "depthwise_conv2d_backprop_filter_d", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "DepthwiseConv2dNativeBackpropInput", "inputs": [{"index": 0, "name": "filter", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "out_backprop", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "input_grad", "need_compile": false, "param_type": "required", "shape": "all"}], "attr": [{"name": "input_size", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "stride", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "dilation", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "pad_list", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "format", "param_type": "required", "type": "str", "value": "all"}], "fusion_type": "CONVLUTION", "dtype_format": [[["float16", "C1HWNCoC0"], ["float16", "NC1HWC0"], ["float16", "NC1HWC0"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "depthwise_conv2d_backprop_input_d.so", "compute_cost": 10, "kernel_name": "depthwise_conv2d_backprop_input_d", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "DepthwiseConv2dNative", "inputs": [{"index": 0, "name": "x", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "filter", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 2, "name": "bias", "need_compile": false, "param_type": "optional", "shape": "all"}, {"index": 3, "name": "offset_w", "need_compile": false, "param_type": "optional", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": true, "param_type": "required", "shape": "all"}], "attr": [{"name": "stride", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "dilation", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "pad_list", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "format", "param_type": "required", "type": "str", "value": "all"}, {"name": "offset_a", "param_type": "optional", "type": "int", "value": "all", "default_value": "0"}], "fusion_type": "CONVOLUTION", "dtype_format": [[["float16", "NC1HWC0"], ["float16", "C1HWNCoC0"], ["float16", "DefaultFormat"], ["float16", "DefaultFormat"], ["float16", "NC1HWC0"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "depthwise_conv2d.so", "compute_cost": 10, "kernel_name": "depthwise_conv2d", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "DepthwiseConv2dNativeBackpropFilter", "inputs": [{"index": 0, "name": "input", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "out_backprop", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "filter_grad", "need_compile": false, "param_type": "required", "shape": "all"}], "attr": [{"name": "filter_size", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "stride", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "dilation", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "pad_list", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "format", "param_type": "required", "type": "str", "value": "all"}], "fusion_type": "CONVOLUTION", "dtype_format": [[["float16", "NC1HWC0"], ["float16", "NC1HWC0"], ["float32", "C1HWNCoC0"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "depthwise_conv2d_backprop_filter_d.so", "compute_cost": 10, "kernel_name": "depthwise_conv2d_backprop_filter_d", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "DepthwiseConv2dNativeBackpropInput", "inputs": [{"index": 0, "name": "filter", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "out_backprop", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "input_grad", "need_compile": false, "param_type": "required", "shape": "all"}], "attr": [{"name": "input_size", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "stride", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "dilation", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "pad_list", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "format", "param_type": "required", "type": "str", "value": "all"}], "fusion_type": "CONVOLUTION", "dtype_format": [[["float16", "C1HWNCoC0"], ["float16", "NC1HWC0"], ["float16", "NC1HWC0"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "depthwise_conv2d_backprop_input_d.so", "compute_cost": 10, "kernel_name": "depthwise_conv2d_backprop_input_d", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "GreaterEqual", "inputs": [{"index": 0, "name": "x1", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "x2", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": false, "param_type": "required", "shape": "all"}], "attr": [], "fusion_type": "OPAQUE", "dtype_format": [[["int8", ""], ["int8", ""], ["bool", ""]], [["uint8", ""], ["uint8", ""], ["bool", ""]], [["int32", ""], ["int32", ""], ["bool", ""]], [["float16", ""], ["float16", ""], ["bool", ""]], [["float32", ""], ["float32", ""], ["bool", ""]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "greater_equal.so", "compute_cost": 10, "kernel_name": "greater_equal", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": "broadcast"}
{"op_name": "NotEqual", "inputs": [{"index": 0, "name": "x1", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "x2", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": false, "param_type": "required", "shape": "all"}], "attr": [], "fusion_type": "ELEMWISE", "dtype_format": [[["int8", ""], ["int8", ""], ["bool", ""]], [["uint8", ""], ["uint8", ""], ["bool", ""]], [["int32", ""], ["int32", ""], ["bool", ""]], [["float16", ""], ["float16", ""], ["bool", ""]], [["float32", ""], ["float32", ""], ["bool", ""]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "not_equal.so", "compute_cost": 10, "kernel_name": "not_equal", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": "broadcast"}
{"op_name": "FloorMod", "inputs": [{"index": 0, "name": "x1", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "x2", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": false, "param_type": "required", "shape": "all"}], "attr": [], "fusion_type": "ELEMWISE", "dtype_format": [[["float16", ""], ["float16", ""], ["float16", ""]], [["float32", ""], ["float32", ""], ["float32", ""]], [["int32", ""], ["int32", ""], ["int32", ""]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "floor_mod.so", "compute_cost": 10, "kernel_name": "floor_mod", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": "broadcast"}
@ -501,10 +501,10 @@
{"op_name": "FakeQuantWithMinMaxVarsGradient", "inputs": [{"index": 0, "name": "gradients", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "x", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 2, "name": "min", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 3, "name": "max", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "backprops_wrt_x", "need_compile": true, "param_type": "required", "shape": "all"}, {"index": 1, "name": "backprops_wrt_min", "need_compile": true, "param_type": "required", "shape": "all"}, {"index": 2, "name": "backprops_wrt_max", "need_compile": true, "param_type": "required", "shape": "all"}], "attr": [{"name": "num_bits", "param_type": "optional", "type": "int", "value": "all"}, {"name": "narrow_range", "param_type": "optional", "type": "bool", "value": "all"}], "fusion_type": "OPAQUE", "dtype_format": [[["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "fake_quant_with_min_max_vars_gradient.so", "compute_cost": 10, "kernel_name": "fake_quant_with_min_max_vars_gradient", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "FakeQuantWithMinMaxVarsPerChannel", "inputs": [{"index": 0, "name": "x", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "min", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 2, "name": "max", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": true, "param_type": "required", "shape": "all"}], "attr": [{"name": "num_bits", "param_type": "optional", "type": "int", "value": "all"}, {"name": "narrow_range", "param_type": "optional", "type": "bool", "value": "all"}], "fusion_type": "OPAQUE", "dtype_format": [[["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "fake_quant_with_min_max_vars_per_channel.so", "compute_cost": 10, "kernel_name": "fake_quant_with_min_max_vars_per_channel", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "FakeQuantWithMinMaxVarsPerChannelGradient", "inputs": [{"index": 0, "name": "gradients", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "x", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 2, "name": "min", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 3, "name": "max", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "backprops_wrt_x", "need_compile": true, "param_type": "required", "shape": "all"}, {"index": 1, "name": "backprops_wrt_min", "need_compile": true, "param_type": "required", "shape": "all"}, {"index": 2, "name": "backprops_wrt_max", "need_compile": true, "param_type": "required", "shape": "all"}], "attr": [{"name": "num_bits", "param_type": "optional", "type": "int", "value": "all"}, {"name": "narrow_range", "param_type": "optional", "type": "bool", "value": "all"}], "fusion_type": "OPAQUE", "dtype_format": [[["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "fake_quant_with_min_max_vars_per_channel_gradient.so", "compute_cost": 10, "kernel_name": "fake_quant_with_min_max_vars_per_channel_gradient", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "Conv3D", "inputs": [{"index": 0, "name": "x", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "filter", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 2, "name": "bias", "need_compile": false, "param_type": "optional", "shape": "all"}, {"index": 3, "name": "offset_w", "need_compile": false, "param_type": "optional", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": true, "param_type": "required", "shape": "all"}], "attr": [{"name": "strides", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "pad_list", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "dilations", "param_type": "optional", "type": "listInt", "value": "all", "default_value": "1,1,1,1,1"}, {"name": "groups", "param_type": "optional", "type": "int", "value": "all", "default_value": "1"}, {"name": "format", "param_type": "optional", "type": "str", "value": "all", "default_value": "NDHWC"}, {"name": "offset_x", "param_type": "optional", "type": "int", "value": "all", "default_value": "0"}], "fusion_type": "CONVLUTION", "dtype_format": [[["float16", "NDC1HWC0"], ["float16", "FRACTAL_Z_3D"], ["float16", "DefaultFormat"], ["int8", "DefaultFormat"], ["float16", "NDC1HWC0"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "conv3d.so", "compute_cost": 10, "kernel_name": "conv3d", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "Conv3DBackpropInput", "inputs": [{"index": 0, "name": "filter", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "out_backprop", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": true, "param_type": "required", "shape": "all"}], "attr": [{"name": "input_size", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "strides", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "pad_list", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "dilations", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "groups", "param_type": "optional", "type": "int", "value": "all"}, {"name": "format", "param_type": "optional", "type": "str", "value": "all"}], "fusion_type": "CONVLUTION", "dtype_format": [[["float16", "FRACTAL_Z_3D"], ["float16", "NDC1HWC0"], ["float16", "NDC1HWC0"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "conv3d_backprop_input_d.so", "compute_cost": 10, "kernel_name": "conv3d_backprop_input_d", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "Conv3DBackpropFilter", "inputs": [{"index": 0, "name": "x", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "out_backprop", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": true, "param_type": "required", "shape": "all"}], "attr": [{"name": "filter_size", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "strides", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "pad_list", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "dilations", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "groups", "param_type": "optional", "type": "int", "value": "all"}, {"name": "format", "param_type": "optional", "type": "str", "value": "all"}], "fusion_type": "CONVLUTION", "dtype_format": [[["float16", "NDC1HWC0"], ["float16", "NDC1HWC0"], ["float32", "FRACTAL_Z_3D"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "conv3d_backprop_filter_d.so", "compute_cost": 10, "kernel_name": "conv3d_backprop_filter_d", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "Conv3DTranspose", "inputs": [{"index": 0, "name": "x", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "filter", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 2, "name": "bias", "need_compile": false, "param_type": "optional", "shape": "all"}, {"index": 3, "name": "offset_w", "need_compile": false, "param_type": "optional", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": true, "param_type": "required", "shape": "all"}], "attr": [{"name": "input_size", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "strides", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "pad_list", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "dilations", "param_type": "optional", "type": "listInt", "value": "all"}, {"name": "groups", "param_type": "optional", "type": "int", "value": "all"}, {"name": "format", "param_type": "optional", "type": "str", "value": "all"}, {"name": "output_padding", "param_type": "optional", "type": "listInt", "value": "all"}, {"name": "offset_x", "param_type": "optional", "type": "int", "value": "all", "default_value": "0"}], "fusion_type": "CONVLUTION", "dtype_format": [[["float16", "NDC1HWC0"], ["float16", "FRACTAL_Z_3D"], ["float16", "DefaultFormat"], ["int8", "DefaultFormat"], ["float16", "NDC1HWC0"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "conv3d_transpose_d.so", "compute_cost": 10, "kernel_name": "conv3d_transpose_d", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "Conv3D", "inputs": [{"index": 0, "name": "x", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "filter", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 2, "name": "bias", "need_compile": false, "param_type": "optional", "shape": "all"}, {"index": 3, "name": "offset_w", "need_compile": false, "param_type": "optional", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": true, "param_type": "required", "shape": "all"}], "attr": [{"name": "strides", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "pad_list", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "dilations", "param_type": "optional", "type": "listInt", "value": "all", "default_value": "1,1,1,1,1"}, {"name": "groups", "param_type": "optional", "type": "int", "value": "all", "default_value": "1"}, {"name": "format", "param_type": "optional", "type": "str", "value": "all", "default_value": "NDHWC"}, {"name": "offset_x", "param_type": "optional", "type": "int", "value": "all", "default_value": "0"}], "fusion_type": "CONVOLUTION", "dtype_format": [[["float16", "NDC1HWC0"], ["float16", "FRACTAL_Z_3D"], ["float16", "DefaultFormat"], ["int8", "DefaultFormat"], ["float16", "NDC1HWC0"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "conv3d.so", "compute_cost": 10, "kernel_name": "conv3d", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "Conv3DBackpropInput", "inputs": [{"index": 0, "name": "filter", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "out_backprop", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": true, "param_type": "required", "shape": "all"}], "attr": [{"name": "input_size", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "strides", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "pad_list", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "dilations", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "groups", "param_type": "optional", "type": "int", "value": "all"}, {"name": "format", "param_type": "optional", "type": "str", "value": "all"}], "fusion_type": "CONVOLUTION", "dtype_format": [[["float16", "FRACTAL_Z_3D"], ["float16", "NDC1HWC0"], ["float16", "NDC1HWC0"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "conv3d_backprop_input_d.so", "compute_cost": 10, "kernel_name": "conv3d_backprop_input_d", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "Conv3DBackpropFilter", "inputs": [{"index": 0, "name": "x", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "out_backprop", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": true, "param_type": "required", "shape": "all"}], "attr": [{"name": "filter_size", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "strides", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "pad_list", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "dilations", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "groups", "param_type": "optional", "type": "int", "value": "all"}, {"name": "format", "param_type": "optional", "type": "str", "value": "all"}], "fusion_type": "CONVOLUTION", "dtype_format": [[["float16", "NDC1HWC0"], ["float16", "NDC1HWC0"], ["float32", "FRACTAL_Z_3D"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "conv3d_backprop_filter_d.so", "compute_cost": 10, "kernel_name": "conv3d_backprop_filter_d", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "Conv3DTranspose", "inputs": [{"index": 0, "name": "x", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "filter", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 2, "name": "bias", "need_compile": false, "param_type": "optional", "shape": "all"}, {"index": 3, "name": "offset_w", "need_compile": false, "param_type": "optional", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": true, "param_type": "required", "shape": "all"}], "attr": [{"name": "input_size", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "strides", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "pad_list", "param_type": "required", "type": "listInt", "value": "all"}, {"name": "dilations", "param_type": "optional", "type": "listInt", "value": "all"}, {"name": "groups", "param_type": "optional", "type": "int", "value": "all"}, {"name": "format", "param_type": "optional", "type": "str", "value": "all"}, {"name": "output_padding", "param_type": "optional", "type": "listInt", "value": "all"}, {"name": "offset_x", "param_type": "optional", "type": "int", "value": "all", "default_value": "0"}], "fusion_type": "CONVOLUTION", "dtype_format": [[["float16", "NDC1HWC0"], ["float16", "FRACTAL_Z_3D"], ["float16", "DefaultFormat"], ["int8", "DefaultFormat"], ["float16", "NDC1HWC0"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "conv3d_transpose_d.so", "compute_cost": 10, "kernel_name": "conv3d_transpose_d", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "LambApplyOptimizerAssign", "inputs": [{"index": 0, "name": "grad", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "inputv", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 2, "name": "inputm", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 3, "name": "input3", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 4, "name": "mul0_x", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 5, "name": "mul1_x", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 6, "name": "mul2_x", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 7, "name": "mul3_x", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 8, "name": "add2_y", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 9, "name": "steps", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 10, "name": "do_use_weight", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 11, "name": "weight_decay_rate", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "output0", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 0, "name": "inputv", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 0, "name": "inputm", "need_compile": false, "param_type": "required", "shape": "all"}], "attr": [], "fusion_type": "ELEMWISE", "dtype_format": [[["float16", "DefaultFormat"], ["float16", "DefaultFormat"], ["float16", "DefaultFormat"], ["float16", "DefaultFormat"], ["float16", "DefaultFormat"], ["float16", "DefaultFormat"], ["float16", "DefaultFormat"], ["float16", "DefaultFormat"], ["float16", "DefaultFormat"], ["float16", "DefaultFormat"], ["float16", "DefaultFormat"], ["float16", "DefaultFormat"], ["float16", "DefaultFormat"], ["float16", "DefaultFormat"], ["float16", "DefaultFormat"]], [["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "lamb_apply_optimizer_assign.so", "compute_cost": 10, "kernel_name": "lamb_apply_optimizer_assign", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "LambApplyWeightAssign", "inputs": [{"index": 0, "name": "input0", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "input1", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 2, "name": "input2", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 3, "name": "input3", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 4, "name": "input_param", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "input_param", "need_compile": false, "param_type": "required", "shape": "all"}], "attr": [], "fusion_type": "ELEMWISE", "dtype_format": [[["float16", "DefaultFormat"], ["float16", "DefaultFormat"], ["float16", "DefaultFormat"], ["float16", "DefaultFormat"], ["float16", "DefaultFormat"], ["float16", "DefaultFormat"]], [["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "lamb_apply_weight_assign.so", "compute_cost": 10, "kernel_name": "lamb_apply_weight_assign", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}
{"op_name": "NLLLoss", "inputs": [{"index": 0, "name": "x", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "target", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 2, "name": "weight", "need_compile": false, "param_type": "required", "shape": "all"}], "outputs": [{"index": 0, "name": "y", "need_compile": false, "param_type": "required", "shape": "all"}, {"index": 1, "name": "total_weight", "need_compile": false, "param_type": "optional", "shape": "all"}], "attr": [{"name": "reduction", "param_type": "optional", "type": "str", "value": "all", "default_value": "mean"}, {"name": "ignore_index", "param_type": "optional", "type": "int", "value": "all", "default_value": "-100"}], "fusion_type": "OPAQUE", "dtype_format": [[["float32", "DefaultFormat"], ["int32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", "DefaultFormat"]]], "imply_type": "TBE", "async_flag": false, "binfile_name": "nll_loss.so", "compute_cost": 10, "kernel_name": "nll_loss", "partial_flag": true, "reshape_type": "", "dynamic_shape": false, "need_check_supported": false, "is_dynamic_format": false, "op_pattern": ""}

View File

@ -68,10 +68,78 @@ const std::unordered_map<std::string, size_t> dtype_nbyte_map = {
{"uint32", sizeof(int)}, {"uint64", sizeof(int) * 2}, {"bool", sizeof(char)},
{"complex64", sizeof(float) * 2}};
const std::unordered_map<std::string, FusionType> fusion_type_maps = {
{"CONVLUTION", FusionType::CONVLUTION}, {"ELEMWISE", FusionType::ELEMWISE}, {"COMMREDUCE", FusionType::COMMREDUCE},
{"SEGMENT", FusionType::SEGMENT}, {"OPAQUE", FusionType::OPAQUE},
};
// Define all patterns here for different schedule
const std::unordered_map<FusionType, std::string> fusion_type_name_maps = {
{FusionType::BN_UPDATE_GRAD, "bn_update_grad"},
{FusionType::BN_GRAD_REDUCE, "bn_grad_reduce"},
{FusionType::LAYER_NORM_GRAD, "layer_norm_grad"},
{FusionType::L2LOSS_MUL_ADDN, "l2loss_mul_addn"},
{FusionType::ELEMWISE, "ElemWise"},
{FusionType::PURE_BROADCAST, "PureBroadcast"},
{FusionType::COMMREDUCE, "CommReduce"},
{FusionType::SEGMENT, "Segment"},
{FusionType::INPLACE, "Inplace"},
{FusionType::MATMUL, "Matmul"},
{FusionType::MATMUL_V2, "Matmul_v2"},
{FusionType::GEMM, "GEMM"},
{FusionType::CONV, "Convolution"},
{FusionType::CONV2D_BACKPROP_INPUT, "Conv2d_backprop_input"},
{FusionType::CONV2D_BACKPROP_FILTER, "Conv2d_backprop_filter"},
{FusionType::CONV3D_BACKPROP_INPUT, "Conv3d_backprop_input"},
{FusionType::CONV3D_BACKPROP_FILTER, "Conv3d_backprop_filter"},
{FusionType::CUBE_LAYER_NORM, "cube_layer_norm"},
{FusionType::OPAQUE, "Opaque"},
{FusionType::BN_REDUCE, "bn_reduce"},
{FusionType::BN_UPDATE, "bn_update"},
{FusionType::SOFTMAX_CROSS_ENTROPY_WITH_LOGITS, "softmax_cross_entropy_with_logits"},
{FusionType::L2_NORMALIZE, "l2_normalize"},
{FusionType::SOFTMAX, "softmax_pattern"},
{FusionType::L2_LOSS, "l2_loss"},
{FusionType::ASCEND_QUANT, "quant"},
{FusionType::ASCEND_DEQUANT, "dequant"},
{FusionType::ASCEND_ANTI_QUANT, "anti_quant"},
{FusionType::STRIDED_READ, "strided_read"},
{FusionType::STRIDED_WRITE, "strided_write"},
{FusionType::ASCEND_DEQUANT_S16, "dequant_s16"},
{FusionType::ASCEND_REQUANT, "requant"},
{FusionType::ASCEND_REQUANT_S16, "requant_s16"},
{FusionType::MAX_POOL, "MaxPool"},
{FusionType::DEPTHWISECONV, "DepthwiseConvolution"},
{FusionType::CONV3D, "Conv3d"},
{FusionType::POOL2D, "Pool2d"},
{FusionType::POOL3D, "Pool3d"},
{FusionType::READ_SELECT, "read_select"},
{FusionType::WRITE_SELECT, "write_select"},
{FusionType::COSINE_EMBEDDING_LOSS, "cosine_embedding_loss"},
{FusionType::DILATION_PATTERN, "dilation"},
{FusionType::BROAD_CAST, "Broadcast"},
{FusionType::BATCH_MATMUL, "BatchMatmul"},
{FusionType::CONFUSION_TRANSPOSE, "confusiontranspose"},
{FusionType::UNKNOWN_FUSION_TYPE, ""}};
std::string GetFusionNameByType(const kernel::FusionType &type) {
auto iter = fusion_type_name_maps.find(type);
if (iter == fusion_type_name_maps.end()) {
MS_LOG(EXCEPTION) << "Illegal fusion type: " << type;
}
return iter->second;
}
FusionType GetFusionTypeByName(const std::string &name) {
std::string fusion_name_upper = name;
transform(fusion_name_upper.begin(), fusion_name_upper.end(), fusion_name_upper.begin(), ::toupper);
auto iter =
std::find_if(fusion_type_name_maps.begin(), fusion_type_name_maps.end(), [&fusion_name_upper](const auto &it) {
std::string name_upper = it.second;
transform(name_upper.begin(), name_upper.end(), name_upper.begin(), ::toupper);
return fusion_name_upper == name_upper;
});
if (iter == fusion_type_name_maps.end()) {
MS_LOG(EXCEPTION) << "Illegal fusion name: " << name;
}
return iter->first;
}
void KernelMeta::Initialize(int pid) {
if (pid == -1) {
@ -349,15 +417,9 @@ void SetKernelBuildInfo(const std::shared_ptr<KernelBuildInfo::KernelBuildInfoBu
auto imply_type = op_info_ptr->imply_type();
builder->SetProcessor(processor);
std::string fusion_type = op_info_ptr->fusion_type();
auto iter = fusion_type_maps.find(fusion_type);
if (iter != fusion_type_maps.end()) {
builder->SetFusionType(iter->second);
} else {
if (imply_type == kAKG) {
MS_EXCEPTION(NotExistsError) << "Illegal fusion type from dsl register:" << fusion_type;
}
}
std::string fusion_name = op_info_ptr->fusion_type();
auto fusion_type = GetFusionTypeByName(fusion_name);
builder->SetFusionType(fusion_type);
if (imply_type == kAKG) {
builder->SetKernelType(AKG_KERNEL);

View File

@ -107,6 +107,8 @@ Processor GetProcessorFromContext();
std::string GetStrProcessorFromContext();
float Scaling(size_t in_size, size_t out_size, bool align_corners);
float ScaleGrid(const int x, const float scale);
FusionType GetFusionTypeByName(const std::string &name);
std::string GetFusionNameByType(const kernel::FusionType &type);
struct CachedInterpolation {
size_t lower;
size_t upper;

View File

@ -42,13 +42,54 @@ enum KernelType : int {
namespace kernel {
// Supported fusion type
enum FusionType {
CONVLUTION = 0,
CONV = 0,
ELEMWISE,
COMMREDUCE,
SEGMENT,
OPAQUE,
BN_UPDATE_GRAD,
BN_GRAD_REDUCE,
LAYER_NORM_GRAD,
L2LOSS_MUL_ADDN,
PURE_BROADCAST,
INPLACE,
MATMUL,
MATMUL_V2,
GEMM,
CONV2D_BACKPROP_INPUT,
CONV2D_BACKPROP_FILTER,
CONV3D_BACKPROP_INPUT,
CONV3D_BACKPROP_FILTER,
CUBE_LAYER_NORM,
BN_REDUCE,
BN_UPDATE,
SOFTMAX_CROSS_ENTROPY_WITH_LOGITS,
L2_NORMALIZE,
SOFTMAX,
L2_LOSS,
ASCEND_QUANT,
ASCEND_DEQUANT,
ASCEND_ANTI_QUANT,
STRIDED_READ,
STRIDED_WRITE,
ASCEND_DEQUANT_S16,
ASCEND_REQUANT,
ASCEND_REQUANT_S16,
MAX_POOL,
DEPTHWISECONV,
CONV3D,
POOL2D,
POOL3D,
READ_SELECT,
WRITE_SELECT,
COSINE_EMBEDDING_LOSS,
DILATION_PATTERN,
BROAD_CAST,
BATCH_MATMUL,
CONFUSION_TRANSPOSE,
UNKNOWN_FUSION_TYPE = -1,
};
enum OpPattern {
kCommonPattern = 0,
kFormatAgnosticPattern = 1,

View File

@ -61,11 +61,6 @@ const std::unordered_map<std::string, size_t> type_nbyte_maps = {
{"uint32", sizeof(int)}, {"uint64", sizeof(int) * 2}, {"bool", sizeof(char)},
};
const std::unordered_map<std::string, FusionType> fusion_type_maps = {
{"CONVLUTION", FusionType::CONVLUTION}, {"ELEMWISE", FusionType::ELEMWISE}, {"COMMREDUCE", FusionType::COMMREDUCE},
{"SEGMENT", FusionType::SEGMENT}, {"OPAQUE", FusionType::OPAQUE},
};
TypeId DtypeToTypeId(const std::string &dtypes) {
auto iter = type_str_id_maps.find(dtypes);
if (iter == type_str_id_maps.end()) {
@ -90,15 +85,6 @@ size_t GetDtypeNbyte(const std::string &dtypes) {
return iter->second;
}
FusionType GetFusionType(const std::string &pattern) {
auto iter = fusion_type_maps.find(pattern);
if (iter == fusion_type_maps.end()) {
MS_LOG(INFO) << "Illegal fusion pattern: " << pattern;
return UNKNOWN_FUSION_TYPE;
}
return iter->second;
}
std::string GetProcessor(const AnfNodePtr &anf_node) {
MS_EXCEPTION_IF_NULL(anf_node);
std::string device;

View File

@ -32,8 +32,6 @@ std::string TypeIdToString(TypeId type_id);
size_t GetDtypeNbyte(const std::string &dtypes);
FusionType GetFusionType(const std::string &pattern);
std::string GetProcessor(const AnfNodePtr &anf_node);
} // namespace tbe
} // namespace kernel

View File

@ -149,8 +149,6 @@ void ParallelBuildManager::PreTaskFinishProcess(int32_t task_id, const std::stri
}
transform(result.begin(), result.end(), result.begin(), ::toupper);
AnfAlgo::SetNodeAttr(kAttrFusionType, MakeValue(result), node);
FusionType fusion_type = tbe::GetFusionType(result);
builder->SetFusionType(fusion_type);
AnfAlgo::SetSelectKernelBuildInfo(builder->Build(), node.get());
}
(void)pre_task_map_.erase(task_iter);

View File

@ -20,6 +20,7 @@
#include <memory>
#include <set>
#include <utility>
#include "backend/kernel_compiler/common_utils.h"
#include "backend/kernel_compiler/oplib/oplib.h"
#include "backend/kernel_compiler/tbe/tbe_convert_utils.h"
#include "backend/kernel_compiler/tbe/tbe_dynaminc_shape_util.h"
@ -272,9 +273,10 @@ void TbeKernelSelect::SetTbeBuildCommonInfo(const mindspore::kernel::OpInfo &op_
mindspore::kernel::KernelBuildInfo::KernelBuildInfoBuilder *builder) {
MS_EXCEPTION_IF_NULL(builder);
builder->SetProcessor(AICORE);
std::string fusion_type = op_info.fusion_type();
if (tbe::GetFusionType(fusion_type) != UNKNOWN_FUSION_TYPE) {
builder->SetFusionType(tbe::GetFusionType(fusion_type));
std::string fusion_name = op_info.fusion_type();
auto fusion_type = kernel::GetFusionTypeByName(fusion_name);
if (fusion_type != UNKNOWN_FUSION_TYPE) {
builder->SetFusionType(fusion_type);
}
builder->SetOpPattern(op_info.op_pattern());
builder->SetKernelType(TBE_KERNEL);

View File

@ -47,7 +47,7 @@ void ConvDoubleInFusionPass::MatchConvDoubleInEltwise(const CNodePtr &cnode, con
return;
}
if (AnfAlgo::GetKernelType(double_in_eltwise_input) == KernelType::TBE_KERNEL &&
AnfAlgo::GetFusionType(double_in_eltwise_input) == kernel::FusionType::CONVLUTION) {
AnfAlgo::GetFusionType(double_in_eltwise_input) == kernel::FusionType::CONV) {
(void)record.insert(double_in_eltwise_input);
candidate_fusion->push_back(record);
SetRecordFusionId(record);

View File

@ -47,7 +47,7 @@ void ConvSingleInFusionPass::MatchConvSingleInEltwise(const CNodePtr &cnode, con
return;
}
if (AnfAlgo::GetKernelType(eltwise_input) == KernelType::TBE_KERNEL &&
AnfAlgo::GetFusionType(eltwise_input) == kernel::FusionType::CONVLUTION) {
AnfAlgo::GetFusionType(eltwise_input) == kernel::FusionType::CONV) {
(void)record.insert(eltwise_input);
candidate_fusion->push_back(record);
SetRecordFusionId(record);

View File

@ -49,7 +49,7 @@ void StridedReadConvStridedWriteFusionPass::MatchStridedReadConvStridedWrite(con
auto conv_cnode = write_input->cast<CNodePtr>();
MS_EXCEPTION_IF_NULL(conv_cnode);
if (AnfAlgo::GetKernelType(conv_cnode) == KernelType::TBE_KERNEL &&
AnfAlgo::GetFusionType(conv_cnode) == kernel::FusionType::CONVLUTION &&
AnfAlgo::GetFusionType(conv_cnode) == kernel::FusionType::CONV &&
conv_cnode->inputs().size() >= CONV_DOUBLE_IN_INPUT_SIZE &&
conv_cnode->inputs().size() <= CONV_QUART_IN_INPUT_SIZE) {
(void)record.insert(write_input);

View File

@ -43,23 +43,6 @@ constexpr size_t kFusionNodeNumThreshold = 2;
constexpr auto kOpAttrFusionId = "fusion_id";
#ifdef DEBUG
std::string GetFusionTypeName(const kernel::FusionType &type) {
switch (type) {
case kernel::FusionType::COMMREDUCE:
return "COMMREDUCE";
case kernel::FusionType::SEGMENT:
return "SEGMENT";
case kernel::FusionType::ELEMWISE:
return "ELEMWISE";
case kernel::FusionType::CONVLUTION:
return "CONVLUTION";
case kernel::FusionType::OPAQUE:
return "OPAQUE";
default:
return "OPAQUE";
}
}
void DumpFusionScopeInfo(const kernel::FusionScopeInfo &info) {
MS_LOG(INFO) << "=== Dump FusionScopeInfo start id: " << info.scope_id;
for (auto &node : info.input_nodes) {
@ -69,8 +52,8 @@ void DumpFusionScopeInfo(const kernel::FusionScopeInfo &info) {
MS_LOG(INFO) << "=== Output: " << node->DebugString();
}
for (auto &node : info.compute_nodes) {
MS_LOG(INFO) << "=== Compute: (" << node->DebugString() << ")-(" << GetFusionTypeName(AnfAlgo::GetFusionType(node))
<< ")";
MS_LOG(INFO) << "=== Compute: (" << node->DebugString() << ")-("
<< mindspore::kekernel::tbe::GetFusionTypeName(AnfAlgo::GetFusionType(node)) << ")";
}
MS_LOG(INFO) << "=== Dump FusionScopeInfo end";
}

View File

@ -1257,7 +1257,9 @@ kernel::FusionType AnfRuntimeAlgorithm::GetFusionType(const AnfNodePtr &node) {
auto kernel_info = static_cast<device::KernelInfo *>(node->kernel_info());
MS_EXCEPTION_IF_NULL(kernel_info);
auto build_info = kernel_info->select_kernel_build_info();
MS_EXCEPTION_IF_NULL(build_info);
if (build_info == nullptr) {
return kernel::FusionType::UNKNOWN_FUSION_TYPE;
}
return build_info->fusion_type();
}

View File

@ -17,7 +17,7 @@
from mindspore.ops.op_info_register import op_info_register, TBERegOp, DataType
conv2d_op_info = TBERegOp("Conv2D") \
.fusion_type("CONVLUTION") \
.fusion_type("CONVOLUTION") \
.async_flag(False) \
.binfile_name("conv2d.so") \
.compute_cost(10) \

View File

@ -17,7 +17,7 @@
from mindspore.ops.op_info_register import op_info_register, TBERegOp, DataType
conv2d_backprop_filter_op_info = TBERegOp("Conv2DBackpropFilter") \
.fusion_type("CONVLUTION") \
.fusion_type("CONVOLUTION") \
.async_flag(False) \
.binfile_name("conv2d_backprop_filter_d.so") \
.compute_cost(10) \

View File

@ -17,7 +17,7 @@
from mindspore.ops.op_info_register import op_info_register, TBERegOp, DataType
conv2d_backprop_input_op_info = TBERegOp("Conv2DBackpropInput") \
.fusion_type("CONVLUTION") \
.fusion_type("CONVOLUTION") \
.async_flag(False) \
.binfile_name("conv2d_backprop_input_d.so") \
.compute_cost(10) \

View File

@ -17,7 +17,7 @@
from mindspore.ops.op_info_register import op_info_register, TBERegOp, DataType
conv3d_op_info = TBERegOp("Conv3D") \
.fusion_type("CONVLUTION") \
.fusion_type("CONVOLUTION") \
.async_flag(False) \
.binfile_name("conv3d.so") \
.compute_cost(10) \

View File

@ -17,7 +17,7 @@
from mindspore.ops.op_info_register import op_info_register, TBERegOp, DataType
conv3d_backprop_filter_op_info = TBERegOp("Conv3DBackpropFilter") \
.fusion_type("CONVLUTION") \
.fusion_type("CONVOLUTION") \
.async_flag(False) \
.binfile_name("conv3d_backprop_filter_d.so") \
.compute_cost(10) \

View File

@ -17,7 +17,7 @@
from mindspore.ops.op_info_register import op_info_register, TBERegOp, DataType
conv3d_backprop_input_op_info = TBERegOp("Conv3DBackpropInput") \
.fusion_type("CONVLUTION") \
.fusion_type("CONVOLUTION") \
.async_flag(False) \
.binfile_name("conv3d_backprop_input_d.so") \
.compute_cost(10) \

View File

@ -17,7 +17,7 @@
from mindspore.ops.op_info_register import op_info_register, TBERegOp, DataType
conv3d_transpose_op_info = TBERegOp("Conv3DTranspose") \
.fusion_type("CONVLUTION") \
.fusion_type("CONVOLUTION") \
.async_flag(False) \
.binfile_name("conv3d_transpose_d.so") \
.compute_cost(10) \

View File

@ -17,7 +17,7 @@
from mindspore.ops.op_info_register import op_info_register, TBERegOp, DataType
depthwise_conv2d_op_info = TBERegOp("DepthwiseConv2dNative") \
.fusion_type("CONVLUTION") \
.fusion_type("CONVOLUTION") \
.async_flag(False) \
.binfile_name("depthwise_conv2d.so") \
.compute_cost(10) \

View File

@ -17,7 +17,7 @@
from mindspore.ops.op_info_register import op_info_register, TBERegOp, DataType
depthwise_conv2d_backprop_filter_op_info = TBERegOp("DepthwiseConv2dNativeBackpropFilter") \
.fusion_type("CONVLUTION") \
.fusion_type("CONVOLUTION") \
.async_flag(False) \
.binfile_name("depthwise_conv2d_backprop_filter_d.so") \
.compute_cost(10) \

View File

@ -17,7 +17,7 @@
from mindspore.ops.op_info_register import op_info_register, TBERegOp, DataType
depthwise_conv2d_backprop_input_op_info = TBERegOp("DepthwiseConv2dNativeBackpropInput") \
.fusion_type("CONVLUTION") \
.fusion_type("CONVOLUTION") \
.async_flag(False) \
.binfile_name("depthwise_conv2d_backprop_input_d.so") \
.compute_cost(10) \

View File

@ -17,7 +17,7 @@
from mindspore.ops.op_info_register import op_info_register, TBERegOp, DataType
max_pool_with_argmax_op_info = TBERegOp("MaxPoolWithArgmax") \
.fusion_type("CONVLUTION") \
.fusion_type("CONVOLUTION") \
.async_flag(False) \
.binfile_name("max_pool_with_argmax.so") \
.compute_cost(10) \

View File

@ -17,7 +17,7 @@
from mindspore.ops.op_info_register import op_info_register, TBERegOp, DataType
sparse_apply_ftrl_d_op_info = TBERegOp("SparseApplyFtrl") \
.fusion_type("DYNAMIC") \
.fusion_type("OPAQUE") \
.async_flag(False) \
.binfile_name("sparse_apply_ftrl.so") \
.compute_cost(10) \

View File

@ -96,7 +96,7 @@ static KernelGraphPtr CreateKernelGraph() {
builder.SetOutputsFormat({kOpFormat_NCHW});
builder.SetOutputsDeviceType({kFloat32->type_id()});
builder.SetKernelType(KernelType::TBE_KERNEL);
builder.SetFusionType(mindspore::kernel::CONVLUTION);
builder.SetFusionType(mindspore::kernel::CONV);
builder.SetProcessor(kernel::Processor::AICORE);
AnfAlgo::SetSelectKernelBuildInfo(builder.Build(), kernelptr_first.get());

View File

@ -676,9 +676,9 @@ TEST_F(AnfRuntimeAlgorithmTest, GetFusionType) {
auto d_kernel_info = dynamic_cast<KernelInfo *>(add->kernel_info());
MS_EXCEPTION_IF_NULL(d_kernel_info);
KernelBuildInfoBuilder builder;
builder.SetFusionType(kernel::CONVLUTION);
builder.SetFusionType(kernel::CONV);
d_kernel_info->set_select_kernel_build_info(builder.Build());
EXPECT_EQ(AnfAlgo::GetFusionType(add), kernel::CONVLUTION);
EXPECT_EQ(AnfAlgo::GetFusionType(add), kernel::CONV);
EXPECT_THROW(AnfAlgo::GetFusionType(nullptr), std::runtime_error);
}
@ -688,10 +688,10 @@ TEST_F(AnfRuntimeAlgorithmTest, SetSelectKernelBuildInfo) {
inputs.push_back(NewValueNode(prim::kPrimAdd));
auto add = kernel_graph->NewCNode(inputs);
std::shared_ptr<KernelBuildInfoBuilder> builder = std::make_shared<KernelBuildInfoBuilder>();
builder->SetFusionType(kernel::CONVLUTION);
builder->SetFusionType(kernel::CONV);
AnfAlgo::SetSelectKernelBuildInfo(builder->Build(), add.get());
EXPECT_THROW(AnfAlgo::SetSelectKernelBuildInfo(builder->Build(), nullptr), std::runtime_error);
EXPECT_EQ(AnfAlgo::GetFusionType(add), kernel::CONVLUTION);
EXPECT_EQ(AnfAlgo::GetFusionType(add), kernel::CONV);
}
TEST_F(AnfRuntimeAlgorithmTest, GetKernelMod) {