From 908539754a3d83d70501243fd42510aa2ab9a809 Mon Sep 17 00:00:00 2001 From: dayschan <6573942+dayschan@user.noreply.gitee.com> Date: Tue, 14 Jul 2020 17:05:32 +0800 Subject: [PATCH] remove useless op registers of akg --- mindspore/ops/_op_impl/akg/abs.py | 58 ------- mindspore/ops/_op_impl/akg/add.py | 72 --------- mindspore/ops/_op_impl/akg/add_n.py | 58 ------- mindspore/ops/_op_impl/akg/apply_momentum.py | 103 ------------ mindspore/ops/_op_impl/akg/argmax.py | 58 ------- mindspore/ops/_op_impl/akg/assign.py | 63 -------- mindspore/ops/_op_impl/akg/assign_add.py | 64 -------- mindspore/ops/_op_impl/akg/batchmatmul.py | 73 --------- mindspore/ops/_op_impl/akg/bias_add.py | 68 -------- mindspore/ops/_op_impl/akg/bias_add_grad.py | 58 ------- mindspore/ops/_op_impl/akg/cast.py | 74 --------- mindspore/ops/_op_impl/akg/clear_zero.py | 64 -------- mindspore/ops/_op_impl/akg/conv2d.py | 88 ----------- .../_op_impl/akg/conv2d_backprop_filter.py | 88 ----------- .../ops/_op_impl/akg/conv2d_backprop_input.py | 88 ----------- mindspore/ops/_op_impl/akg/conv_bn1.py | 108 ------------- mindspore/ops/_op_impl/akg/div.py | 64 -------- mindspore/ops/_op_impl/akg/equal.py | 64 -------- mindspore/ops/_op_impl/akg/equal_count.py | 64 -------- mindspore/ops/_op_impl/akg/equiv_format.py | 54 ------- mindspore/ops/_op_impl/akg/exp.py | 59 ------- mindspore/ops/_op_impl/akg/expand_dims.py | 58 ------- mindspore/ops/_op_impl/akg/five2four.py | 68 -------- mindspore/ops/_op_impl/akg/floordiv.py | 64 -------- mindspore/ops/_op_impl/akg/four2five.py | 63 -------- .../ops/_op_impl/akg/fused_batch_norm.py | 149 ------------------ .../ops/_op_impl/akg/fused_batch_norm_grad.py | 119 -------------- .../_op_impl/akg/fused_batch_norm_infer.py | 109 ------------- mindspore/ops/_op_impl/akg/fused_bn1.py | 64 -------- mindspore/ops/_op_impl/akg/fused_bn1_grad.py | 93 ----------- mindspore/ops/_op_impl/akg/fused_bn2.py | 108 ------------- mindspore/ops/_op_impl/akg/fused_bn2_grad.py | 132 ---------------- mindspore/ops/_op_impl/akg/fused_bn3.py | 95 ----------- mindspore/ops/_op_impl/akg/fused_bn3_grad.py | 93 ----------- mindspore/ops/_op_impl/akg/gather_v2.py | 68 -------- mindspore/ops/_op_impl/akg/greater.py | 64 -------- mindspore/ops/_op_impl/akg/greater_equal.py | 64 -------- mindspore/ops/_op_impl/akg/inplace_assign.py | 78 --------- mindspore/ops/_op_impl/akg/less.py | 64 -------- mindspore/ops/_op_impl/akg/less_equal.py | 64 -------- mindspore/ops/_op_impl/akg/log.py | 55 ------- mindspore/ops/_op_impl/akg/matmul.py | 73 --------- mindspore/ops/_op_impl/akg/max.py | 63 -------- .../_op_impl/akg/max_pool_grad_with_argmax.py | 93 ----------- .../ops/_op_impl/akg/max_pool_with_argmax.py | 83 ---------- mindspore/ops/_op_impl/akg/maximum.py | 64 -------- mindspore/ops/_op_impl/akg/mean.py | 54 ------- mindspore/ops/_op_impl/akg/mean_grad.py | 58 ------- mindspore/ops/_op_impl/akg/minimum.py | 70 -------- mindspore/ops/_op_impl/akg/mul.py | 86 ---------- mindspore/ops/_op_impl/akg/neg.py | 59 ------- mindspore/ops/_op_impl/akg/one_hot.py | 83 ---------- mindspore/ops/_op_impl/akg/pow.py | 65 -------- mindspore/ops/_op_impl/akg/real_div.py | 72 --------- mindspore/ops/_op_impl/akg/reciprocal.py | 54 ------- mindspore/ops/_op_impl/akg/reduce_max.py | 63 -------- mindspore/ops/_op_impl/akg/reduce_mean.py | 63 -------- mindspore/ops/_op_impl/akg/reduce_sum.py | 73 --------- mindspore/ops/_op_impl/akg/relu.py | 54 ------- mindspore/ops/_op_impl/akg/relu_grad.py | 64 -------- mindspore/ops/_op_impl/akg/reshape.py | 58 ------- mindspore/ops/_op_impl/akg/round.py | 54 ------- mindspore/ops/_op_impl/akg/rsqrt.py | 54 ------- mindspore/ops/_op_impl/akg/select.py | 76 --------- mindspore/ops/_op_impl/akg/softmax.py | 58 ------- ...parse_softmax_cross_entropy_with_logits.py | 73 --------- mindspore/ops/_op_impl/akg/sqrt.py | 54 ------- mindspore/ops/_op_impl/akg/strided_slice.py | 93 ----------- mindspore/ops/_op_impl/akg/sub.py | 72 --------- mindspore/ops/_op_impl/akg/sum.py | 68 -------- mindspore/ops/_op_impl/akg/tile.py | 58 ------- mindspore/ops/_op_impl/akg/zeros_like.py | 54 ------- 72 files changed, 5228 deletions(-) delete mode 100644 mindspore/ops/_op_impl/akg/abs.py delete mode 100644 mindspore/ops/_op_impl/akg/add.py delete mode 100644 mindspore/ops/_op_impl/akg/add_n.py delete mode 100644 mindspore/ops/_op_impl/akg/apply_momentum.py delete mode 100644 mindspore/ops/_op_impl/akg/argmax.py delete mode 100644 mindspore/ops/_op_impl/akg/assign.py delete mode 100644 mindspore/ops/_op_impl/akg/assign_add.py delete mode 100644 mindspore/ops/_op_impl/akg/batchmatmul.py delete mode 100644 mindspore/ops/_op_impl/akg/bias_add.py delete mode 100644 mindspore/ops/_op_impl/akg/bias_add_grad.py delete mode 100644 mindspore/ops/_op_impl/akg/cast.py delete mode 100644 mindspore/ops/_op_impl/akg/clear_zero.py delete mode 100644 mindspore/ops/_op_impl/akg/conv2d.py delete mode 100644 mindspore/ops/_op_impl/akg/conv2d_backprop_filter.py delete mode 100644 mindspore/ops/_op_impl/akg/conv2d_backprop_input.py delete mode 100644 mindspore/ops/_op_impl/akg/conv_bn1.py delete mode 100644 mindspore/ops/_op_impl/akg/div.py delete mode 100644 mindspore/ops/_op_impl/akg/equal.py delete mode 100644 mindspore/ops/_op_impl/akg/equal_count.py delete mode 100644 mindspore/ops/_op_impl/akg/equiv_format.py delete mode 100644 mindspore/ops/_op_impl/akg/exp.py delete mode 100644 mindspore/ops/_op_impl/akg/expand_dims.py delete mode 100644 mindspore/ops/_op_impl/akg/five2four.py delete mode 100644 mindspore/ops/_op_impl/akg/floordiv.py delete mode 100644 mindspore/ops/_op_impl/akg/four2five.py delete mode 100644 mindspore/ops/_op_impl/akg/fused_batch_norm.py delete mode 100644 mindspore/ops/_op_impl/akg/fused_batch_norm_grad.py delete mode 100644 mindspore/ops/_op_impl/akg/fused_batch_norm_infer.py delete mode 100644 mindspore/ops/_op_impl/akg/fused_bn1.py delete mode 100644 mindspore/ops/_op_impl/akg/fused_bn1_grad.py delete mode 100644 mindspore/ops/_op_impl/akg/fused_bn2.py delete mode 100644 mindspore/ops/_op_impl/akg/fused_bn2_grad.py delete mode 100644 mindspore/ops/_op_impl/akg/fused_bn3.py delete mode 100644 mindspore/ops/_op_impl/akg/fused_bn3_grad.py delete mode 100644 mindspore/ops/_op_impl/akg/gather_v2.py delete mode 100644 mindspore/ops/_op_impl/akg/greater.py delete mode 100644 mindspore/ops/_op_impl/akg/greater_equal.py delete mode 100644 mindspore/ops/_op_impl/akg/inplace_assign.py delete mode 100644 mindspore/ops/_op_impl/akg/less.py delete mode 100644 mindspore/ops/_op_impl/akg/less_equal.py delete mode 100644 mindspore/ops/_op_impl/akg/log.py delete mode 100644 mindspore/ops/_op_impl/akg/matmul.py delete mode 100644 mindspore/ops/_op_impl/akg/max.py delete mode 100644 mindspore/ops/_op_impl/akg/max_pool_grad_with_argmax.py delete mode 100644 mindspore/ops/_op_impl/akg/max_pool_with_argmax.py delete mode 100644 mindspore/ops/_op_impl/akg/maximum.py delete mode 100644 mindspore/ops/_op_impl/akg/mean.py delete mode 100644 mindspore/ops/_op_impl/akg/mean_grad.py delete mode 100644 mindspore/ops/_op_impl/akg/minimum.py delete mode 100644 mindspore/ops/_op_impl/akg/mul.py delete mode 100644 mindspore/ops/_op_impl/akg/neg.py delete mode 100644 mindspore/ops/_op_impl/akg/one_hot.py delete mode 100644 mindspore/ops/_op_impl/akg/pow.py delete mode 100644 mindspore/ops/_op_impl/akg/real_div.py delete mode 100644 mindspore/ops/_op_impl/akg/reciprocal.py delete mode 100644 mindspore/ops/_op_impl/akg/reduce_max.py delete mode 100644 mindspore/ops/_op_impl/akg/reduce_mean.py delete mode 100644 mindspore/ops/_op_impl/akg/reduce_sum.py delete mode 100644 mindspore/ops/_op_impl/akg/relu.py delete mode 100644 mindspore/ops/_op_impl/akg/relu_grad.py delete mode 100644 mindspore/ops/_op_impl/akg/reshape.py delete mode 100644 mindspore/ops/_op_impl/akg/round.py delete mode 100644 mindspore/ops/_op_impl/akg/rsqrt.py delete mode 100644 mindspore/ops/_op_impl/akg/select.py delete mode 100644 mindspore/ops/_op_impl/akg/softmax.py delete mode 100644 mindspore/ops/_op_impl/akg/sparse_softmax_cross_entropy_with_logits.py delete mode 100644 mindspore/ops/_op_impl/akg/sqrt.py delete mode 100644 mindspore/ops/_op_impl/akg/strided_slice.py delete mode 100644 mindspore/ops/_op_impl/akg/sub.py delete mode 100644 mindspore/ops/_op_impl/akg/sum.py delete mode 100644 mindspore/ops/_op_impl/akg/tile.py delete mode 100644 mindspore/ops/_op_impl/akg/zeros_like.py diff --git a/mindspore/ops/_op_impl/akg/abs.py b/mindspore/ops/_op_impl/akg/abs.py deleted file mode 100644 index 8c08f405da..0000000000 --- a/mindspore/ops/_op_impl/akg/abs.py +++ /dev/null @@ -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 diff --git a/mindspore/ops/_op_impl/akg/add.py b/mindspore/ops/_op_impl/akg/add.py deleted file mode 100644 index 60544ea1c7..0000000000 --- a/mindspore/ops/_op_impl/akg/add.py +++ /dev/null @@ -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 diff --git a/mindspore/ops/_op_impl/akg/add_n.py b/mindspore/ops/_op_impl/akg/add_n.py deleted file mode 100644 index 53320f752e..0000000000 --- a/mindspore/ops/_op_impl/akg/add_n.py +++ /dev/null @@ -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 diff --git a/mindspore/ops/_op_impl/akg/apply_momentum.py b/mindspore/ops/_op_impl/akg/apply_momentum.py deleted file mode 100644 index 7160571882..0000000000 --- a/mindspore/ops/_op_impl/akg/apply_momentum.py +++ /dev/null @@ -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 diff --git a/mindspore/ops/_op_impl/akg/argmax.py b/mindspore/ops/_op_impl/akg/argmax.py deleted file mode 100644 index b04862cbeb..0000000000 --- a/mindspore/ops/_op_impl/akg/argmax.py +++ /dev/null @@ -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 diff --git a/mindspore/ops/_op_impl/akg/assign.py b/mindspore/ops/_op_impl/akg/assign.py deleted file mode 100644 index e7c5a082bd..0000000000 --- a/mindspore/ops/_op_impl/akg/assign.py +++ /dev/null @@ -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 diff --git a/mindspore/ops/_op_impl/akg/assign_add.py b/mindspore/ops/_op_impl/akg/assign_add.py deleted file mode 100644 index 7d0d345764..0000000000 --- a/mindspore/ops/_op_impl/akg/assign_add.py +++ /dev/null @@ -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 diff --git a/mindspore/ops/_op_impl/akg/batchmatmul.py b/mindspore/ops/_op_impl/akg/batchmatmul.py deleted file mode 100644 index f5da71aa25..0000000000 --- a/mindspore/ops/_op_impl/akg/batchmatmul.py +++ /dev/null @@ -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 diff --git a/mindspore/ops/_op_impl/akg/bias_add.py b/mindspore/ops/_op_impl/akg/bias_add.py deleted file mode 100644 index 74f2bf7bcf..0000000000 --- a/mindspore/ops/_op_impl/akg/bias_add.py +++ /dev/null @@ -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 diff --git a/mindspore/ops/_op_impl/akg/bias_add_grad.py b/mindspore/ops/_op_impl/akg/bias_add_grad.py deleted file mode 100644 index 7726af6692..0000000000 --- a/mindspore/ops/_op_impl/akg/bias_add_grad.py +++ /dev/null @@ -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 diff --git a/mindspore/ops/_op_impl/akg/cast.py b/mindspore/ops/_op_impl/akg/cast.py deleted file mode 100644 index a78d4d87e4..0000000000 --- a/mindspore/ops/_op_impl/akg/cast.py +++ /dev/null @@ -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 diff --git a/mindspore/ops/_op_impl/akg/clear_zero.py b/mindspore/ops/_op_impl/akg/clear_zero.py deleted file mode 100644 index 38bf35044f..0000000000 --- a/mindspore/ops/_op_impl/akg/clear_zero.py +++ /dev/null @@ -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 diff --git a/mindspore/ops/_op_impl/akg/conv2d.py b/mindspore/ops/_op_impl/akg/conv2d.py deleted file mode 100644 index 709aca7001..0000000000 --- a/mindspore/ops/_op_impl/akg/conv2d.py +++ /dev/null @@ -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 diff --git a/mindspore/ops/_op_impl/akg/conv2d_backprop_filter.py b/mindspore/ops/_op_impl/akg/conv2d_backprop_filter.py deleted file mode 100644 index 1e4e4f1a1e..0000000000 --- a/mindspore/ops/_op_impl/akg/conv2d_backprop_filter.py +++ /dev/null @@ -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 diff --git a/mindspore/ops/_op_impl/akg/conv2d_backprop_input.py b/mindspore/ops/_op_impl/akg/conv2d_backprop_input.py deleted file mode 100644 index 52c7f2e7b3..0000000000 --- a/mindspore/ops/_op_impl/akg/conv2d_backprop_input.py +++ /dev/null @@ -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 diff --git a/mindspore/ops/_op_impl/akg/conv_bn1.py b/mindspore/ops/_op_impl/akg/conv_bn1.py deleted file mode 100644 index 118c94e6fc..0000000000 --- a/mindspore/ops/_op_impl/akg/conv_bn1.py +++ /dev/null @@ -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 diff --git a/mindspore/ops/_op_impl/akg/div.py b/mindspore/ops/_op_impl/akg/div.py deleted file mode 100644 index 56cdcca868..0000000000 --- a/mindspore/ops/_op_impl/akg/div.py +++ /dev/null @@ -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 diff --git a/mindspore/ops/_op_impl/akg/equal.py b/mindspore/ops/_op_impl/akg/equal.py deleted file mode 100644 index 35874c62bb..0000000000 --- a/mindspore/ops/_op_impl/akg/equal.py +++ /dev/null @@ -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 diff --git a/mindspore/ops/_op_impl/akg/equal_count.py b/mindspore/ops/_op_impl/akg/equal_count.py deleted file mode 100644 index 9c575db7b3..0000000000 --- a/mindspore/ops/_op_impl/akg/equal_count.py +++ /dev/null @@ -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 diff --git a/mindspore/ops/_op_impl/akg/equiv_format.py b/mindspore/ops/_op_impl/akg/equiv_format.py deleted file mode 100644 index 111451b15c..0000000000 --- a/mindspore/ops/_op_impl/akg/equiv_format.py +++ /dev/null @@ -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 diff --git a/mindspore/ops/_op_impl/akg/exp.py b/mindspore/ops/_op_impl/akg/exp.py deleted file mode 100644 index 273b3348a4..0000000000 --- a/mindspore/ops/_op_impl/akg/exp.py +++ /dev/null @@ -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 diff --git a/mindspore/ops/_op_impl/akg/expand_dims.py b/mindspore/ops/_op_impl/akg/expand_dims.py deleted file mode 100644 index 9e1b18153a..0000000000 --- a/mindspore/ops/_op_impl/akg/expand_dims.py +++ /dev/null @@ -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 diff --git a/mindspore/ops/_op_impl/akg/five2four.py b/mindspore/ops/_op_impl/akg/five2four.py deleted file mode 100644 index 1dac2c3628..0000000000 --- a/mindspore/ops/_op_impl/akg/five2four.py +++ /dev/null @@ -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 diff --git a/mindspore/ops/_op_impl/akg/floordiv.py b/mindspore/ops/_op_impl/akg/floordiv.py deleted file mode 100644 index 99e577b4be..0000000000 --- a/mindspore/ops/_op_impl/akg/floordiv.py +++ /dev/null @@ -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 diff --git a/mindspore/ops/_op_impl/akg/four2five.py b/mindspore/ops/_op_impl/akg/four2five.py deleted file mode 100644 index 01b6f85715..0000000000 --- a/mindspore/ops/_op_impl/akg/four2five.py +++ /dev/null @@ -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 diff --git a/mindspore/ops/_op_impl/akg/fused_batch_norm.py b/mindspore/ops/_op_impl/akg/fused_batch_norm.py deleted file mode 100644 index 5ce9839328..0000000000 --- a/mindspore/ops/_op_impl/akg/fused_batch_norm.py +++ /dev/null @@ -1,149 +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. -# ============================================================================ - -"""FusedBatchNorm op""" - -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "FusedBatchNorm", - "imply_type": "AutoDiff", - "fusion_type": "OPAQUE", - "attr": [ - { - "name": "momentum", - "param_type": "optional", - "type": "float" - }, - { - "name": "epsilon", - "param_type": "optional", - "type": "float" - }, - { - "name": "data_format", - "param_type": "optional", - "type": "listStr" - } - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "x" - }, - { - "index": 1, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "scale" - }, - { - "index": 2, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "b" - }, - { - "index": 3, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "mean" - }, - { - "index": 4, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "variance" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "y" - }, - { - "index": 1, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "running_mean" - }, - { - "index": 2, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "running_variance" - }, - { - "index": 3, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "save_mean" - }, - { - "index": 4, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "save_inv_variance" - } - ] -}""") -def _fused_batch_norm_akg(): - """FusedBatchNorm AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/fused_batch_norm_grad.py b/mindspore/ops/_op_impl/akg/fused_batch_norm_grad.py deleted file mode 100644 index 9191548f73..0000000000 --- a/mindspore/ops/_op_impl/akg/fused_batch_norm_grad.py +++ /dev/null @@ -1,119 +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. -# ============================================================================ - -"""FusedBatchNormGrad op""" - -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "FusedBatchNormGrad", - "imply_type": "AutoDiff", - "fusion_type": "OPAQUE", - "attr": [ - { - "name": "data_format", - "param_type": "optional", - "type": "listStr" - } - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "dy" - }, - { - "index": 1, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "x" - }, - { - "index": 2, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "scale" - }, - { - "index": 3, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "save_mean" - }, - { - "index": 4, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "save_inv_variance" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "dx" - }, - { - "index": 1, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "bn_scale" - }, - { - "index": 2, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "bn_bias" - } - ] -}""") -def _fused_batch_norm_grad_akg(): - """BiasAddGrad AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/fused_batch_norm_infer.py b/mindspore/ops/_op_impl/akg/fused_batch_norm_infer.py deleted file mode 100644 index 1e7743fa8f..0000000000 --- a/mindspore/ops/_op_impl/akg/fused_batch_norm_infer.py +++ /dev/null @@ -1,109 +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. -# ============================================================================ - -"""FusedBatchNormInfer op""" - -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "FusedBatchNormInfer", - "imply_type": "AutoDiff", - "fusion_type": "OPAQUE", - "attr": [ - { - "name": "momentum", - "param_type": "optional", - "type": "float" - }, - { - "name": "epsilon", - "param_type": "optional", - "type": "float" - }, - { - "name": "data_format", - "param_type": "optional", - "type": "listStr" - } - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "x" - }, - { - "index": 1, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "scale" - }, - { - "index": 2, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "b" - }, - { - "index": 3, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "mean" - }, - { - "index": 4, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "variance" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "y" - } - ] -}""") -def _fused_batch_norm_infer_akg(): - """FusedBatchNormInfer AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/fused_bn1.py b/mindspore/ops/_op_impl/akg/fused_bn1.py deleted file mode 100644 index fdaa673f25..0000000000 --- a/mindspore/ops/_op_impl/akg/fused_bn1.py +++ /dev/null @@ -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. -# ============================================================================ - -"""FusedBN1 op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "FusedBN1", - "imply_type": "AutoDiff", - "fusion_type": "COMMREDUCE", - "attr": [ - - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32" - ], - "format": [ - "NC1HWC0", "NC1HWC0" - ], - "name": "data" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float32", "float32" - ], - "format": [ - "NC1HWC0", "NC1HWC0" - ], - "name": "output" - }, - { - "index": 1, - "dtype": [ - "float32", "float32" - ], - "format": [ - "NC1HWC0", "NC1HWC0" - ], - "name": "output" - } - ] -}""") -def _fused_bn1_akg(): - """FusedBN1 AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/fused_bn1_grad.py b/mindspore/ops/_op_impl/akg/fused_bn1_grad.py deleted file mode 100644 index 8de6796d6f..0000000000 --- a/mindspore/ops/_op_impl/akg/fused_bn1_grad.py +++ /dev/null @@ -1,93 +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. -# ============================================================================ - -"""BNGrad1 op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "BNGrad1", - "imply_type": "AutoDiff", - "fusion_type": "COMMREDUCE", - "attr": [ - - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32" - ], - "format": [ - "NC1HWC0", "NC1HWC0" - ], - "name": "dy" - }, - { - "index": 1, - "dtype": [ - "float16", "float32" - ], - "format": [ - "NC1HWC0", "NC1HWC0" - ], - "name": "data" - },{ - "index": 2, - "dtype": [ - "float32", "float32" - ], - "format": [ - "NC1HWC0", "NC1HWC0" - ], - "name": "mean" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float32", "float32" - ], - "format": [ - "NC1HWC0", "NC1HWC0" - ], - "name": "output" - }, - { - "index": 1, - "dtype": [ - "float32", "float32" - ], - "format": [ - "NC1HWC0", "NC1HWC0" - ], - "name": "output" - }, - { - "index": 2, - "dtype": [ - "float32", "float32" - ], - "format": [ - "NC1HWC0", "NC1HWC0" - ], - "name": "output" - } - ] -}""") -def _bn1_grad_akg(): - """BNGrad1 AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/fused_bn2.py b/mindspore/ops/_op_impl/akg/fused_bn2.py deleted file mode 100644 index e26a5ad8a0..0000000000 --- a/mindspore/ops/_op_impl/akg/fused_bn2.py +++ /dev/null @@ -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. -# ============================================================================ - -"""FusedBN2 op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "FusedBN2", - "imply_type": "AutoDiff", - "fusion_type": "COMMREDUCE", - "attr": [ - { - "name": "momentum", - "param_type": "optional", - "type": "float" - } - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "mean" - }, - { - "index": 1, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "var_part" - }, - { - "index": 2, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "running_mean" - }, - { - "index": 3, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "running_var" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "output" - }, - { - "index": 1, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "output" - }, - { - "index": 2, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "output" - } - ] -}""") -def _fused_bn2_akg(): - """FusedBN2 AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/fused_bn2_grad.py b/mindspore/ops/_op_impl/akg/fused_bn2_grad.py deleted file mode 100644 index e29a9177b6..0000000000 --- a/mindspore/ops/_op_impl/akg/fused_bn2_grad.py +++ /dev/null @@ -1,132 +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. -# ============================================================================ - -"""BNGrad1 op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "BNGrad2", - "imply_type": "AutoDiff", - "fusion_type": "COMMREDUCE", - "attr": [ - { - "name": "eps", - "param_type": "optional", - "type": "float" - }, - { - "name": "data_shape", - "param_type": "optional", - "type": "listInt" - } - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "dgamma_red_hw" - }, - { - "index": 1, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "dbeta_red_hw" - },{ - "index": 2, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "variance" - }, - { - "index": 3, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "gamma" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "output" - }, - { - "index": 1, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "output" - }, - { - "index": 2, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "output" - }, - { - "index": 3, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "output" - }, - { - "index": 4, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "output" - } - ] -}""") -def _bn2_grad_akg(): - """BNGrad2 AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/fused_bn3.py b/mindspore/ops/_op_impl/akg/fused_bn3.py deleted file mode 100644 index 74f3f652f3..0000000000 --- a/mindspore/ops/_op_impl/akg/fused_bn3.py +++ /dev/null @@ -1,95 +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. -# ============================================================================ - -"""FusedBN3 op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "FusedBN3", - "imply_type": "AutoDiff", - "fusion_type": "ELEMWISE", - "attr": [ - { - "name": "eps", - "param_type": "optional", - "type": "float" - } - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float16" - ], - "format": [ - "NC1HWC0" - ], - "name": "data" - }, - { - "index": 1, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "mean" - },{ - "index": 2, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "variance" - },{ - "index": 3, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "gamma" - },{ - "index": 4, - "dtype": [ - "float32" - ], - "format": [ - "NC1HWC0" - ], - "name": "beta" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float16" - ], - "format": [ - "NC1HWC0" - ], - "name": "output" - } - ] -}""") -def _fused_bn3_akg(): - """FusedBN3 AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/fused_bn3_grad.py b/mindspore/ops/_op_impl/akg/fused_bn3_grad.py deleted file mode 100644 index 5ffc57a68e..0000000000 --- a/mindspore/ops/_op_impl/akg/fused_bn3_grad.py +++ /dev/null @@ -1,93 +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. -# ============================================================================ - -"""BNGrad3 op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "BNGrad3", - "imply_type": "AutoDiff", - "fusion_type": "ELEMWISE", - "attr": [ - - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32" - ], - "format": [ - "NC1HWC0", "NC1HWC0" - ], - "name": "dy" - }, - { - "index": 1, - "dtype": [ - "float32", "float32" - ], - "format": [ - "NC1HWC0", "NC1HWC0" - ], - "name": "rs" - },{ - "index": 2, - "dtype": [ - "float32", "float32" - ], - "format": [ - "NC1HWC0", "NC1HWC0" - ], - "name": "dgamma_dx" - }, - { - "index": 3, - "dtype": [ - "float32", "float32" - ], - "format": [ - "NC1HWC0", "NC1HWC0" - ], - "name": "dbeta_dx" - }, - { - "index": 4, - "dtype": [ - "float32", "float32" - ], - "format": [ - "NC1HWC0", "NC1HWC0" - ], - "name": "data_minus_mean" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32" - ], - "format": [ - "NC1HWC0", "NC1HWC0" - ], - "name": "output" - } - ] -}""") -def _bn3_grad_akg(): - """BNGrad3 AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/gather_v2.py b/mindspore/ops/_op_impl/akg/gather_v2.py deleted file mode 100644 index 84ab7eb669..0000000000 --- a/mindspore/ops/_op_impl/akg/gather_v2.py +++ /dev/null @@ -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. -# ============================================================================ - -"""GatherV2 op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "GatherV2", - "imply_type": "AutoDiff", - "fusion_type": "ELEMWISE", - "attr": [ - { - "name": "axis", - "param_type": "optional", - "type": "int" - } - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "int32", "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat" - ], - "name": "params" - }, - { - "index": 1, - "dtype": [ - "int32", "int32", "int32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat" - ], - "name": "indices" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "int32", "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat" - ], - "name": "output" - } - ] -}""") -def _gather_v2_akg(): - """GatherV2 AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/greater.py b/mindspore/ops/_op_impl/akg/greater.py deleted file mode 100644 index 941946163a..0000000000 --- a/mindspore/ops/_op_impl/akg/greater.py +++ /dev/null @@ -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. -# ============================================================================ - -"""Greater op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "Greater", - "imply_type": "AutoDiff", - "fusion_type": "ELEMWISE", - "attr": [ - - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float16", "float16", "float32", "float32" - ], - "format": [ - "DefaultFormat", "NC1HWC0", "DefaultFormat", "NC1HWC0" - ], - "name": "x" - }, - { - "index": 1, - "dtype": [ - "float16", "float16", "float32", "float32" - ], - "format": [ - "DefaultFormat", "NC1HWC0", "DefaultFormat", "NC1HWC0" - ], - "name": "y" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "bool", "bool", "bool", "bool" - ], - "format": [ - "DefaultFormat", "NC1HWC0", "DefaultFormat", "NC1HWC0" - ], - "name": "output" - } - ] -}""") -def _greater_akg(): - """Greater AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/greater_equal.py b/mindspore/ops/_op_impl/akg/greater_equal.py deleted file mode 100644 index 11642baa86..0000000000 --- a/mindspore/ops/_op_impl/akg/greater_equal.py +++ /dev/null @@ -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. -# ============================================================================ - -"""GreaterEqual op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "GreaterEqual", - "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 _greater_equal_akg(): - """Equal AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/inplace_assign.py b/mindspore/ops/_op_impl/akg/inplace_assign.py deleted file mode 100644 index 1cc40abe9b..0000000000 --- a/mindspore/ops/_op_impl/akg/inplace_assign.py +++ /dev/null @@ -1,78 +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. -# ============================================================================ - -"""InplaceAssign op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "InplaceAssign", - "imply_type": "AutoDiff", - "fusion_type": "ELEMWISE", - "attr": [ - { - "name": "fake_output", - "param_type": "optional", - "type": "bool" - } - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "int32", "float16", "float32", "int32", "float16", "float32", "int32", "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0", "FracZ", "FracZ", "FracZ" - ], - "name": "x" - }, - { - "index": 1, - "dtype": [ - "int32", "float16", "float32", "int32", "float16", "float32", "int32", "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0", "FracZ", "FracZ", "FracZ" - ], - "name": "y" - }, - { - "index": 2, - "dtype": [ - "int32", "float16", "float32", "int32", "float16", "float32", "int32", "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0", "FracZ", "FracZ", "FracZ" - ], - "name": "z" - } - ], - "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 _inplace_assign_akg(): - """InplaceAssign AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/less.py b/mindspore/ops/_op_impl/akg/less.py deleted file mode 100644 index 499ed2e8fc..0000000000 --- a/mindspore/ops/_op_impl/akg/less.py +++ /dev/null @@ -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. -# ============================================================================ - -"""Less op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "Less", - "imply_type": "AutoDiff", - "fusion_type": "ELEMWISE", - "attr": [ - - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float16", "float16" - ], - "format": [ - "DefaultFormat", "NC1HWC0" - ], - "name": "x" - }, - { - "index": 1, - "dtype": [ - "float16", "float16" - ], - "format": [ - "DefaultFormat", "NC1HWC0" - ], - "name": "y" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "bool", "bool" - ], - "format": [ - "DefaultFormat", "NC1HWC0" - ], - "name": "output" - } - ] -}""") -def _less_akg(): - """Less AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/less_equal.py b/mindspore/ops/_op_impl/akg/less_equal.py deleted file mode 100644 index 97fbdec090..0000000000 --- a/mindspore/ops/_op_impl/akg/less_equal.py +++ /dev/null @@ -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. -# ============================================================================ - -"""LessEqual op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "LessEqual", - "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 _less_equal_akg(): - """Equal AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/log.py b/mindspore/ops/_op_impl/akg/log.py deleted file mode 100644 index 526538d17d..0000000000 --- a/mindspore/ops/_op_impl/akg/log.py +++ /dev/null @@ -1,55 +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. -# ============================================================================ - -"""Log op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "Log", - "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 _log_akg(): - """Log AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/matmul.py b/mindspore/ops/_op_impl/akg/matmul.py deleted file mode 100644 index 084ba754fa..0000000000 --- a/mindspore/ops/_op_impl/akg/matmul.py +++ /dev/null @@ -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. -# ============================================================================ - -"""MatMul op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "MatMul", - "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", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat" - ], - "name": "x1" - }, - { - "index": 1, - "dtype": [ - "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat" - ], - "name": "x2" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat" - ], - "name": "output" - } - ] -}""") -def _matmul_akg(): - """MatMul AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/max.py b/mindspore/ops/_op_impl/akg/max.py deleted file mode 100644 index 21fd4ef9c4..0000000000 --- a/mindspore/ops/_op_impl/akg/max.py +++ /dev/null @@ -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. -# ============================================================================ - -"""Max op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "Max", - "imply_type": "AutoDiff", - "fusion_type": "COMMREDUCE", - "attr": [ - { - "name": "axis", - "param_type": "required", - "type": "listInt" - }, - { - "name": "keep_dims", - "param_type": "required", - "type": "bool" - } - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "int32", "float16", "float32", "int32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0" - ], - "name": "x" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "int32", "float16", "float32", "int32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0" - ], - "name": "output" - } - ] -}""") -def _max_akg(): - """Max AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/max_pool_grad_with_argmax.py b/mindspore/ops/_op_impl/akg/max_pool_grad_with_argmax.py deleted file mode 100644 index 4adad3eb88..0000000000 --- a/mindspore/ops/_op_impl/akg/max_pool_grad_with_argmax.py +++ /dev/null @@ -1,93 +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. -# ============================================================================ - -"""MaxPoolGradWithArgmax op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "MaxPoolGradWithArgmax", - "imply_type": "AutoDiff", - "fusion_type": "CONVLUTION", - "attr": [ - { - "name": "pad_mode", - "param_type": "optional", - "type": "str" - }, - { - "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": [ - "float16", "float16" - ], - "format": [ - "NC1HWC0", "NC1HWC0" - ], - "name": "x" - }, - { - "index": 1, - "dtype": [ - "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat" - ], - "name": "argmax" - }, - { - "index": 2, - "dtype": [ - "float16", "float32" - ], - "format": [ - "NC1HWC0", "NC1HWC0" - ], - "name": "grad" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32" - ], - "format": [ - "NC1HWC0", "NC1HWC0" - ], - "name": "output" - } - ] -}""") -def _max_pool_grad_with_argmax_akg(): - """MaxPoolGradWithArgmax AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/max_pool_with_argmax.py b/mindspore/ops/_op_impl/akg/max_pool_with_argmax.py deleted file mode 100644 index 3ae36d4793..0000000000 --- a/mindspore/ops/_op_impl/akg/max_pool_with_argmax.py +++ /dev/null @@ -1,83 +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. -# ============================================================================ - -"""MaxPoolWithArgmax op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "MaxPoolWithArgmax", - "imply_type": "AutoDiff", - "fusion_type": "CONVLUTION", - "attr": [ - { - "name": "pad_mode", - "param_type": "optional", - "type": "str" - }, - { - "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": [ - "float16" - ], - "format": [ - "NC1HWC0" - ], - "name": "x" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float16" - ], - "format": [ - "NC1HWC0" - ], - "name": "output" - }, - { - "index": 1, - "dtype": [ - "float16" - ], - "format": [ - "DefaultFormat" - ], - "name": "argmax" - } - ] -}""") -def _max_pool_with_argmax_akg(): - """MaxPoolWithArgmax AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/maximum.py b/mindspore/ops/_op_impl/akg/maximum.py deleted file mode 100644 index 8d8de5270a..0000000000 --- a/mindspore/ops/_op_impl/akg/maximum.py +++ /dev/null @@ -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. -# ============================================================================ - -"""Maximum op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "Maximum", - "imply_type": "AutoDiff", - "fusion_type": "COMMREDUCE", - "attr": [], - "inputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "int32", "float16", "float32", "int32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0" - ], - "param_type": "required", - "name": "x" - }, - { - "index": 1, - "dtype": [ - "float16", "float32", "int32", "float16", "float32", "int32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0" - ], - "param_type": "required", - "name": "y" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "int32", "float16", "float32", "int32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0" - ], - "name": "output" - } - ] -}""") -def _maximum_akg(): - """Maximum AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/mean.py b/mindspore/ops/_op_impl/akg/mean.py deleted file mode 100644 index 0b49e76865..0000000000 --- a/mindspore/ops/_op_impl/akg/mean.py +++ /dev/null @@ -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. -# ============================================================================ - -"""SimpleMean op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "SimpleMean", - "imply_type": "AutoDiff", - "fusion_type": "COMMREDUCE", - "attr": [ - - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0" - ], - "name": "x" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0" - ], - "name": "output" - } - ] -}""") -def _mean_akg(): - """SimpleMean AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/mean_grad.py b/mindspore/ops/_op_impl/akg/mean_grad.py deleted file mode 100644 index 3b8379d1f0..0000000000 --- a/mindspore/ops/_op_impl/akg/mean_grad.py +++ /dev/null @@ -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. -# ============================================================================ - -"""SimpleMeanGrad op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "SimpleMeanGrad", - "imply_type": "AutoDiff", - "fusion_type": "COMMREDUCE", - "attr": [ - { - "name": "input_shape", - "param_type": "required", - "type": "listInt" - } - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0" - ], - "name": "HEAD" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0" - ], - "name": "output" - } - ] -}""") -def _mean_grad_akg(): - """SimpleMeanGrad AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/minimum.py b/mindspore/ops/_op_impl/akg/minimum.py deleted file mode 100644 index 759df2085f..0000000000 --- a/mindspore/ops/_op_impl/akg/minimum.py +++ /dev/null @@ -1,70 +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. -# ============================================================================ - -"""Minimum op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "Minimum", - "imply_type": "AutoDiff", - "fusion_type": "COMMREDUCE", - "attr": [], - "inputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "int32", "float16", "float32", "int32", - "float16", "float32", "int32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0", - "FRACTAL_NZ", "FRACTAL_NZ", "FRACTAL_NZ" - ], - "param_type": "required", - "name": "x" - }, - { - "index": 1, - "dtype": [ - "float16", "float32", "int32", "float16", "float32", "int32", - "float16", "float32", "int32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0", - "FRACTAL_NZ", "FRACTAL_NZ", "FRACTAL_NZ" - ], - "param_type": "required", - "name": "y" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "int32", "float16", "float32", "int32", - "float16", "float32", "int32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0", - "FRACTAL_NZ", "FRACTAL_NZ", "FRACTAL_NZ" - ], - "name": "output" - } - ] -}""") -def _minimum_akg(): - """Minimum AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/mul.py b/mindspore/ops/_op_impl/akg/mul.py deleted file mode 100644 index ab02c2d89e..0000000000 --- a/mindspore/ops/_op_impl/akg/mul.py +++ /dev/null @@ -1,86 +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. -# ============================================================================ - -"""Mul op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "Mul", - "imply_type": "AutoDiff", - "fusion_type": "ELEMWISE", - "attr": [ - { - "name": "x_shape", - "param_type": "required", - "type": "listInt" - }, - { - "name": "y_shape", - "param_type": "required", - "type": "listInt" - }, - { - "name": "data_format", - "param_type": "required", - "type": "listStr" - } - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "float16", "float32", "float16", "float32", - "float16", "float32" - ], - "format": [ - "FracZ", "FracZ", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", - "FRACTAL_NZ", "FRACTAL_NZ" - ], - "param_type": "required", - "name": "x" - }, - { - "index": 1, - "dtype": [ - "float16", "float32", "float16", "float32", "float16", "float32", - "float16", "float32" - ], - "format": [ - "FracZ", "FracZ", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", - "FRACTAL_NZ", "FRACTAL_NZ" - ], - "param_type": "required", - "name": "y" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "float16", "float32", "float16", "float32", - "float16", "float32" - ], - "format": [ - "FracZ", "FracZ", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", - "FRACTAL_NZ", "FRACTAL_NZ" - ], - "name": "output" - } - ] -}""") -def _mul_akg(): - """Mul AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/neg.py b/mindspore/ops/_op_impl/akg/neg.py deleted file mode 100644 index bc00d60271..0000000000 --- a/mindspore/ops/_op_impl/akg/neg.py +++ /dev/null @@ -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. -# ============================================================================ - -"""Neg op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "Neg", - "imply_type": "AutoDiff", - "fusion_type": "ELEMWISE", - "attr": [ - - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "int32", "float16", "float32", "int32", - "float16", "float32", "int32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0", - "FRACTAL_NZ", "FRACTAL_NZ", "FRACTAL_NZ" - ], - "param_type": "required", - "name": "x" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "int32", "float16", "float32", "int32", - "float16", "float32", "int32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0", - "FRACTAL_NZ", "FRACTAL_NZ", "FRACTAL_NZ" - ], - "name": "output" - } - ] -}""") -def _neg_akg(): - """Neg AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/one_hot.py b/mindspore/ops/_op_impl/akg/one_hot.py deleted file mode 100644 index c5034dbbd4..0000000000 --- a/mindspore/ops/_op_impl/akg/one_hot.py +++ /dev/null @@ -1,83 +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. -# ============================================================================ - -"""OneHot op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "OneHot", - "imply_type": "AutoDiff", - "fusion_type": "OPAQUE", - "attr": [ - { - "name": "depth", - "param_type": "required", - "type": "int" - }, - { - "name": "axis", - "param_type": "required", - "type": "int" - } - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "int32", "int32", "int32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat" - ], - "name": "indices" - }, - { - "index": 1, - "dtype": [ - "int32", "float32", "float16" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat" - ], - "name": "on_value" - }, - { - "index": 2, - "dtype": [ - "int32", "float32", "float16" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat" - ], - "name": "off_value" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "int32", "float32", "float16" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat" - ], - "name": "output" - } - ] -}""") -def _one_hot_akg(): - """OneHot AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/pow.py b/mindspore/ops/_op_impl/akg/pow.py deleted file mode 100644 index d782968c05..0000000000 --- a/mindspore/ops/_op_impl/akg/pow.py +++ /dev/null @@ -1,65 +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. -# ============================================================================ - -"""Pow op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "Pow", - "imply_type": "AutoDiff", - "fusion_type": "ELEMWISE", - "attr": [ - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float16", "int32", "float16", "int32", "float32", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "DefaultFormat", "NC1HWC0" - ], - "param_type": "required", - "name": "x" - }, - { - "index": 1, - "dtype": [ - "float16", "int32", "float16", "int32", "float32", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "DefaultFormat", "NC1HWC0" - ], - "param_type": "required", - "name": "power" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float16", "int32", "float16", "int32", "float32", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "DefaultFormat", "NC1HWC0" - ], - "name": "output" - } - ] -}""") -def _power_akg(): - """Pow AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/real_div.py b/mindspore/ops/_op_impl/akg/real_div.py deleted file mode 100644 index 9fa37a24e3..0000000000 --- a/mindspore/ops/_op_impl/akg/real_div.py +++ /dev/null @@ -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. -# ============================================================================ - -"""RealDiv op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "RealDiv", - "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" - }, - { - "index": 1, - "dtype": [ - "float16", "float32", "float16", "float32", - "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", - "FRACTAL_NZ", "FRACTAL_NZ" - ], - "param_type": "required", - "name": "y" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "float16", "float32", - "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", - "FRACTAL_NZ", "FRACTAL_NZ" - ], - "name": "output" - } - ] -}""") -def _real_div_akg(): - """RealDiv AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/reciprocal.py b/mindspore/ops/_op_impl/akg/reciprocal.py deleted file mode 100644 index 9fd7cc40b4..0000000000 --- a/mindspore/ops/_op_impl/akg/reciprocal.py +++ /dev/null @@ -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. -# ============================================================================ - -"""Reciprocal op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "Reciprocal", - "imply_type": "AutoDiff", - "fusion_type": "ELEMWISE", - "attr": [ - - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0" - ], - "name": "x" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0" - ], - "name": "output" - } - ] -}""") -def _reciprocal_akg(): - """Reciprocal AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/reduce_max.py b/mindspore/ops/_op_impl/akg/reduce_max.py deleted file mode 100644 index b9db8ea83a..0000000000 --- a/mindspore/ops/_op_impl/akg/reduce_max.py +++ /dev/null @@ -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. -# ============================================================================ - -"""ReduceMax op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "ReduceMax", - "imply_type": "AutoDiff", - "fusion_type": "COMMREDUCE", - "attr": [ - { - "name": "axis", - "param_type": "required", - "type": "listInt" - }, - { - "name": "keep_dims", - "param_type": "required", - "type": "bool" - } - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float16", "float16" - ], - "format": [ - "DefaultFormat", "NC1HWC0" - ], - "name": "x" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float16", "float16" - ], - "format": [ - "DefaultFormat", "NC1HWC0" - ], - "name": "output" - } - ] -}""") -def _reduce_max_akg(): - """ReduceMax AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/reduce_mean.py b/mindspore/ops/_op_impl/akg/reduce_mean.py deleted file mode 100644 index 0a4ffdf221..0000000000 --- a/mindspore/ops/_op_impl/akg/reduce_mean.py +++ /dev/null @@ -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. -# ============================================================================ - -"""ReduceMean op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "ReduceMean", - "imply_type": "AutoDiff", - "fusion_type": "COMMREDUCE", - "attr": [ - { - "name": "axis", - "param_type": "required", - "type": "listInt" - }, - { - "name": "keep_dims", - "param_type": "required", - "type": "bool" - } - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0" - ], - "name": "x" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0" - ], - "name": "output" - } - ] -}""") -def _reduce_mean_akg(): - """ReduceMean AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/reduce_sum.py b/mindspore/ops/_op_impl/akg/reduce_sum.py deleted file mode 100644 index 20d091ac76..0000000000 --- a/mindspore/ops/_op_impl/akg/reduce_sum.py +++ /dev/null @@ -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. -# ============================================================================ - -"""ReduceSum op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "ReduceSum", - "imply_type": "AutoDiff", - "fusion_type": "COMMREDUCE", - "attr": [ - { - "name": "axis", - "param_type": "required", - "type": "listInt" - }, - { - "name": "keep_dims", - "param_type": "required", - "type": "bool" - }, - { - "name": "atomic_add", - "param_type": "optional", - "type": "str" - } - ], - "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 _reduce_sum_akg(): - """ReduceSum AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/relu.py b/mindspore/ops/_op_impl/akg/relu.py deleted file mode 100644 index b32725f885..0000000000 --- a/mindspore/ops/_op_impl/akg/relu.py +++ /dev/null @@ -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. -# ============================================================================ - -"""ReLU op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "ReLU", - "imply_type": "AutoDiff", - "fusion_type": "ELEMWISE", - "attr": [ - - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "float16" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0" - ], - "name": "x" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "float16" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0" - ], - "name": "output" - } - ] -}""") -def _relu_akg(): - """ReLU AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/relu_grad.py b/mindspore/ops/_op_impl/akg/relu_grad.py deleted file mode 100644 index c785b750fe..0000000000 --- a/mindspore/ops/_op_impl/akg/relu_grad.py +++ /dev/null @@ -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. -# ============================================================================ - -"""ReluGrad op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "ReluGrad", - "imply_type": "AutoDiff", - "fusion_type": "ELEMWISE", - "attr": [ - - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "float16" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0" - ], - "name": "y_backprop" - }, - { - "index": 1, - "dtype": [ - "float16", "float32", "float16" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0" - ], - "name": "x" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "float16" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0" - ], - "name": "output" - } - ] -}""") -def _relu_grad_akg(): - """ReluGrad AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/reshape.py b/mindspore/ops/_op_impl/akg/reshape.py deleted file mode 100644 index d200b66fa2..0000000000 --- a/mindspore/ops/_op_impl/akg/reshape.py +++ /dev/null @@ -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. -# ============================================================================ - -"""Reshape op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "Reshape", - "imply_type": "AutoDiff", - "fusion_type": "OPAQUE", - "attr": [ - { - "name": "shape", - "param_type": "required", - "type": "listInt" - } - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0" - ], - "name": "tensor" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0" - ], - "name": "output" - } - ] -}""") -def _reshape_akg(): - """Reshape AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/round.py b/mindspore/ops/_op_impl/akg/round.py deleted file mode 100644 index 0625c3ceda..0000000000 --- a/mindspore/ops/_op_impl/akg/round.py +++ /dev/null @@ -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. -# ============================================================================ - -"""Round op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "Round", - "imply_type": "AutoDiff", - "fusion_type": "ELEMWISE", - "attr": [ - - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0" - ], - "name": "x" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0" - ], - "name": "output" - } - ] -}""") -def _round_akg(): - """Round AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/rsqrt.py b/mindspore/ops/_op_impl/akg/rsqrt.py deleted file mode 100644 index 9264864f91..0000000000 --- a/mindspore/ops/_op_impl/akg/rsqrt.py +++ /dev/null @@ -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. -# ============================================================================ - -"""Rsqrt op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "Rsqrt", - "imply_type": "AutoDiff", - "fusion_type": "ELEMWISE", - "attr": [ - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "int32", "float16", "float32", "int32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0" - ], - "param_type": "required", - "name": "x" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "int32", "float16", "float32", "int32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0" - ], - "name": "output" - } - ] -}""") -def _rsqrt_akg(): - """Rsqrt AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/select.py b/mindspore/ops/_op_impl/akg/select.py deleted file mode 100644 index 006c6a5444..0000000000 --- a/mindspore/ops/_op_impl/akg/select.py +++ /dev/null @@ -1,76 +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. -# ============================================================================ - -"""Select op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "Select", - "imply_type": "AutoDiff", - "fusion_type": "ELEMWISE", - "attr": [ - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "bool", "bool", "bool", "bool", "bool", "bool" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "DefaultFormat", "NC1HWC0" - ], - "param_type": "required", - "name": "condition" - }, - { - "index": 1, - "dtype": [ - "float16", "int32", "float16", "int32", "float32", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "DefaultFormat", "NC1HWC0" - ], - "param_type": "required", - "name": "x" - }, - { - "index": 2, - "dtype": [ - "float16", "int32", "float16", "int32", "float32", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "DefaultFormat", "NC1HWC0" - ], - "param_type": "required", - "name": "y" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float16", "int32", "float16", "int32", "float32", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "DefaultFormat", "NC1HWC0" - ], - "name": "output" - } - ] -}""") -def _select_akg(): - """Select AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/softmax.py b/mindspore/ops/_op_impl/akg/softmax.py deleted file mode 100644 index a41c2aef36..0000000000 --- a/mindspore/ops/_op_impl/akg/softmax.py +++ /dev/null @@ -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. -# ============================================================================ - -"""Softmax op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "Softmax", - "imply_type": "AutoDiff", - "fusion_type": "ELEMWISE", - "attr": [ - { - "name": "axis", - "param_type": "required", - "type": "listInt" - } - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0" - ], - "name": "x" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0" - ], - "name": "output" - } - ] -}""") -def _softmax_akg(): - """Softmax AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/sparse_softmax_cross_entropy_with_logits.py b/mindspore/ops/_op_impl/akg/sparse_softmax_cross_entropy_with_logits.py deleted file mode 100644 index e9e828f312..0000000000 --- a/mindspore/ops/_op_impl/akg/sparse_softmax_cross_entropy_with_logits.py +++ /dev/null @@ -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. -# ============================================================================ - -"""SparseSoftmaxCrossEntropyWithLogits op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "SparseSoftmaxCrossEntropyWithLogits", - "imply_type": "AutoDiff", - "fusion_type": "OPAQUE", - "attr": [ - { - "name": "is_grad", - "param_type": "optional", - "type": "bool" - }, - { - "name": "sens", - "param_type": "optional", - "type": "float" - } - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float32" - ], - "format": [ - "DefaultFormat" - ], - "name": "features" - }, - { - "index": 1, - "dtype": [ - "int32" - ], - "format": [ - "DefaultFormat" - ], - "name": "labels" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float32" - ], - "format": [ - "DefaultFormat" - ], - "name": "output" - } - ] -}""") -def _sparse_softmax_cross_entropy_with_logits_akg(): - """SparseSoftmaxCrossEntropyWithLogits AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/sqrt.py b/mindspore/ops/_op_impl/akg/sqrt.py deleted file mode 100644 index fcaa84b3d4..0000000000 --- a/mindspore/ops/_op_impl/akg/sqrt.py +++ /dev/null @@ -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. -# ============================================================================ - -"""Sqrt op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "Sqrt", - "imply_type": "AutoDiff", - "fusion_type": "ELEMWISE", - "attr": [ - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "int32", "float16", "float32", "int32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0" - ], - "param_type": "required", - "name": "x" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "int32", "float16", "float32", "int32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0" - ], - "name": "output" - } - ] -}""") -def _sqrt_akg(): - """Sqrt AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/strided_slice.py b/mindspore/ops/_op_impl/akg/strided_slice.py deleted file mode 100644 index bdbd8dfc2f..0000000000 --- a/mindspore/ops/_op_impl/akg/strided_slice.py +++ /dev/null @@ -1,93 +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. -# ============================================================================ - -"""StridedSlice op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "StridedSlice", - "imply_type": "AutoDiff", - "fusion_type": "OPAQUE", - "attr": [ - { - "name": "begin", - "param_type": "required", - "type": "listInt" - }, - { - "name": "end", - "param_type": "required", - "type": "listInt" - }, - { - "name": "strides", - "param_type": "required", - "type": "listInt" - }, - { - "name": "begin_mask", - "param_type": "required", - "type": "int" - }, - { - "name": "end_mask", - "param_type": "required", - "type": "int" - }, - { - "name": "ellipsis_mask", - "param_type": "required", - "type": "int" - }, - { - "name": "new_axis_mask", - "param_type": "required", - "type": "int" - }, - { - "name": "shrink_axis_mask", - "param_type": "required", - "type": "int" - } - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "int32", "float16", "float32", "int32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0" - ], - "name": "x" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "int32", "float16", "float32", "int32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0" - ], - "name": "output" - } - ] -}""") -def _strided_slice_akg(): - """StridedSlice AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/sub.py b/mindspore/ops/_op_impl/akg/sub.py deleted file mode 100644 index 846aa280bb..0000000000 --- a/mindspore/ops/_op_impl/akg/sub.py +++ /dev/null @@ -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. -# ============================================================================ - -"""Sub op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "Sub", - "imply_type": "AutoDiff", - "fusion_type": "ELEMWISE", - "attr": [ - - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "int32", "float16", "float32", "int32", "float16", "float32", - "int32", "float16", "float32", "int32", "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0", - "FracZ", "FracZ", "FracZ", "FRACTAL_NZ", "FRACTAL_NZ", "FRACTAL_NZ" - ], - "param_type": "required", - "name": "x" - }, - { - "index": 1, - "dtype": [ - "int32", "float16", "float32", "int32", "float16", "float32", - "int32", "float16", "float32", "int32", "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0", - "FracZ", "FracZ", "FracZ", "FRACTAL_NZ", "FRACTAL_NZ", "FRACTAL_NZ" - ], - "param_type": "required", - "name": "y" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "int32", "float16", "float32", "int32", "float16", "float32", - "int32", "float16", "float32", "int32", "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0", - "FracZ", "FracZ", "FracZ", "FRACTAL_NZ", "FRACTAL_NZ", "FRACTAL_NZ" - ], - "name": "output" - } - ] -}""") -def _sub_akg(): - """Sub AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/sum.py b/mindspore/ops/_op_impl/akg/sum.py deleted file mode 100644 index 501b387b25..0000000000 --- a/mindspore/ops/_op_impl/akg/sum.py +++ /dev/null @@ -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. -# ============================================================================ - -"""Sum op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "Sum", - "imply_type": "AutoDiff", - "fusion_type": "COMMREDUCE", - "attr": [ - { - "name": "axis", - "param_type": "required", - "type": "listInt" - }, - { - "name": "keepdims", - "param_type": "required", - "type": "bool" - } - ], - "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 _sum_akg(): - """Sum AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/tile.py b/mindspore/ops/_op_impl/akg/tile.py deleted file mode 100644 index bd13978fe7..0000000000 --- a/mindspore/ops/_op_impl/akg/tile.py +++ /dev/null @@ -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. -# ============================================================================ - -"""Tile op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "Tile", - "imply_type": "AutoDiff", - "fusion_type": "OPAQUE", - "attr": [ - { - "name": "multiples", - "param_type": "required", - "type": "listInt" - } - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "int32", "float16", "float32", "int32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0" - ], - "name": "x" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "int32", "float16", "float32", "int32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0", "NC1HWC0" - ], - "name": "output" - } - ] -}""") -def _tile_akg(): - """Tile AutoDiff register""" - return diff --git a/mindspore/ops/_op_impl/akg/zeros_like.py b/mindspore/ops/_op_impl/akg/zeros_like.py deleted file mode 100644 index a02ece22d7..0000000000 --- a/mindspore/ops/_op_impl/akg/zeros_like.py +++ /dev/null @@ -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. -# ============================================================================ - -"""ZerosLike op""" -from mindspore.ops.op_info_register import op_info_register - - -@op_info_register("""{ - "op_name": "ZerosLike", - "imply_type": "AutoDiff", - "fusion_type": "ELEMWISE", - "attr": [ - - ], - "inputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0" - ], - "name": "x" - } - ], - "outputs": [ - { - "index": 0, - "dtype": [ - "float16", "float32", "float16", "float32" - ], - "format": [ - "DefaultFormat", "DefaultFormat", "NC1HWC0", "NC1HWC0" - ], - "name": "output" - } - ] -}""") -def _zeros_like_akg(): - """ZerosLike AutoDiff register""" - return