From f6efef93529a3231306e52bc510c0b7467c9e446 Mon Sep 17 00:00:00 2001 From: zhengzuohe Date: Thu, 1 Sep 2022 15:02:32 +0800 Subject: [PATCH] remove a few case in akg-gpu --- .../ops/_op_impl/akg/gpu/__init__.py | 9 ----- .../mindspore/ops/_op_impl/akg/gpu/equal.py | 38 ------------------- .../ops/_op_impl/akg/gpu/greater_equal.py | 37 ------------------ .../ops/_op_impl/akg/gpu/lessequal.py | 37 ------------------ .../ops/_op_impl/akg/gpu/logical_and.py | 30 --------------- .../ops/_op_impl/akg/gpu/logical_not.py | 29 -------------- .../ops/_op_impl/akg/gpu/logical_or.py | 30 --------------- .../mindspore/ops/_op_impl/akg/gpu/mean.py | 30 --------------- .../ops/_op_impl/akg/gpu/mean_grad.py | 31 --------------- .../ops/_op_impl/akg/gpu/notequal.py | 36 ------------------ 10 files changed, 307 deletions(-) delete mode 100644 mindspore/python/mindspore/ops/_op_impl/akg/gpu/equal.py delete mode 100644 mindspore/python/mindspore/ops/_op_impl/akg/gpu/greater_equal.py delete mode 100644 mindspore/python/mindspore/ops/_op_impl/akg/gpu/lessequal.py delete mode 100644 mindspore/python/mindspore/ops/_op_impl/akg/gpu/logical_and.py delete mode 100644 mindspore/python/mindspore/ops/_op_impl/akg/gpu/logical_not.py delete mode 100644 mindspore/python/mindspore/ops/_op_impl/akg/gpu/logical_or.py delete mode 100644 mindspore/python/mindspore/ops/_op_impl/akg/gpu/mean.py delete mode 100644 mindspore/python/mindspore/ops/_op_impl/akg/gpu/mean_grad.py delete mode 100644 mindspore/python/mindspore/ops/_op_impl/akg/gpu/notequal.py diff --git a/mindspore/python/mindspore/ops/_op_impl/akg/gpu/__init__.py b/mindspore/python/mindspore/ops/_op_impl/akg/gpu/__init__.py index f68160fc768..dbab2d873a0 100644 --- a/mindspore/python/mindspore/ops/_op_impl/akg/gpu/__init__.py +++ b/mindspore/python/mindspore/ops/_op_impl/akg/gpu/__init__.py @@ -21,13 +21,4 @@ from .csr_mul import _csr_mul_akg from .csr_mv import _csr_mv_akg from .csr_mm import _csr_mm_akg from .csr_reduce_sum import _csr_reduce_sum_akg -from .equal import _equal_akg -from .greater_equal import _greater_equal_akg -from .lessequal import _lessequal_akg -from .logical_and import _logical_and_akg -from .logical_not import _logical_not_akg -from .logical_or import _logical_or_akg -from .mean import _simple_mean_akg -from .mean_grad import _simple_mean_grad_akg -from .notequal import _notequal_akg # Please insert op register in lexicographical order of the filename. diff --git a/mindspore/python/mindspore/ops/_op_impl/akg/gpu/equal.py b/mindspore/python/mindspore/ops/_op_impl/akg/gpu/equal.py deleted file mode 100644 index 1f4c03a9998..00000000000 --- a/mindspore/python/mindspore/ops/_op_impl/akg/gpu/equal.py +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2019 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, AkgGpuRegOp, DataType - -equal_op_info = AkgGpuRegOp("Equal") \ - .fusion_type("OPAQUE") \ - .input(0, "x") \ - .input(1, "y") \ - .output(0, "output") \ - .dtype_format(DataType.F16_Default, DataType.F16_Default, DataType.BOOL_Default) \ - .dtype_format(DataType.F64_Default, DataType.F64_Default, DataType.BOOL_Default) \ - .dtype_format(DataType.F32_Default, DataType.F32_Default, DataType.BOOL_Default) \ - .dtype_format(DataType.I64_Default, DataType.I64_Default, DataType.BOOL_Default) \ - .dtype_format(DataType.I32_Default, DataType.I32_Default, DataType.BOOL_Default) \ - .dtype_format(DataType.I16_Default, DataType.I16_Default, DataType.BOOL_Default) \ - .dtype_format(DataType.U8_Default, DataType.U8_Default, DataType.BOOL_Default) \ - .dtype_format(DataType.I8_Default, DataType.I8_Default, DataType.BOOL_Default) \ - .dtype_format(DataType.BOOL_Default, DataType.BOOL_Default, DataType.BOOL_Default) \ - .get_op_info() - - -@op_info_register(equal_op_info) -def _equal_akg(): - """Equal AutoDiff register""" - return diff --git a/mindspore/python/mindspore/ops/_op_impl/akg/gpu/greater_equal.py b/mindspore/python/mindspore/ops/_op_impl/akg/gpu/greater_equal.py deleted file mode 100644 index 7c1443b0570..00000000000 --- a/mindspore/python/mindspore/ops/_op_impl/akg/gpu/greater_equal.py +++ /dev/null @@ -1,37 +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, AkgGpuRegOp, DataType - -greater_equal_op_info = AkgGpuRegOp("GreaterEqual") \ - .fusion_type("OPAQUE") \ - .input(0, "x") \ - .input(1, "y") \ - .output(0, "output") \ - .dtype_format(DataType.F16_Default, DataType.F16_Default, DataType.BOOL_Default) \ - .dtype_format(DataType.F32_Default, DataType.F32_Default, DataType.BOOL_Default) \ - .dtype_format(DataType.F64_Default, DataType.F64_Default, DataType.BOOL_Default) \ - .dtype_format(DataType.I64_Default, DataType.I64_Default, DataType.BOOL_Default) \ - .dtype_format(DataType.I32_Default, DataType.I32_Default, DataType.BOOL_Default) \ - .dtype_format(DataType.I16_Default, DataType.I16_Default, DataType.BOOL_Default) \ - .dtype_format(DataType.U8_Default, DataType.U8_Default, DataType.BOOL_Default) \ - .dtype_format(DataType.I8_Default, DataType.I8_Default, DataType.BOOL_Default) \ - .get_op_info() - - -@op_info_register(greater_equal_op_info) -def _greater_equal_akg(): - """GreaterEqual register""" - return diff --git a/mindspore/python/mindspore/ops/_op_impl/akg/gpu/lessequal.py b/mindspore/python/mindspore/ops/_op_impl/akg/gpu/lessequal.py deleted file mode 100644 index e176f99b501..00000000000 --- a/mindspore/python/mindspore/ops/_op_impl/akg/gpu/lessequal.py +++ /dev/null @@ -1,37 +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, AkgGpuRegOp, DataType - -lessequal_op_info = AkgGpuRegOp("LessEqual") \ - .fusion_type("OPAQUE") \ - .input(0, "x") \ - .input(1, "y") \ - .output(0, "output") \ - .dtype_format(DataType.F16_Default, DataType.F16_Default, DataType.BOOL_Default) \ - .dtype_format(DataType.F32_Default, DataType.F32_Default, DataType.BOOL_Default) \ - .dtype_format(DataType.F64_Default, DataType.F64_Default, DataType.BOOL_Default) \ - .dtype_format(DataType.I64_Default, DataType.I64_Default, DataType.BOOL_Default) \ - .dtype_format(DataType.I32_Default, DataType.I32_Default, DataType.BOOL_Default) \ - .dtype_format(DataType.I16_Default, DataType.I16_Default, DataType.BOOL_Default) \ - .dtype_format(DataType.U8_Default, DataType.U8_Default, DataType.BOOL_Default) \ - .dtype_format(DataType.I8_Default, DataType.I8_Default, DataType.BOOL_Default) \ - .get_op_info() - - -@op_info_register(lessequal_op_info) -def _lessequal_akg(): - """LessEqual register""" - return diff --git a/mindspore/python/mindspore/ops/_op_impl/akg/gpu/logical_and.py b/mindspore/python/mindspore/ops/_op_impl/akg/gpu/logical_and.py deleted file mode 100644 index 58abcd8064b..00000000000 --- a/mindspore/python/mindspore/ops/_op_impl/akg/gpu/logical_and.py +++ /dev/null @@ -1,30 +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. - -"""LogicalAnd op""" -from mindspore.ops.op_info_register import op_info_register, AkgGpuRegOp, DataType - -logicaland_op_info = AkgGpuRegOp("LogicalAnd") \ - .fusion_type("OPAQUE") \ - .input(0, "x") \ - .input(1, "y") \ - .output(0, "output") \ - .dtype_format(DataType.BOOL_Default, DataType.BOOL_Default, DataType.BOOL_Default) \ - .get_op_info() - - -@op_info_register(logicaland_op_info) -def _logical_and_akg(): - """LogicalAnd register""" - return diff --git a/mindspore/python/mindspore/ops/_op_impl/akg/gpu/logical_not.py b/mindspore/python/mindspore/ops/_op_impl/akg/gpu/logical_not.py deleted file mode 100644 index 33815f489a9..00000000000 --- a/mindspore/python/mindspore/ops/_op_impl/akg/gpu/logical_not.py +++ /dev/null @@ -1,29 +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. - -"""LogicalNot op""" -from mindspore.ops.op_info_register import op_info_register, AkgGpuRegOp, DataType - -logical_not_op_info = AkgGpuRegOp("LogicalNot") \ - .fusion_type("OPAQUE") \ - .input(0, "x") \ - .output(0, "output") \ - .dtype_format(DataType.BOOL_Default, DataType.BOOL_Default) \ - .get_op_info() - - -@op_info_register(logical_not_op_info) -def _logical_not_akg(): - """LogicalNot AutoDiff register""" - return diff --git a/mindspore/python/mindspore/ops/_op_impl/akg/gpu/logical_or.py b/mindspore/python/mindspore/ops/_op_impl/akg/gpu/logical_or.py deleted file mode 100644 index 163674ac2a0..00000000000 --- a/mindspore/python/mindspore/ops/_op_impl/akg/gpu/logical_or.py +++ /dev/null @@ -1,30 +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. - -"""LogicalOr op""" -from mindspore.ops.op_info_register import op_info_register, AkgGpuRegOp, DataType - -logicalor_op_info = AkgGpuRegOp("LogicalOr") \ - .fusion_type("OPAQUE") \ - .input(0, "x") \ - .input(1, "y") \ - .output(0, "output") \ - .dtype_format(DataType.BOOL_Default, DataType.BOOL_Default, DataType.BOOL_Default) \ - .get_op_info() - - -@op_info_register(logicalor_op_info) -def _logical_or_akg(): - """LogicalOr register""" - return diff --git a/mindspore/python/mindspore/ops/_op_impl/akg/gpu/mean.py b/mindspore/python/mindspore/ops/_op_impl/akg/gpu/mean.py deleted file mode 100644 index dd997ec0f11..00000000000 --- a/mindspore/python/mindspore/ops/_op_impl/akg/gpu/mean.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 2019 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, AkgGpuRegOp, DataType - -mean_op_info = AkgGpuRegOp("SimpleMean") \ - .fusion_type("OPAQUE") \ - .input(0, "x") \ - .output(0, "output") \ - .dtype_format(DataType.F16_Default, DataType.F16_Default) \ - .dtype_format(DataType.F32_Default, DataType.F32_Default) \ - .get_op_info() - - -@op_info_register(mean_op_info) -def _simple_mean_akg(): - """SimpleMean AutoDiff register""" - return diff --git a/mindspore/python/mindspore/ops/_op_impl/akg/gpu/mean_grad.py b/mindspore/python/mindspore/ops/_op_impl/akg/gpu/mean_grad.py deleted file mode 100644 index ae4620305a8..00000000000 --- a/mindspore/python/mindspore/ops/_op_impl/akg/gpu/mean_grad.py +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 2019 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, AkgGpuRegOp, DataType - -mean_grad_op_info = AkgGpuRegOp("SimpleMeanGrad") \ - .fusion_type("OPAQUE") \ - .input(0, "HEAD") \ - .output(0, "output") \ - .attr("input_shape", "required", "listInt") \ - .dtype_format(DataType.F16_Default, DataType.F16_Default) \ - .dtype_format(DataType.F32_Default, DataType.F32_Default) \ - .get_op_info() - - -@op_info_register(mean_grad_op_info) -def _simple_mean_grad_akg(): - """SimpleMeanGrad AutoDiff register""" - return diff --git a/mindspore/python/mindspore/ops/_op_impl/akg/gpu/notequal.py b/mindspore/python/mindspore/ops/_op_impl/akg/gpu/notequal.py deleted file mode 100644 index 59ed6413961..00000000000 --- a/mindspore/python/mindspore/ops/_op_impl/akg/gpu/notequal.py +++ /dev/null @@ -1,36 +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. - -"""NotEqual op""" -from mindspore.ops.op_info_register import op_info_register, AkgGpuRegOp, DataType - -notequal_op_info = AkgGpuRegOp("NotEqual") \ - .fusion_type("OPAQUE") \ - .input(0, "x") \ - .input(1, "y") \ - .output(0, "output") \ - .dtype_format(DataType.F16_Default, DataType.F16_Default, DataType.BOOL_Default) \ - .dtype_format(DataType.F32_Default, DataType.F32_Default, DataType.BOOL_Default) \ - .dtype_format(DataType.I64_Default, DataType.I64_Default, DataType.BOOL_Default) \ - .dtype_format(DataType.I32_Default, DataType.I32_Default, DataType.BOOL_Default) \ - .dtype_format(DataType.I16_Default, DataType.I16_Default, DataType.BOOL_Default) \ - .dtype_format(DataType.U8_Default, DataType.U8_Default, DataType.BOOL_Default) \ - .dtype_format(DataType.BOOL_Default, DataType.BOOL_Default, DataType.BOOL_Default) \ - .get_op_info() - - -@op_info_register(notequal_op_info) -def _notequal_akg(): - """NotEqual AutoDiff register""" - return