!3061 Remove useless op registers of akg

Merge pull request !3061 from DeshiChen/0711_akg_op_register_master
pull/3061/MERGE
mindspore-ci-bot 5 years ago committed by Gitee
commit 3bb04abc12

@ -1,58 +0,0 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""Abs op"""
from mindspore.ops.op_info_register import op_info_register
@op_info_register("""{
"op_name": "Abs",
"imply_type": "AutoDiff",
"fusion_type": "ELEMWISE",
"attr": [
],
"inputs": [
{
"index": 0,
"dtype": [
"float16", "float32", "float16", "float32",
"float16", "float32"
],
"format": [
"DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0",
"FRACTAL_NZ", "FRACTAL_NZ"
],
"name": "x"
}
],
"outputs": [
{
"index": 0,
"dtype": [
"float16", "float32", "float16", "float32",
"float16", "float32"
],
"format": [
"DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0",
"FRACTAL_NZ", "FRACTAL_NZ"
],
"name": "output"
}
]
}""")
def _abs_akg():
"""Abs AutoDiff register"""
return

@ -1,72 +0,0 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""TensorAdd op"""
from mindspore.ops.op_info_register import op_info_register
@op_info_register("""{
"op_name": "TensorAdd",
"imply_type": "AutoDiff",
"fusion_type": "ELEMWISE",
"attr": [
],
"inputs": [
{
"index": 0,
"dtype": [
"float16", "int32", "float16", "int32", "float32", "float32",
"int32", "float16", "float32", "int32", "float16", "float32"
],
"format": [
"DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "DefaultFormat", "NC1HWC0",
"FracZ", "FracZ", "FracZ", "FRACTAL_NZ", "FRACTAL_NZ", "FRACTAL_NZ"
],
"param_type": "required",
"name": "x"
},
{
"index": 1,
"dtype": [
"float16", "int32", "float16", "int32", "float32", "float32",
"int32", "float16", "float32", "int32", "float16", "float32"
],
"format": [
"DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "DefaultFormat", "NC1HWC0",
"FracZ", "FracZ", "FracZ", "FRACTAL_NZ", "FRACTAL_NZ", "FRACTAL_NZ"
],
"param_type": "required",
"name": "y"
}
],
"outputs": [
{
"index": 0,
"dtype": [
"float16", "int32", "float16", "int32", "float32", "float32",
"int32", "float16", "float32", "int32", "float16", "float32"
],
"format": [
"DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "DefaultFormat", "NC1HWC0",
"FracZ", "FracZ", "FracZ", "FRACTAL_NZ", "FRACTAL_NZ", "FRACTAL_NZ"
],
"name": "output"
}
]
}""")
def _add_akg():
"""TensorAdd AutoDiff register"""
return

@ -1,58 +0,0 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""AddN op"""
from mindspore.ops.op_info_register import op_info_register
@op_info_register("""{
"op_name": "AddN",
"imply_type": "AutoDiff",
"fusion_type": "ELEMWISE",
"attr": [
],
"inputs": [
{
"index": 0,
"dtype": [
"float16","float32","float16","float32", "float16", "float32",
"float16","float32"
],
"format": [
"DefaultFormat","DefaultFormat","NC1HWC0","NC1HWC0", "FracZ", "FracZ",
"FRACTAL_NZ", "FRACTAL_NZ"
],
"param_type": "dynamic",
"name": "inputs"
}
],
"outputs": [
{
"index": 0,
"dtype": [
"float16","float32","float16","float32", "float16", "float32",
"float16","float32"
],
"format": [
"DefaultFormat","DefaultFormat","NC1HWC0","NC1HWC0", "FracZ", "FracZ",
"FRACTAL_NZ", "FRACTAL_NZ"
],
"name": "output"
}
]
}""")
def _add_n_akg():
"""AddN AutoDiff register"""
return

@ -1,103 +0,0 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""ApplyMomentum op"""
from mindspore.ops.op_info_register import op_info_register
@op_info_register("""{
"op_name": "ApplyMomentum",
"imply_type": "AutoDiff",
"fusion_type": "ELEMWISE",
"attr": [
{
"name": "use_nesterov",
"param_type": "optional",
"type": "bool"
},
{
"name": "gradient_scale",
"param_type": "optional",
"type": "float"
}
],
"inputs": [
{
"index": 0,
"dtype": [
"float32","float32","float32"
],
"format": [
"DefaultFormat","NC1HWC0","FracZ"
],
"name": "variable"
},
{
"index": 1,
"dtype": [
"float32","float32","float32"
],
"format": [
"DefaultFormat","NC1HWC0","FracZ"
],
"name": "accumulation"
},
{
"index": 2,
"dtype": [
"float32","float32","float32"
],
"format": [
"DefaultFormat","DefaultFormat","DefaultFormat"
],
"name": "learning_rate"
},
{
"index": 3,
"dtype": [
"float32","float32","float32"
],
"format": [
"DefaultFormat","NC1HWC0","FracZ"
],
"name": "gradient"
},
{
"index": 4,
"dtype": [
"float32","float32","float32"
],
"format": [
"DefaultFormat","DefaultFormat","DefaultFormat"
],
"name": "momentum"
}
],
"outputs": [
{
"index": 0,
"dtype": [
"float32","float32","float32"
],
"format": [
"DefaultFormat","NC1HWC0","FracZ"
],
"name": "output"
}
]
}""")
def _apply_momentum_akg():
"""ApplyMomentum AutoDiff register"""
return

@ -1,58 +0,0 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""Argmax op"""
from mindspore.ops.op_info_register import op_info_register
@op_info_register("""{
"op_name": "Argmax",
"imply_type": "AutoDiff",
"fusion_type": "OPAQUE",
"attr": [
{
"name": "axis",
"param_type": "optional",
"type": "int"
}
],
"inputs": [
{
"index": 0,
"dtype": [
"float16", "float32", "float16", "float32"
],
"format": [
"DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0"
],
"name": "x"
}
],
"outputs": [
{
"index": 0,
"dtype": [
"int32", "int32", "int32", "int32"
],
"format": [
"DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0"
],
"name": "output"
}
]
}""")
def _argmax_akg():
"""Argmax AutoDiff register"""
return

@ -1,63 +0,0 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""Assign op"""
from mindspore.ops.op_info_register import op_info_register
@op_info_register("""{
"op_name": "Assign",
"imply_type": "AutoDiff",
"fusion_type": "OPAQUE",
"attr": [
],
"inputs": [
{
"index": 0,
"dtype": [
"int32", "float16", "float32", "int32", "float16", "float32", "int32", "float16", "float32"
],
"format": [
"DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0", "FracZ", "FracZ", "FracZ"
],
"name": "ref"
},
{
"index": 1,
"dtype": [
"int32", "float16", "float32", "int32", "float16", "float32", "int32", "float16", "float32"
],
"format": [
"DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0", "FracZ", "FracZ", "FracZ"
],
"name": "value"
}
],
"outputs": [
{
"index": 0,
"dtype": [
"int32", "float16", "float32", "int32", "float16", "float32", "int32", "float16", "float32"
],
"format": [
"DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0", "FracZ", "FracZ", "FracZ"
],
"name": "output"
}
]
}""")
def _assign_akg():
"""Assign AutoDiff register"""
return

@ -1,64 +0,0 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""AssignAdd op"""
from mindspore.ops.op_info_register import op_info_register
@op_info_register("""{
"op_name": "AssignAdd",
"imply_type": "AutoDiff",
"fusion_type": "ELEMWISE",
"attr": [
],
"inputs": [
{
"index": 0,
"dtype": [
"int32", "float16", "float32", "int32", "float16", "float32"
],
"format": [
"DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0"
],
"name": "ref"
},
{
"index": 1,
"dtype": [
"int32", "float16", "float32", "int32", "float16", "float32"
],
"format": [
"DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0"
],
"name": "value"
}
],
"outputs": [
{
"index": 0,
"dtype": [
"int32", "float16", "float32", "int32", "float16", "float32"
],
"format": [
"DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0"
],
"name": "output"
}
]
}""")
def _assign_add_akg():
"""AssignAdd AutoDiff register"""
return

@ -1,73 +0,0 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""BatchMatMul op"""
from mindspore.ops.op_info_register import op_info_register
@op_info_register("""{
"op_name": "BatchMatMul",
"imply_type": "AutoDiff",
"fusion_type": "OPAQUE",
"attr": [
{
"name": "transpose_a",
"param_type": "optional",
"type": "bool"
},
{
"name": "transpose_b",
"param_type": "optional",
"type": "bool"
}
],
"inputs": [
{
"index": 0,
"dtype": [
"float16"
],
"format": [
"FRACTAL_NZ"
],
"name": "x1"
},
{
"index": 1,
"dtype": [
"float16"
],
"format": [
"FRACTAL_NZ"
],
"name": "x2"
}
],
"outputs": [
{
"index": 0,
"dtype": [
"float16"
],
"format": [
"FRACTAL_NZ"
],
"name": "output"
}
]
}""")
def _batchmatmul_akg():
"""BatchMatMul AKG register"""
return

@ -1,68 +0,0 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""BiasAdd op"""
from mindspore.ops.op_info_register import op_info_register
@op_info_register("""{
"op_name": "BiasAdd",
"imply_type": "AutoDiff",
"fusion_type": "ELEMWISE",
"attr": [
{
"name": "data_format",
"param_type": "optional",
"type": "listStr"
}
],
"inputs": [
{
"index": 0,
"dtype": [
"float16","float32","float16","float32","float16","float32"
],
"format": [
"NHWC","NHWC","NC1HWC0","NC1HWC0","DefaultFormat","DefaultFormat"
],
"name": "x"
},
{
"index": 1,
"dtype": [
"float16","float32","float16","float32","float16","float32"
],
"format": [
"NHWC","NHWC","NC1HWC0","NC1HWC0","DefaultFormat","DefaultFormat"
],
"name": "b"
}
],
"outputs": [
{
"index": 0,
"dtype": [
"float16","float32","float16","float32","float16","float32"
],
"format": [
"DefaultFormat","DefaultFormat","NC1HWC0","NC1HWC0","DefaultFormat","DefaultFormat"
],
"name": "output"
}
]
}""")
def _bias_add_akg():
"""BiasAddGrad AutoDiff register"""
return

@ -1,58 +0,0 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""BiasAddGrad op"""
from mindspore.ops.op_info_register import op_info_register
@op_info_register("""{
"op_name": "BiasAddGrad",
"imply_type": "AutoDiff",
"fusion_type": "COMMREDUCE",
"attr": [
{
"name": "data_format",
"param_type": "optional",
"type": "listStr"
}
],
"inputs": [
{
"index": 0,
"dtype": [
"float16","float32","float16","float32","float16","float32"
],
"format": [
"NHWC","NHWC","NC1HWC0","NC1HWC0","DefaultFormat","DefaultFormat"
],
"name": "dout"
}
],
"outputs": [
{
"index": 0,
"dtype": [
"float16","float32","float16","float32","float16","float32"
],
"format": [
"DefaultFormat","DefaultFormat","NC1HWC0","NC1HWC0","DefaultFormat","DefaultFormat"
],
"name": "output"
}
]
}""")
def _bias_add_grad_akg():
"""BiasAddGrad AutoDiff register"""
return

@ -1,74 +0,0 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""Cast op"""
from mindspore.ops.op_info_register import op_info_register
@op_info_register("""{
"op_name": "Cast",
"imply_type": "AutoDiff",
"fusion_type": "ELEMWISE",
"attr": [
{
"name": "dst_type",
"param_type": "required",
"type": "str"
}
],
"inputs": [
{
"index": 0,
"dtype": [
"float16", "float32", "bool", "bool",
"float16", "float32", "int32", "int32",
"bool",
"float16", "float32", "bool", "bool",
"float16", "float32", "bool", "bool"
],
"format": [
"DefaultFormat", "DefaultFormat", "DefaultFormat", "DefaultFormat",
"DefaultFormat", "DefaultFormat", "DefaultFormat", "DefaultFormat",
"DefaultFormat",
"NC1HWC0", "NC1HWC0", "NC1HWC0", "NC1HWC0",
"FRACTAL_NZ", "FRACTAL_NZ", "FRACTAL_NZ", "FRACTAL_NZ"
],
"name": "x"
}
],
"outputs": [
{
"index": 0,
"dtype": [
"float32", "float16", "int32", "float16",
"int32", "int32", "float16", "float32",
"float32",
"float32", "float16", "int32", "float32",
"float32", "float16", "int32", "float32"
],
"format": [
"DefaultFormat", "DefaultFormat", "DefaultFormat", "DefaultFormat",
"DefaultFormat", "DefaultFormat", "DefaultFormat", "DefaultFormat",
"DefaultFormat",
"NC1HWC0", "NC1HWC0", "NC1HWC0", "NC1HWC0",
"FRACTAL_NZ", "FRACTAL_NZ", "FRACTAL_NZ", "FRACTAL_NZ"
],
"name": "output"
}
]
}""")
def _cast_akg():
"""Cast AutoDiff register"""
return

@ -1,64 +0,0 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""ClearZero op"""
from mindspore.ops.op_info_register import op_info_register
@op_info_register("""{
"op_name": "ClearZero",
"imply_type": "AutoDiff",
"fusion_type": "ELEMWISE",
"attr": [
{
"name": "pad_mod",
"param_type": "optional",
"type": "string"
},
{
"name": "window",
"param_type": "optional",
"type": "int"
},
{
"name": "pad",
"param_type": "optional",
"type": "int"
},
{
"name": "stride",
"param_type": "optional",
"type": "int"
}
],
"inputs": [
{
"index": 0,
"dtype": [
"int32", "float16", "float32", "int32", "float16", "float32"
],
"format": [
"DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0"
],
"name": "x"
}
],
"outputs": [
]
}""")
def _clear_zero_akg():
"""MaxPoolGradWithArgmax AutoDiff register"""
return

@ -1,88 +0,0 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""Conv2D op"""
from mindspore.ops.op_info_register import op_info_register
@op_info_register("""{
"op_name": "Conv2D",
"imply_type": "AutoDiff",
"fusion_type": "CONVLUTION",
"attr": [
{
"name": "x_shape",
"param_type": "required",
"type": "listInt"
},
{
"name": "w_shape",
"param_type": "required",
"type": "listInt"
},
{
"name": "pad_list",
"param_type": "required",
"type": "listInt"
},
{
"name": "stride",
"param_type": "optional",
"type": "int"
},
{
"name": "dilation",
"param_type": "optional",
"type": "int"
}
],
"inputs": [
{
"index": 0,
"dtype": [
"float16"
],
"format": [
"NC1HWC0"
],
"name": "x"
},
{
"index": 1,
"dtype": [
"float16"
],
"format": [
"FracZ"
],
"name": "w"
}
],
"outputs": [
{
"index": 0,
"dtype": [
"float16"
],
"format": [
"NC1HWC0"
],
"name": "output"
}
]
}""")
def _conv2d_akg():
"""Conv2D AutoDiff register"""
return

@ -1,88 +0,0 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""Conv2DBackpropFilter op"""
from mindspore.ops.op_info_register import op_info_register
@op_info_register("""{
"op_name": "Conv2DBackpropFilter",
"imply_type": "AutoDiff",
"fusion_type": "CONVLUTION",
"attr": [
{
"name": "input_shape",
"param_type": "required",
"type": "listInt"
},
{
"name": "filter_sizes",
"param_type": "required",
"type": "listInt"
},
{
"name": "stride",
"param_type": "optional",
"type": "int"
},
{
"name": "pad_list",
"param_type": "required",
"type": "listInt"
},
{
"name": "dilation",
"param_type": "optional",
"type": "int"
}
],
"inputs": [
{
"index": 0,
"dtype": [
"float16"
],
"format": [
"NC1HWC0"
],
"name": "out_backprop"
},
{
"index": 1,
"dtype": [
"float16"
],
"format": [
"NC1HWC0"
],
"name": "input"
}
],
"outputs": [
{
"index": 0,
"dtype": [
"float32"
],
"format": [
"FracZ"
],
"name": "output"
}
]
}""")
def _conv2d_backprop_filter_akg():
"""Conv2DBackpropFilter AutoDiff register"""
return

@ -1,88 +0,0 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""Conv2DBackpropInput op"""
from mindspore.ops.op_info_register import op_info_register
@op_info_register("""{
"op_name": "Conv2DBackpropInput",
"imply_type": "AutoDiff",
"fusion_type": "CONVLUTION",
"attr": [
{
"name": "input_sizes",
"param_type": "required",
"type": "listInt"
},
{
"name": "filter_shape",
"param_type": "required",
"type": "listInt"
},
{
"name": "stride",
"param_type": "optional",
"type": "int"
},
{
"name": "pad_list",
"param_type": "required",
"type": "listInt"
},
{
"name": "dilation",
"param_type": "optional",
"type": "int"
}
],
"inputs": [
{
"index": 0,
"dtype": [
"float16"
],
"format": [
"NC1HWC0"
],
"name": "out_backprop"
},
{
"index": 1,
"dtype": [
"float16"
],
"format": [
"FracZ"
],
"name": "filter"
}
],
"outputs": [
{
"index": 0,
"dtype": [
"float16"
],
"format": [
"NC1HWC0"
],
"name": "output"
}
]
}""")
def _conv2d_backprop_input_akg():
"""Conv2DBackpropInput AutoDiff register"""
return

@ -1,108 +0,0 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""ConvBN1 op"""
from mindspore.ops.op_info_register import op_info_register
@op_info_register("""{
"op_name": "ConvBN1",
"imply_type": "AutoDiff",
"fusion_type": "CONVLUTION",
"attr": [
{
"name": "x_shape",
"param_type": "required",
"type": "listInt"
},
{
"name": "w_shape",
"param_type": "required",
"type": "listInt"
},
{
"name": "pad_list",
"param_type": "required",
"type": "listInt"
},
{
"name": "stride",
"param_type": "optional",
"type": "int"
},
{
"name": "dilation",
"param_type": "optional",
"type": "int"
}
],
"inputs": [
{
"index": 0,
"dtype": [
"float16"
],
"format": [
"NC1HWC0"
],
"name": "x"
},
{
"index": 1,
"dtype": [
"float16"
],
"format": [
"FracZ"
],
"name": "w"
}
],
"outputs": [
{
"index": 0,
"dtype": [
"float16"
],
"format": [
"NC1HWC0"
],
"name": "conv_res_16"
},
{
"index": 1,
"dtype": [
"float32"
],
"format": [
"NC1HWC0"
],
"name": "var_part"
},
{
"index": 2,
"dtype": [
"float32"
],
"format": [
"NC1HWC0"
],
"name": "mean"
}
]
}""")
def _conv_bn1_akg():
"""ConvBN1 AutoDiff register"""
return

@ -1,64 +0,0 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""Div op"""
from mindspore.ops.op_info_register import op_info_register
@op_info_register("""{
"op_name": "Div",
"imply_type": "AutoDiff",
"fusion_type": "ELEMWISE",
"attr": [
],
"inputs": [
{
"index": 0,
"dtype": [
"float16", "float32", "int32", "float16", "float32", "int32"
],
"format": [
"DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0"
],
"name": "x"
},
{
"index": 1,
"dtype": [
"float16", "float32", "int32", "float16", "float32", "int32"
],
"format": [
"DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0"
],
"name": "y"
}
],
"outputs": [
{
"index": 0,
"dtype": [
"float16", "float32", "int32", "float16", "float32", "int32"
],
"format": [
"DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0"
],
"name": "output"
}
]
}""")
def _div_akg():
"""Div AutoDiff register"""
return

@ -1,64 +0,0 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""Equal op"""
from mindspore.ops.op_info_register import op_info_register
@op_info_register("""{
"op_name": "Equal",
"imply_type": "AutoDiff",
"fusion_type": "ELEMWISE",
"attr": [
],
"inputs": [
{
"index": 0,
"dtype": [
"int32", "float16", "float32", "int32", "float16", "float32"
],
"format": [
"DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0"
],
"name": "x"
},
{
"index": 1,
"dtype": [
"int32", "float16", "float32", "int32", "float16", "float32"
],
"format": [
"DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0"
],
"name": "y"
}
],
"outputs": [
{
"index": 0,
"dtype": [
"bool", "bool", "bool", "bool", "bool", "bool"
],
"format": [
"DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0"
],
"name": "output"
}
]
}""")
def _equal_akg():
"""Equal AutoDiff register"""
return

@ -1,64 +0,0 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""EqualCount op"""
from mindspore.ops.op_info_register import op_info_register
@op_info_register("""{
"op_name": "EqualCount",
"imply_type": "AutoDiff",
"fusion_type": "OPAQUE",
"attr": [
],
"inputs": [
{
"index": 0,
"dtype": [
"int32"
],
"format": [
"DefaultFormat"
],
"name": "x"
},
{
"index": 1,
"dtype": [
"int32"
],
"format": [
"DefaultFormat"
],
"name": "y"
}
],
"outputs": [
{
"index": 0,
"dtype": [
"int32"
],
"format": [
"DefaultFormat"
],
"name": "output"
}
]
}""")
def _equal_count_akg():
"""EqualCount AutoDiff register"""
return

@ -1,54 +0,0 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""EquivFormat op"""
from mindspore.ops.op_info_register import op_info_register
@op_info_register("""{
"op_name": "EquivFormat",
"imply_type": "AutoDiff",
"fusion_type": "ELEMWISE",
"attr": [
],
"inputs": [
{
"index": 0,
"dtype": [
"float16", "float32", "float16", "float32"
],
"format": [
"DefaultFormat", "DefaultFormat", "FRACTAL_NZ", "FRACTAL_NZ"
],
"name": "x"
}
],
"outputs": [
{
"index": 0,
"dtype": [
"float16", "float32", "float16", "float32"
],
"format": [
"FRACTAL_NZ", "FRACTAL_NZ", "DefaultFormat", "DefaultFormat"
],
"name": "output"
}
]
}""")
def _equiv_format_akg():
"""EquivFormat AutoDiff register"""
return

@ -1,59 +0,0 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""Exp op"""
from mindspore.ops.op_info_register import op_info_register
@op_info_register("""{
"op_name": "Exp",
"imply_type": "AutoDiff",
"fusion_type": "ELEMWISE",
"attr": [
],
"inputs": [
{
"index": 0,
"dtype": [
"float16", "float32", "float16", "float32",
"float16", "float32"
],
"format": [
"DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0",
"FRACTAL_NZ", "FRACTAL_NZ"
],
"param_type": "required",
"name": "x"
}
],
"outputs": [
{
"index": 0,
"dtype": [
"float16", "float32", "float16", "float32",
"float16", "float32"
],
"format": [
"DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0",
"FRACTAL_NZ", "FRACTAL_NZ"
],
"name": "output"
}
]
}""")
def _exp_akg():
"""Exp AutoDiff register"""
return

@ -1,58 +0,0 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""ExpandDims op"""
from mindspore.ops.op_info_register import op_info_register
@op_info_register("""{
"op_name": "ExpandDims",
"imply_type": "AutoDiff",
"fusion_type": "OPAQUE",
"attr": [
{
"name": "axis",
"param_type": "required",
"type": "int"
}
],
"inputs": [
{
"index": 0,
"dtype": [
"float16", "float32", "int32"
],
"format": [
"DefaultFormat", "DefaultFormat", "DefaultFormat"
],
"name": "x"
}
],
"outputs": [
{
"index": 0,
"dtype": [
"float16", "float32", "int32"
],
"format": [
"DefaultFormat", "DefaultFormat", "DefaultFormat"
],
"name": "y"
}
]
}""")
def _expand_dims_akg():
"""ExpandDims AutoDiff register"""
return

@ -1,68 +0,0 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""Five2Four op"""
from mindspore.ops.op_info_register import op_info_register
@op_info_register("""{
"op_name": "Five2Four",
"imply_type": "AutoDiff",
"fusion_type": "OPAQUE",
"attr": [
{
"name": "shape4d",
"param_type": "required",
"type": "listInt"
},
{
"name": "dstType",
"param_type": "required",
"type": "str"
},
{
"name": "output_format",
"param_type": "required",
"type": "str"
}
],
"inputs": [
{
"index": 0,
"dtype": [
"float16","float16","float16","float32","float16","float32"
],
"format": [
"NC1HWC0","NC1HWC0","NC1HWC0","NC1HWC0","NC1HWC0","NC1HWC0"
],
"name": "x"
}
],
"outputs": [
{
"index": 0,
"dtype": [
"float16","float16","float32","float32","float32","float32"
],
"format": [
"DefaultFormat","NHWC","DefaultFormat","DefaultFormat","NHWC","NHWC"
],
"name": "output"
}
]
}""")
def _five2four_akg():
"""Five2Four AutoDiff register"""
return

@ -1,64 +0,0 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""FloorDiv op"""
from mindspore.ops.op_info_register import op_info_register
@op_info_register("""{
"op_name": "FloorDiv",
"imply_type": "AutoDiff",
"fusion_type": "ELEMWISE",
"attr": [
],
"inputs": [
{
"index": 0,
"dtype": [
"float16", "float32", "float16", "float32"
],
"format": [
"DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0"
],
"name": "x"
},
{
"index": 1,
"dtype": [
"float16", "float32", "float16", "float32"
],
"format": [
"DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0"
],
"name": "y"
}
],
"outputs": [
{
"index": 0,
"dtype": [
"int32", "int32", "int32", "int32"
],
"format": [
"DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0"
],
"name": "output"
}
]
}""")
def _floor_div_akg():
"""FloorDiv AutoDiff register"""
return

@ -1,63 +0,0 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""Four2Five op"""
from mindspore.ops.op_info_register import op_info_register
@op_info_register("""{
"op_name": "Four2Five",
"imply_type": "AutoDiff",
"fusion_type": "OPAQUE",
"attr": [
{
"name": "data_format",
"param_type": "optional",
"type": "listStr"
},
{
"name": "dst_type",
"param_type": "required",
"type": "str"
}
],
"inputs": [
{
"index": 0,
"dtype": [
"float16", "float32", "float32", "float16","float32", "float32"
],
"format": [
"DefaultFormat", "DefaultFormat", "DefaultFormat", "NHWC", "NHWC", "NHWC"
],
"name": "x"
}
],
"outputs": [
{
"index": 0,
"dtype": [
"float16", "float16", "float32", "float16", "float16", "float32"
],
"format": [
"NC1HWC0", "NC1HWC0", "NC1HWC0", "NC1HWC0", "NC1HWC0", "NC1HWC0"
],
"name": "output"
}
]
}""")
def _four2five_akg():
"""Four2Five AutoDiff register"""
return

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save