Browse Source

!3061 Remove useless op registers of akg

Merge pull request !3061 from DeshiChen/0711_akg_op_register_master
tags/v0.6.0-beta
mindspore-ci-bot Gitee 5 years ago
parent
commit
3bb04abc12
72 changed files with 0 additions and 5228 deletions
  1. +0
    -58
      mindspore/ops/_op_impl/akg/abs.py
  2. +0
    -72
      mindspore/ops/_op_impl/akg/add.py
  3. +0
    -58
      mindspore/ops/_op_impl/akg/add_n.py
  4. +0
    -103
      mindspore/ops/_op_impl/akg/apply_momentum.py
  5. +0
    -58
      mindspore/ops/_op_impl/akg/argmax.py
  6. +0
    -63
      mindspore/ops/_op_impl/akg/assign.py
  7. +0
    -64
      mindspore/ops/_op_impl/akg/assign_add.py
  8. +0
    -73
      mindspore/ops/_op_impl/akg/batchmatmul.py
  9. +0
    -68
      mindspore/ops/_op_impl/akg/bias_add.py
  10. +0
    -58
      mindspore/ops/_op_impl/akg/bias_add_grad.py
  11. +0
    -74
      mindspore/ops/_op_impl/akg/cast.py
  12. +0
    -64
      mindspore/ops/_op_impl/akg/clear_zero.py
  13. +0
    -88
      mindspore/ops/_op_impl/akg/conv2d.py
  14. +0
    -88
      mindspore/ops/_op_impl/akg/conv2d_backprop_filter.py
  15. +0
    -88
      mindspore/ops/_op_impl/akg/conv2d_backprop_input.py
  16. +0
    -108
      mindspore/ops/_op_impl/akg/conv_bn1.py
  17. +0
    -64
      mindspore/ops/_op_impl/akg/div.py
  18. +0
    -64
      mindspore/ops/_op_impl/akg/equal.py
  19. +0
    -64
      mindspore/ops/_op_impl/akg/equal_count.py
  20. +0
    -54
      mindspore/ops/_op_impl/akg/equiv_format.py
  21. +0
    -59
      mindspore/ops/_op_impl/akg/exp.py
  22. +0
    -58
      mindspore/ops/_op_impl/akg/expand_dims.py
  23. +0
    -68
      mindspore/ops/_op_impl/akg/five2four.py
  24. +0
    -64
      mindspore/ops/_op_impl/akg/floordiv.py
  25. +0
    -63
      mindspore/ops/_op_impl/akg/four2five.py
  26. +0
    -149
      mindspore/ops/_op_impl/akg/fused_batch_norm.py
  27. +0
    -119
      mindspore/ops/_op_impl/akg/fused_batch_norm_grad.py
  28. +0
    -109
      mindspore/ops/_op_impl/akg/fused_batch_norm_infer.py
  29. +0
    -64
      mindspore/ops/_op_impl/akg/fused_bn1.py
  30. +0
    -93
      mindspore/ops/_op_impl/akg/fused_bn1_grad.py
  31. +0
    -108
      mindspore/ops/_op_impl/akg/fused_bn2.py
  32. +0
    -132
      mindspore/ops/_op_impl/akg/fused_bn2_grad.py
  33. +0
    -95
      mindspore/ops/_op_impl/akg/fused_bn3.py
  34. +0
    -93
      mindspore/ops/_op_impl/akg/fused_bn3_grad.py
  35. +0
    -68
      mindspore/ops/_op_impl/akg/gather_v2.py
  36. +0
    -64
      mindspore/ops/_op_impl/akg/greater.py
  37. +0
    -64
      mindspore/ops/_op_impl/akg/greater_equal.py
  38. +0
    -78
      mindspore/ops/_op_impl/akg/inplace_assign.py
  39. +0
    -64
      mindspore/ops/_op_impl/akg/less.py
  40. +0
    -64
      mindspore/ops/_op_impl/akg/less_equal.py
  41. +0
    -55
      mindspore/ops/_op_impl/akg/log.py
  42. +0
    -73
      mindspore/ops/_op_impl/akg/matmul.py
  43. +0
    -63
      mindspore/ops/_op_impl/akg/max.py
  44. +0
    -93
      mindspore/ops/_op_impl/akg/max_pool_grad_with_argmax.py
  45. +0
    -83
      mindspore/ops/_op_impl/akg/max_pool_with_argmax.py
  46. +0
    -64
      mindspore/ops/_op_impl/akg/maximum.py
  47. +0
    -54
      mindspore/ops/_op_impl/akg/mean.py
  48. +0
    -58
      mindspore/ops/_op_impl/akg/mean_grad.py
  49. +0
    -70
      mindspore/ops/_op_impl/akg/minimum.py
  50. +0
    -86
      mindspore/ops/_op_impl/akg/mul.py
  51. +0
    -59
      mindspore/ops/_op_impl/akg/neg.py
  52. +0
    -83
      mindspore/ops/_op_impl/akg/one_hot.py
  53. +0
    -65
      mindspore/ops/_op_impl/akg/pow.py
  54. +0
    -72
      mindspore/ops/_op_impl/akg/real_div.py
  55. +0
    -54
      mindspore/ops/_op_impl/akg/reciprocal.py
  56. +0
    -63
      mindspore/ops/_op_impl/akg/reduce_max.py
  57. +0
    -63
      mindspore/ops/_op_impl/akg/reduce_mean.py
  58. +0
    -73
      mindspore/ops/_op_impl/akg/reduce_sum.py
  59. +0
    -54
      mindspore/ops/_op_impl/akg/relu.py
  60. +0
    -64
      mindspore/ops/_op_impl/akg/relu_grad.py
  61. +0
    -58
      mindspore/ops/_op_impl/akg/reshape.py
  62. +0
    -54
      mindspore/ops/_op_impl/akg/round.py
  63. +0
    -54
      mindspore/ops/_op_impl/akg/rsqrt.py
  64. +0
    -76
      mindspore/ops/_op_impl/akg/select.py
  65. +0
    -58
      mindspore/ops/_op_impl/akg/softmax.py
  66. +0
    -73
      mindspore/ops/_op_impl/akg/sparse_softmax_cross_entropy_with_logits.py
  67. +0
    -54
      mindspore/ops/_op_impl/akg/sqrt.py
  68. +0
    -93
      mindspore/ops/_op_impl/akg/strided_slice.py
  69. +0
    -72
      mindspore/ops/_op_impl/akg/sub.py
  70. +0
    -68
      mindspore/ops/_op_impl/akg/sum.py
  71. +0
    -58
      mindspore/ops/_op_impl/akg/tile.py
  72. +0
    -54
      mindspore/ops/_op_impl/akg/zeros_like.py

+ 0
- 58
mindspore/ops/_op_impl/akg/abs.py View File

@@ -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

+ 0
- 72
mindspore/ops/_op_impl/akg/add.py View File

@@ -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

+ 0
- 58
mindspore/ops/_op_impl/akg/add_n.py View File

@@ -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

+ 0
- 103
mindspore/ops/_op_impl/akg/apply_momentum.py View File

@@ -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

+ 0
- 58
mindspore/ops/_op_impl/akg/argmax.py View File

@@ -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

+ 0
- 63
mindspore/ops/_op_impl/akg/assign.py View File

@@ -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

+ 0
- 64
mindspore/ops/_op_impl/akg/assign_add.py View File

@@ -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

+ 0
- 73
mindspore/ops/_op_impl/akg/batchmatmul.py View File

@@ -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

+ 0
- 68
mindspore/ops/_op_impl/akg/bias_add.py View File

@@ -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

+ 0
- 58
mindspore/ops/_op_impl/akg/bias_add_grad.py View File

@@ -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

+ 0
- 74
mindspore/ops/_op_impl/akg/cast.py View File

@@ -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

+ 0
- 64
mindspore/ops/_op_impl/akg/clear_zero.py View File

@@ -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

+ 0
- 88
mindspore/ops/_op_impl/akg/conv2d.py View File

@@ -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

+ 0
- 88
mindspore/ops/_op_impl/akg/conv2d_backprop_filter.py View File

@@ -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

+ 0
- 88
mindspore/ops/_op_impl/akg/conv2d_backprop_input.py View File

@@ -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

+ 0
- 108
mindspore/ops/_op_impl/akg/conv_bn1.py View File

@@ -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

+ 0
- 64
mindspore/ops/_op_impl/akg/div.py View File

@@ -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

+ 0
- 64
mindspore/ops/_op_impl/akg/equal.py View File

@@ -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

+ 0
- 64
mindspore/ops/_op_impl/akg/equal_count.py View File

@@ -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

+ 0
- 54
mindspore/ops/_op_impl/akg/equiv_format.py View File

@@ -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

+ 0
- 59
mindspore/ops/_op_impl/akg/exp.py View File

@@ -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

+ 0
- 58
mindspore/ops/_op_impl/akg/expand_dims.py View File

@@ -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

+ 0
- 68
mindspore/ops/_op_impl/akg/five2four.py View File

@@ -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

+ 0
- 64
mindspore/ops/_op_impl/akg/floordiv.py View File

@@ -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

+ 0
- 63
mindspore/ops/_op_impl/akg/four2five.py View File

@@ -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

+ 0
- 149
mindspore/ops/_op_impl/akg/fused_batch_norm.py View File

@@ -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

+ 0
- 119
mindspore/ops/_op_impl/akg/fused_batch_norm_grad.py View File

@@ -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

+ 0
- 109
mindspore/ops/_op_impl/akg/fused_batch_norm_infer.py View File

@@ -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

+ 0
- 64
mindspore/ops/_op_impl/akg/fused_bn1.py View File

@@ -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

+ 0
- 93
mindspore/ops/_op_impl/akg/fused_bn1_grad.py View File

@@ -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

+ 0
- 108
mindspore/ops/_op_impl/akg/fused_bn2.py View File

@@ -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

+ 0
- 132
mindspore/ops/_op_impl/akg/fused_bn2_grad.py View File

@@ -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

+ 0
- 95
mindspore/ops/_op_impl/akg/fused_bn3.py View File

@@ -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

+ 0
- 93
mindspore/ops/_op_impl/akg/fused_bn3_grad.py View File

@@ -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

+ 0
- 68
mindspore/ops/_op_impl/akg/gather_v2.py View File

@@ -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

+ 0
- 64
mindspore/ops/_op_impl/akg/greater.py View File

@@ -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

+ 0
- 64
mindspore/ops/_op_impl/akg/greater_equal.py View File

@@ -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

+ 0
- 78
mindspore/ops/_op_impl/akg/inplace_assign.py View File

@@ -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

+ 0
- 64
mindspore/ops/_op_impl/akg/less.py View File

@@ -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

+ 0
- 64
mindspore/ops/_op_impl/akg/less_equal.py View File

@@ -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

+ 0
- 55
mindspore/ops/_op_impl/akg/log.py View File

@@ -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

+ 0
- 73
mindspore/ops/_op_impl/akg/matmul.py View File

@@ -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

+ 0
- 63
mindspore/ops/_op_impl/akg/max.py View File

@@ -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

+ 0
- 93
mindspore/ops/_op_impl/akg/max_pool_grad_with_argmax.py View File

@@ -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

+ 0
- 83
mindspore/ops/_op_impl/akg/max_pool_with_argmax.py View File

@@ -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

+ 0
- 64
mindspore/ops/_op_impl/akg/maximum.py View File

@@ -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

+ 0
- 54
mindspore/ops/_op_impl/akg/mean.py View File

@@ -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

+ 0
- 58
mindspore/ops/_op_impl/akg/mean_grad.py View File

@@ -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

+ 0
- 70
mindspore/ops/_op_impl/akg/minimum.py View File

@@ -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

+ 0
- 86
mindspore/ops/_op_impl/akg/mul.py View File

@@ -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

+ 0
- 59
mindspore/ops/_op_impl/akg/neg.py View File

@@ -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

+ 0
- 83
mindspore/ops/_op_impl/akg/one_hot.py View File

@@ -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

+ 0
- 65
mindspore/ops/_op_impl/akg/pow.py View File

@@ -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

+ 0
- 72
mindspore/ops/_op_impl/akg/real_div.py View File

@@ -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

+ 0
- 54
mindspore/ops/_op_impl/akg/reciprocal.py View File

@@ -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

+ 0
- 63
mindspore/ops/_op_impl/akg/reduce_max.py View File

@@ -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

+ 0
- 63
mindspore/ops/_op_impl/akg/reduce_mean.py View File

@@ -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

+ 0
- 73
mindspore/ops/_op_impl/akg/reduce_sum.py View File

@@ -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

+ 0
- 54
mindspore/ops/_op_impl/akg/relu.py View File

@@ -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

+ 0
- 64
mindspore/ops/_op_impl/akg/relu_grad.py View File

@@ -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

+ 0
- 58
mindspore/ops/_op_impl/akg/reshape.py View File

@@ -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

+ 0
- 54
mindspore/ops/_op_impl/akg/round.py View File

@@ -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

+ 0
- 54
mindspore/ops/_op_impl/akg/rsqrt.py View File

@@ -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

+ 0
- 76
mindspore/ops/_op_impl/akg/select.py View File

@@ -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

+ 0
- 58
mindspore/ops/_op_impl/akg/softmax.py View File

@@ -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

+ 0
- 73
mindspore/ops/_op_impl/akg/sparse_softmax_cross_entropy_with_logits.py View File

@@ -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

+ 0
- 54
mindspore/ops/_op_impl/akg/sqrt.py View File

@@ -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

+ 0
- 93
mindspore/ops/_op_impl/akg/strided_slice.py View File

@@ -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

+ 0
- 72
mindspore/ops/_op_impl/akg/sub.py View File

@@ -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

+ 0
- 68
mindspore/ops/_op_impl/akg/sum.py View File

@@ -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

+ 0
- 58
mindspore/ops/_op_impl/akg/tile.py View File

@@ -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

+ 0
- 54
mindspore/ops/_op_impl/akg/zeros_like.py View File

@@ -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

Loading…
Cancel
Save