From fa83fc3e0273dd42e093262ace443caa09f1488d Mon Sep 17 00:00:00 2001 From: dengwentao Date: Wed, 13 May 2020 15:59:58 +0800 Subject: [PATCH] rename kernel/mng to kernel/rts --- .../device/ascend/kernel_build_ascend.cc | 2 +- mindspore/ccsrc/kernel/CMakeLists.txt | 2 +- mindspore/ccsrc/kernel/kernel_query.cc | 2 +- mindspore/ccsrc/kernel/{mng => rts}/assign.cc | 2 +- mindspore/ccsrc/kernel/{mng => rts}/assign.h | 10 +- .../ccsrc/kernel/{mng => rts}/label_goto.cc | 2 +- .../ccsrc/kernel/{mng => rts}/label_goto.h | 10 +- .../ccsrc/kernel/{mng => rts}/label_set.cc | 2 +- .../ccsrc/kernel/{mng => rts}/label_set.h | 10 +- .../ccsrc/kernel/{mng => rts}/label_switch.cc | 2 +- .../ccsrc/kernel/{mng => rts}/label_switch.h | 10 +- .../ccsrc/kernel/{mng => rts}/memcpy_async.cc | 2 +- .../ccsrc/kernel/{mng => rts}/memcpy_async.h | 10 +- .../{mng => rts}/profiling_kernel_mod.cc | 2 +- .../{mng => rts}/profiling_kernel_mod.h | 8 +- mindspore/ccsrc/kernel/{mng => rts}/recv.cc | 2 +- mindspore/ccsrc/kernel/{mng => rts}/recv.h | 10 +- .../ccsrc/kernel/{mng => rts}/rt_kernel.cc | 2 +- .../ccsrc/kernel/{mng => rts}/rt_kernel.h | 6 +- .../kernel/{mng => rts}/rt_kernel_build.cc | 4 +- .../kernel/{mng => rts}/rt_kernel_build.h | 6 +- .../kernel/{mng => rts}/rt_kernel_info.cc | 2 +- .../kernel/{mng => rts}/rt_kernel_info.h | 150 +++++++++--------- mindspore/ccsrc/kernel/{mng => rts}/send.cc | 2 +- mindspore/ccsrc/kernel/{mng => rts}/send.h | 10 +- .../kernel/{mng => rts}/stream_active.cc | 2 +- .../ccsrc/kernel/{mng => rts}/stream_active.h | 10 +- .../kernel/{mng => rts}/stream_switch.cc | 2 +- .../ccsrc/kernel/{mng => rts}/stream_switch.h | 10 +- tests/ut/cpp/CMakeLists.txt | 4 +- 30 files changed, 149 insertions(+), 149 deletions(-) rename mindspore/ccsrc/kernel/{mng => rts}/assign.cc (98%) rename mindspore/ccsrc/kernel/{mng => rts}/assign.h (85%) rename mindspore/ccsrc/kernel/{mng => rts}/label_goto.cc (98%) rename mindspore/ccsrc/kernel/{mng => rts}/label_goto.h (86%) rename mindspore/ccsrc/kernel/{mng => rts}/label_set.cc (98%) rename mindspore/ccsrc/kernel/{mng => rts}/label_set.h (86%) rename mindspore/ccsrc/kernel/{mng => rts}/label_switch.cc (98%) rename mindspore/ccsrc/kernel/{mng => rts}/label_switch.h (86%) rename mindspore/ccsrc/kernel/{mng => rts}/memcpy_async.cc (99%) rename mindspore/ccsrc/kernel/{mng => rts}/memcpy_async.h (88%) rename mindspore/ccsrc/kernel/{mng => rts}/profiling_kernel_mod.cc (98%) rename mindspore/ccsrc/kernel/{mng => rts}/profiling_kernel_mod.h (84%) rename mindspore/ccsrc/kernel/{mng => rts}/recv.cc (98%) rename mindspore/ccsrc/kernel/{mng => rts}/recv.h (87%) rename mindspore/ccsrc/kernel/{mng => rts}/rt_kernel.cc (97%) rename mindspore/ccsrc/kernel/{mng => rts}/rt_kernel.h (94%) rename mindspore/ccsrc/kernel/{mng => rts}/rt_kernel_build.cc (94%) rename mindspore/ccsrc/kernel/{mng => rts}/rt_kernel_build.h (83%) rename mindspore/ccsrc/kernel/{mng => rts}/rt_kernel_info.cc (98%) rename mindspore/ccsrc/kernel/{mng => rts}/rt_kernel_info.h (90%) rename mindspore/ccsrc/kernel/{mng => rts}/send.cc (98%) rename mindspore/ccsrc/kernel/{mng => rts}/send.h (86%) rename mindspore/ccsrc/kernel/{mng => rts}/stream_active.cc (98%) rename mindspore/ccsrc/kernel/{mng => rts}/stream_active.h (86%) rename mindspore/ccsrc/kernel/{mng => rts}/stream_switch.cc (98%) rename mindspore/ccsrc/kernel/{mng => rts}/stream_switch.h (86%) diff --git a/mindspore/ccsrc/device/ascend/kernel_build_ascend.cc b/mindspore/ccsrc/device/ascend/kernel_build_ascend.cc index e7c1449360e..afce5f3607d 100644 --- a/mindspore/ccsrc/device/ascend/kernel_build_ascend.cc +++ b/mindspore/ccsrc/device/ascend/kernel_build_ascend.cc @@ -28,7 +28,7 @@ #include "kernel/tbe/tbe_kernel_parallel_build.h" #include "kernel/aicpu/aicpu_kernel_build.h" #include "kernel/hccl/hccl_kernel_build.h" -#include "kernel/mng/rt_kernel_build.h" +#include "kernel/rts/rt_kernel_build.h" #include "kernel/tbe/tbe_utils.h" #include "operator/ops.h" #include "session/anf_runtime_algorithm.h" diff --git a/mindspore/ccsrc/kernel/CMakeLists.txt b/mindspore/ccsrc/kernel/CMakeLists.txt index 1d49f13fd93..fa70f5c2305 100644 --- a/mindspore/ccsrc/kernel/CMakeLists.txt +++ b/mindspore/ccsrc/kernel/CMakeLists.txt @@ -11,7 +11,7 @@ if (ENABLE_D) "kernel_fusion.cc" "tbe/*.cc" "aicpu/*.cc" - "mng/*.cc" + "rts/*.cc" "hccl/*.cc" ) add_compile_definitions(ENABLE_D) diff --git a/mindspore/ccsrc/kernel/kernel_query.cc b/mindspore/ccsrc/kernel/kernel_query.cc index a2a5958a3f8..b8437324dd9 100755 --- a/mindspore/ccsrc/kernel/kernel_query.cc +++ b/mindspore/ccsrc/kernel/kernel_query.cc @@ -18,7 +18,7 @@ #include #include #include "kernel/aicpu/aicpu_kernel_metadata.h" -#include "kernel/mng/rt_kernel_info.h" +#include "kernel/rts/rt_kernel_info.h" #include "kernel/hccl/hccl_kernel_metadata.h" #include "kernel/tbe/tbe_kernel_select.h" #include "session/anf_runtime_algorithm.h" diff --git a/mindspore/ccsrc/kernel/mng/assign.cc b/mindspore/ccsrc/kernel/rts/assign.cc similarity index 98% rename from mindspore/ccsrc/kernel/mng/assign.cc rename to mindspore/ccsrc/kernel/rts/assign.cc index fca93b881e6..b7212c06f67 100644 --- a/mindspore/ccsrc/kernel/mng/assign.cc +++ b/mindspore/ccsrc/kernel/rts/assign.cc @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "kernel/mng/assign.h" +#include "kernel/rts/assign.h" #include diff --git a/mindspore/ccsrc/kernel/mng/assign.h b/mindspore/ccsrc/kernel/rts/assign.h similarity index 85% rename from mindspore/ccsrc/kernel/mng/assign.h rename to mindspore/ccsrc/kernel/rts/assign.h index a3446deecf6..c4c6014e8a2 100644 --- a/mindspore/ccsrc/kernel/mng/assign.h +++ b/mindspore/ccsrc/kernel/rts/assign.h @@ -14,12 +14,12 @@ * limitations under the License. */ -#ifndef MINDSPORE_CCSRC_KERNEL_MNG_ASSIGN_H -#define MINDSPORE_CCSRC_KERNEL_MNG_ASSIGN_H +#ifndef MINDSPORE_CCSRC_KERNEL_RTS_ASSIGN_H +#define MINDSPORE_CCSRC_KERNEL_RTS_ASSIGN_H #include -#include "kernel/mng/rt_kernel.h" -#include "kernel/mng/rt_kernel_info.h" +#include "kernel/rts/rt_kernel.h" +#include "kernel/rts/rt_kernel_info.h" namespace mindspore { namespace kernel { @@ -38,4 +38,4 @@ MS_REG_RTKERNEL(assign, AssignKernel); } // namespace kernel } // namespace mindspore -#endif // MINDSPORE_CCSRC_KERNEL_MNG_ASSIGN_H +#endif // MINDSPORE_CCSRC_KERNEL_RTS_ASSIGN_H diff --git a/mindspore/ccsrc/kernel/mng/label_goto.cc b/mindspore/ccsrc/kernel/rts/label_goto.cc similarity index 98% rename from mindspore/ccsrc/kernel/mng/label_goto.cc rename to mindspore/ccsrc/kernel/rts/label_goto.cc index 674e48fb00e..922e2fe7ce2 100644 --- a/mindspore/ccsrc/kernel/mng/label_goto.cc +++ b/mindspore/ccsrc/kernel/rts/label_goto.cc @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "kernel/mng/label_goto.h" +#include "kernel/rts/label_goto.h" #include #include #include "runtime/stream.h" diff --git a/mindspore/ccsrc/kernel/mng/label_goto.h b/mindspore/ccsrc/kernel/rts/label_goto.h similarity index 86% rename from mindspore/ccsrc/kernel/mng/label_goto.h rename to mindspore/ccsrc/kernel/rts/label_goto.h index 093c95f2f50..f4356391e67 100644 --- a/mindspore/ccsrc/kernel/mng/label_goto.h +++ b/mindspore/ccsrc/kernel/rts/label_goto.h @@ -14,13 +14,13 @@ * limitations under the License. */ -#ifndef MINDSPORE_CCSRC_KERNEL_MNG_LABEL_GOTO_H -#define MINDSPORE_CCSRC_KERNEL_MNG_LABEL_GOTO_H +#ifndef MINDSPORE_CCSRC_KERNEL_RTS_LABEL_GOTO_H +#define MINDSPORE_CCSRC_KERNEL_RTS_LABEL_GOTO_H #include #include -#include "kernel/mng/rt_kernel.h" -#include "kernel/mng/rt_kernel_info.h" +#include "kernel/rts/rt_kernel.h" +#include "kernel/rts/rt_kernel_info.h" namespace mindspore { namespace kernel { @@ -44,4 +44,4 @@ MS_REG_RTKERNEL(labelgoto, LabelGotoKernel); } // namespace kernel } // namespace mindspore -#endif // MINDSPORE_CCSRC_KERNEL_MNG_LABEL_GOTO_H +#endif // MINDSPORE_CCSRC_KERNEL_RTS_LABEL_GOTO_H diff --git a/mindspore/ccsrc/kernel/mng/label_set.cc b/mindspore/ccsrc/kernel/rts/label_set.cc similarity index 98% rename from mindspore/ccsrc/kernel/mng/label_set.cc rename to mindspore/ccsrc/kernel/rts/label_set.cc index 9041867e5f5..19aff82a911 100644 --- a/mindspore/ccsrc/kernel/mng/label_set.cc +++ b/mindspore/ccsrc/kernel/rts/label_set.cc @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "kernel/mng/label_set.h" +#include "kernel/rts/label_set.h" #include #include #include "runtime/stream.h" diff --git a/mindspore/ccsrc/kernel/mng/label_set.h b/mindspore/ccsrc/kernel/rts/label_set.h similarity index 86% rename from mindspore/ccsrc/kernel/mng/label_set.h rename to mindspore/ccsrc/kernel/rts/label_set.h index 1ee51e4a4e9..12f0d5b8069 100644 --- a/mindspore/ccsrc/kernel/mng/label_set.h +++ b/mindspore/ccsrc/kernel/rts/label_set.h @@ -14,13 +14,13 @@ * limitations under the License. */ -#ifndef MINDSPORE_CCSRC_KERNEL_MNG_LABEL_SET_H -#define MINDSPORE_CCSRC_KERNEL_MNG_LABEL_SET_H +#ifndef MINDSPORE_CCSRC_KERNEL_RTS_LABEL_SET_H +#define MINDSPORE_CCSRC_KERNEL_RTS_LABEL_SET_H #include #include -#include "kernel/mng/rt_kernel.h" -#include "kernel/mng/rt_kernel_info.h" +#include "kernel/rts/rt_kernel.h" +#include "kernel/rts/rt_kernel_info.h" namespace mindspore { namespace kernel { @@ -44,4 +44,4 @@ MS_REG_RTKERNEL(labelset, LabelSetKernel); } // namespace kernel } // namespace mindspore -#endif // MINDSPORE_CCSRC_KERNEL_MNG_LABEL_SET_H +#endif // MINDSPORE_CCSRC_KERNEL_RTS_LABEL_SET_H diff --git a/mindspore/ccsrc/kernel/mng/label_switch.cc b/mindspore/ccsrc/kernel/rts/label_switch.cc similarity index 98% rename from mindspore/ccsrc/kernel/mng/label_switch.cc rename to mindspore/ccsrc/kernel/rts/label_switch.cc index ac8dafa933b..a914b95c4ac 100644 --- a/mindspore/ccsrc/kernel/mng/label_switch.cc +++ b/mindspore/ccsrc/kernel/rts/label_switch.cc @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "kernel/mng/label_switch.h" +#include "kernel/rts/label_switch.h" #include #include #include "runtime/stream.h" diff --git a/mindspore/ccsrc/kernel/mng/label_switch.h b/mindspore/ccsrc/kernel/rts/label_switch.h similarity index 86% rename from mindspore/ccsrc/kernel/mng/label_switch.h rename to mindspore/ccsrc/kernel/rts/label_switch.h index 57be7fc9477..372dc0cd7a6 100644 --- a/mindspore/ccsrc/kernel/mng/label_switch.h +++ b/mindspore/ccsrc/kernel/rts/label_switch.h @@ -14,13 +14,13 @@ * limitations under the License. */ -#ifndef MINDSPORE_CCSRC_KERNEL_MNG_LABEL_SWITCH_H -#define MINDSPORE_CCSRC_KERNEL_MNG_LABEL_SWITCH_H +#ifndef MINDSPORE_CCSRC_KERNEL_RTS_LABEL_SWITCH_H +#define MINDSPORE_CCSRC_KERNEL_RTS_LABEL_SWITCH_H #include #include -#include "kernel/mng/rt_kernel.h" -#include "kernel/mng/rt_kernel_info.h" +#include "kernel/rts/rt_kernel.h" +#include "kernel/rts/rt_kernel_info.h" namespace mindspore { namespace kernel { @@ -46,4 +46,4 @@ MS_REG_RTKERNEL(labelswitch, LabelSwitchKernel); } // namespace kernel } // namespace mindspore -#endif // MINDSPORE_CCSRC_KERNEL_MNG_LABEL_SWITCH_H +#endif // MINDSPORE_CCSRC_KERNEL_RTS_LABEL_SWITCH_H diff --git a/mindspore/ccsrc/kernel/mng/memcpy_async.cc b/mindspore/ccsrc/kernel/rts/memcpy_async.cc similarity index 99% rename from mindspore/ccsrc/kernel/mng/memcpy_async.cc rename to mindspore/ccsrc/kernel/rts/memcpy_async.cc index 559982b1b96..08b040cd151 100644 --- a/mindspore/ccsrc/kernel/mng/memcpy_async.cc +++ b/mindspore/ccsrc/kernel/rts/memcpy_async.cc @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "kernel/mng/memcpy_async.h" +#include "kernel/rts/memcpy_async.h" #include #include diff --git a/mindspore/ccsrc/kernel/mng/memcpy_async.h b/mindspore/ccsrc/kernel/rts/memcpy_async.h similarity index 88% rename from mindspore/ccsrc/kernel/mng/memcpy_async.h rename to mindspore/ccsrc/kernel/rts/memcpy_async.h index b4e15aea61d..b8e39374f86 100644 --- a/mindspore/ccsrc/kernel/mng/memcpy_async.h +++ b/mindspore/ccsrc/kernel/rts/memcpy_async.h @@ -14,13 +14,13 @@ * limitations under the License. */ -#ifndef MINDSPORE_CCSRC_KERNEL_MNG_MEMCPY_ASYNC_H -#define MINDSPORE_CCSRC_KERNEL_MNG_MEMCPY_ASYNC_H +#ifndef MINDSPORE_CCSRC_KERNEL_RTS_MEMCPY_ASYNC_H +#define MINDSPORE_CCSRC_KERNEL_RTS_MEMCPY_ASYNC_H #include #include -#include "kernel/mng/rt_kernel.h" -#include "kernel/mng/rt_kernel_info.h" +#include "kernel/rts/rt_kernel.h" +#include "kernel/rts/rt_kernel_info.h" namespace mindspore { namespace kernel { @@ -53,4 +53,4 @@ MS_REG_RTKERNEL(memcpy_async, MemCpyAsyncKernel); } // namespace kernel } // namespace mindspore -#endif // MINDSPORE_CCSRC_KERNEL_MNG_MEMCPY_ASYNC_H +#endif // MINDSPORE_CCSRC_KERNEL_RTS_MEMCPY_ASYNC_H diff --git a/mindspore/ccsrc/kernel/mng/profiling_kernel_mod.cc b/mindspore/ccsrc/kernel/rts/profiling_kernel_mod.cc similarity index 98% rename from mindspore/ccsrc/kernel/mng/profiling_kernel_mod.cc rename to mindspore/ccsrc/kernel/rts/profiling_kernel_mod.cc index 5c24c37d52e..002c2523746 100644 --- a/mindspore/ccsrc/kernel/mng/profiling_kernel_mod.cc +++ b/mindspore/ccsrc/kernel/rts/profiling_kernel_mod.cc @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "kernel/mng/profiling_kernel_mod.h" +#include "kernel/rts/profiling_kernel_mod.h" #include #include diff --git a/mindspore/ccsrc/kernel/mng/profiling_kernel_mod.h b/mindspore/ccsrc/kernel/rts/profiling_kernel_mod.h similarity index 84% rename from mindspore/ccsrc/kernel/mng/profiling_kernel_mod.h rename to mindspore/ccsrc/kernel/rts/profiling_kernel_mod.h index 7dc0ce05c62..b9b4a1c05cb 100644 --- a/mindspore/ccsrc/kernel/mng/profiling_kernel_mod.h +++ b/mindspore/ccsrc/kernel/rts/profiling_kernel_mod.h @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef MINDSPORE_MINDSPORE_CCSRC_KERNEL_PROFILING_PROFILING_KERNEL_MOD_H_ -#define MINDSPORE_MINDSPORE_CCSRC_KERNEL_PROFILING_PROFILING_KERNEL_MOD_H_ +#ifndef MINDSPORE_MINDSPORE_CCSRC_KERNEL_RTS_PROFILING_KERNEL_MOD_H_ +#define MINDSPORE_MINDSPORE_CCSRC_KERNEL_RTS_PROFILING_KERNEL_MOD_H_ #include -#include "kernel/mng/rt_kernel.h" +#include "kernel/rts/rt_kernel.h" namespace mindspore { namespace kernel { class ProfilingKernelMod : public RtKernel { @@ -37,4 +37,4 @@ class ProfilingKernelMod : public RtKernel { MS_REG_RTKERNEL(profiling, ProfilingKernelMod); } // namespace kernel } // namespace mindspore -#endif // MINDSPORE_MINDSPORE_CCSRC_KERNEL_PROFILING_PROFILING_KERNEL_MOD_H_ +#endif // MINDSPORE_MINDSPORE_CCSRC_KERNEL_RTS_PROFILING_KERNEL_MOD_H_ diff --git a/mindspore/ccsrc/kernel/mng/recv.cc b/mindspore/ccsrc/kernel/rts/recv.cc similarity index 98% rename from mindspore/ccsrc/kernel/mng/recv.cc rename to mindspore/ccsrc/kernel/rts/recv.cc index 34e4d28fcbc..af921083b5a 100644 --- a/mindspore/ccsrc/kernel/mng/recv.cc +++ b/mindspore/ccsrc/kernel/rts/recv.cc @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "kernel/mng/recv.h" +#include "kernel/rts/recv.h" #include #include "runtime/stream.h" #include "utils/context/ms_context.h" diff --git a/mindspore/ccsrc/kernel/mng/recv.h b/mindspore/ccsrc/kernel/rts/recv.h similarity index 87% rename from mindspore/ccsrc/kernel/mng/recv.h rename to mindspore/ccsrc/kernel/rts/recv.h index e1deaf49cb6..3a32fb98126 100644 --- a/mindspore/ccsrc/kernel/mng/recv.h +++ b/mindspore/ccsrc/kernel/rts/recv.h @@ -14,13 +14,13 @@ * limitations under the License. */ -#ifndef MINDSPORE_CCSRC_KERNEL_MNG_RECV_H -#define MINDSPORE_CCSRC_KERNEL_MNG_RECV_H +#ifndef MINDSPORE_CCSRC_KERNEL_RTS_RECV_H +#define MINDSPORE_CCSRC_KERNEL_RTS_RECV_H #include #include -#include "kernel/mng/rt_kernel.h" -#include "kernel/mng/rt_kernel_info.h" +#include "kernel/rts/rt_kernel.h" +#include "kernel/rts/rt_kernel_info.h" namespace mindspore { namespace kernel { @@ -43,4 +43,4 @@ MS_REG_RTKERNEL(recv, RecvKernel); } // namespace kernel } // namespace mindspore -#endif // MINDSPORE_CCSRC_KERNEL_MNG_RECV_H +#endif // MINDSPORE_CCSRC_KERNEL_RTS_RECV_H diff --git a/mindspore/ccsrc/kernel/mng/rt_kernel.cc b/mindspore/ccsrc/kernel/rts/rt_kernel.cc similarity index 97% rename from mindspore/ccsrc/kernel/mng/rt_kernel.cc rename to mindspore/ccsrc/kernel/rts/rt_kernel.cc index 447f21dc079..9e813723830 100644 --- a/mindspore/ccsrc/kernel/mng/rt_kernel.cc +++ b/mindspore/ccsrc/kernel/rts/rt_kernel.cc @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "kernel/mng/rt_kernel.h" +#include "kernel/rts/rt_kernel.h" namespace mindspore { namespace kernel { diff --git a/mindspore/ccsrc/kernel/mng/rt_kernel.h b/mindspore/ccsrc/kernel/rts/rt_kernel.h similarity index 94% rename from mindspore/ccsrc/kernel/mng/rt_kernel.h rename to mindspore/ccsrc/kernel/rts/rt_kernel.h index 54823f73cc8..44d55dca316 100644 --- a/mindspore/ccsrc/kernel/mng/rt_kernel.h +++ b/mindspore/ccsrc/kernel/rts/rt_kernel.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef MINDSPORE_CCSRC_KERNEL_MNG_RT_KERNEL_H -#define MINDSPORE_CCSRC_KERNEL_MNG_RT_KERNEL_H +#ifndef MINDSPORE_CCSRC_KERNEL_RTS_RT_KERNEL_H +#define MINDSPORE_CCSRC_KERNEL_RTS_RT_KERNEL_H #include #include @@ -74,4 +74,4 @@ class _RtKernelRegister { } // namespace kernel } // namespace mindspore -#endif // MINDSPORE_CCSRC_KERNEL_MNG_RT_KERNEL_H +#endif // MINDSPORE_CCSRC_KERNEL_RTS_RT_KERNEL_H diff --git a/mindspore/ccsrc/kernel/mng/rt_kernel_build.cc b/mindspore/ccsrc/kernel/rts/rt_kernel_build.cc similarity index 94% rename from mindspore/ccsrc/kernel/mng/rt_kernel_build.cc rename to mindspore/ccsrc/kernel/rts/rt_kernel_build.cc index b88200dfdd7..164605fe9b8 100644 --- a/mindspore/ccsrc/kernel/mng/rt_kernel_build.cc +++ b/mindspore/ccsrc/kernel/rts/rt_kernel_build.cc @@ -14,14 +14,14 @@ * limitations under the License. */ -#include "kernel/mng/rt_kernel_build.h" +#include "kernel/rts/rt_kernel_build.h" #include #include #include #include -#include "kernel/mng/rt_kernel.h" +#include "kernel/rts/rt_kernel.h" #include "session/anf_runtime_algorithm.h" namespace mindspore { diff --git a/mindspore/ccsrc/kernel/mng/rt_kernel_build.h b/mindspore/ccsrc/kernel/rts/rt_kernel_build.h similarity index 83% rename from mindspore/ccsrc/kernel/mng/rt_kernel_build.h rename to mindspore/ccsrc/kernel/rts/rt_kernel_build.h index 2e6ccdf94c0..cbd674b751a 100644 --- a/mindspore/ccsrc/kernel/mng/rt_kernel_build.h +++ b/mindspore/ccsrc/kernel/rts/rt_kernel_build.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef MINDSPORE_CCSRC_KERNEL_MNG_RT_KERNEL_BUILD_H -#define MINDSPORE_CCSRC_KERNEL_MNG_RT_KERNEL_BUILD_H +#ifndef MINDSPORE_CCSRC_KERNEL_RTS_RT_KERNEL_BUILD_H +#define MINDSPORE_CCSRC_KERNEL_RTS_RT_KERNEL_BUILD_H #include #include @@ -26,4 +26,4 @@ KernelModPtr RtOpBuild(const AnfNodePtr &anf_node); } // namespace kernel } // namespace mindspore -#endif // MINDSPORE_CCSRC_KERNEL_MNG_RT_KERNEL_BUILD_H +#endif // MINDSPORE_CCSRC_KERNEL_RTS_RT_KERNEL_BUILD_H diff --git a/mindspore/ccsrc/kernel/mng/rt_kernel_info.cc b/mindspore/ccsrc/kernel/rts/rt_kernel_info.cc similarity index 98% rename from mindspore/ccsrc/kernel/mng/rt_kernel_info.cc rename to mindspore/ccsrc/kernel/rts/rt_kernel_info.cc index cb230bc706f..c841ce4611f 100755 --- a/mindspore/ccsrc/kernel/mng/rt_kernel_info.cc +++ b/mindspore/ccsrc/kernel/rts/rt_kernel_info.cc @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "kernel/mng/rt_kernel_info.h" +#include "kernel/rts/rt_kernel_info.h" #include #include #include "utils/convert_utils.h" diff --git a/mindspore/ccsrc/kernel/mng/rt_kernel_info.h b/mindspore/ccsrc/kernel/rts/rt_kernel_info.h similarity index 90% rename from mindspore/ccsrc/kernel/mng/rt_kernel_info.h rename to mindspore/ccsrc/kernel/rts/rt_kernel_info.h index de4f97f4c21..ae3753b4c87 100644 --- a/mindspore/ccsrc/kernel/mng/rt_kernel_info.h +++ b/mindspore/ccsrc/kernel/rts/rt_kernel_info.h @@ -1,75 +1,75 @@ -/** - * 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. - */ - -#ifndef MINDSPORE_CCSRC_KERNEL_MNG_RT_KERNEL_INFO_H -#define MINDSPORE_CCSRC_KERNEL_MNG_RT_KERNEL_INFO_H - -#include -#include -#include -#include -#include -#include -#include - -#include "ir/dtype.h" -#include "kernel/kernel_build_info.h" -#include "kernel/kernel.h" -#include "utils/utils.h" - -namespace mindspore { -namespace kernel { -class RtKerDesc { - public: - virtual ~RtKerDesc() {} - virtual std::vector> GetKernelInfo() { - return std::vector>{}; - } -}; - -using RtKerDescCreater = std::function()>; -class RtKerDescFactory { - RtKerDescFactory() = default; - ~RtKerDescFactory() = default; - - public: - static RtKerDescFactory &Get(); - void Register(const std::string &name, RtKerDescCreater &&fun); - static std::shared_ptr Create(const std::string &name); - - private: - std::map fmap_; -}; - -class _RtKerDescRegister { - public: - _RtKerDescRegister(const std::string &name, RtKerDescCreater &&fun) { - RtKerDescFactory::Get().Register(name, std::move(fun)); - } - ~_RtKerDescRegister() = default; -}; - -#define _MS_REG_RTKERNEL_DESC_REG(KNAME, clazz) \ - static_assert(std::is_base_of::value, " must be base of RtKerDesc"); \ - static const _RtKerDescRegister g_##KNAME##_##_rtkernel_desc_reg(#KNAME, []() { return std::make_shared(); }); - -#define MS_REG_RTKERNEL_DESC(KNAME, clazz) _MS_REG_RTKERNEL_DESC_REG(KNAME, clazz) - -void GetRtKelInfo(const CNodePtr &kernel_node, std::vector> *kernel_info_list); -} // namespace kernel -} // namespace mindspore - -#endif // MINDSPORE_CCSRC_KERNEL_MNG_RT_KERNEL_INFO_H +/** + * 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. + */ + +#ifndef MINDSPORE_CCSRC_KERNEL_RTS_RT_KERNEL_INFO_H +#define MINDSPORE_CCSRC_KERNEL_RTS_RT_KERNEL_INFO_H + +#include +#include +#include +#include +#include +#include +#include + +#include "ir/dtype.h" +#include "kernel/kernel_build_info.h" +#include "kernel/kernel.h" +#include "utils/utils.h" + +namespace mindspore { +namespace kernel { +class RtKerDesc { + public: + virtual ~RtKerDesc() {} + virtual std::vector> GetKernelInfo() { + return std::vector>{}; + } +}; + +using RtKerDescCreater = std::function()>; +class RtKerDescFactory { + RtKerDescFactory() = default; + ~RtKerDescFactory() = default; + + public: + static RtKerDescFactory &Get(); + void Register(const std::string &name, RtKerDescCreater &&fun); + static std::shared_ptr Create(const std::string &name); + + private: + std::map fmap_; +}; + +class _RtKerDescRegister { + public: + _RtKerDescRegister(const std::string &name, RtKerDescCreater &&fun) { + RtKerDescFactory::Get().Register(name, std::move(fun)); + } + ~_RtKerDescRegister() = default; +}; + +#define _MS_REG_RTKERNEL_DESC_REG(KNAME, clazz) \ + static_assert(std::is_base_of::value, " must be base of RtKerDesc"); \ + static const _RtKerDescRegister g_##KNAME##_##_rtkernel_desc_reg(#KNAME, []() { return std::make_shared(); }); + +#define MS_REG_RTKERNEL_DESC(KNAME, clazz) _MS_REG_RTKERNEL_DESC_REG(KNAME, clazz) + +void GetRtKelInfo(const CNodePtr &kernel_node, std::vector> *kernel_info_list); +} // namespace kernel +} // namespace mindspore + +#endif // MINDSPORE_CCSRC_KERNEL_RTS_RT_KERNEL_INFO_H diff --git a/mindspore/ccsrc/kernel/mng/send.cc b/mindspore/ccsrc/kernel/rts/send.cc similarity index 98% rename from mindspore/ccsrc/kernel/mng/send.cc rename to mindspore/ccsrc/kernel/rts/send.cc index c917ea57087..abb93f5af41 100644 --- a/mindspore/ccsrc/kernel/mng/send.cc +++ b/mindspore/ccsrc/kernel/rts/send.cc @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "kernel/mng/send.h" +#include "kernel/rts/send.h" #include #include "runtime/event.h" #include "framework/ge_runtime/task_info.h" diff --git a/mindspore/ccsrc/kernel/mng/send.h b/mindspore/ccsrc/kernel/rts/send.h similarity index 86% rename from mindspore/ccsrc/kernel/mng/send.h rename to mindspore/ccsrc/kernel/rts/send.h index abc96cba724..bbf571b6ab7 100644 --- a/mindspore/ccsrc/kernel/mng/send.h +++ b/mindspore/ccsrc/kernel/rts/send.h @@ -14,12 +14,12 @@ * limitations under the License. */ -#ifndef MINDSPORE_CCSRC_KERNEL_MNG_SEND_H -#define MINDSPORE_CCSRC_KERNEL_MNG_SEND_H +#ifndef MINDSPORE_CCSRC_KERNEL_RTS_SEND_H +#define MINDSPORE_CCSRC_KERNEL_RTS_SEND_H #include #include -#include "kernel/mng/rt_kernel.h" -#include "kernel/mng/rt_kernel_info.h" +#include "kernel/rts/rt_kernel.h" +#include "kernel/rts/rt_kernel_info.h" namespace mindspore { namespace kernel { @@ -41,4 +41,4 @@ MS_REG_RTKERNEL(send, SendKernel); } // namespace kernel } // namespace mindspore -#endif // MINDSPORE_CCSRC_KERNEL_MNG_SEND_H +#endif // MINDSPORE_CCSRC_KERNEL_RTS_SEND_H diff --git a/mindspore/ccsrc/kernel/mng/stream_active.cc b/mindspore/ccsrc/kernel/rts/stream_active.cc similarity index 98% rename from mindspore/ccsrc/kernel/mng/stream_active.cc rename to mindspore/ccsrc/kernel/rts/stream_active.cc index 51c960172a6..ce6d94e4a57 100644 --- a/mindspore/ccsrc/kernel/mng/stream_active.cc +++ b/mindspore/ccsrc/kernel/rts/stream_active.cc @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "kernel/mng/stream_active.h" +#include "kernel/rts/stream_active.h" #include #include #include "runtime/stream.h" diff --git a/mindspore/ccsrc/kernel/mng/stream_active.h b/mindspore/ccsrc/kernel/rts/stream_active.h similarity index 86% rename from mindspore/ccsrc/kernel/mng/stream_active.h rename to mindspore/ccsrc/kernel/rts/stream_active.h index 6608134b2bb..0955de8cef1 100644 --- a/mindspore/ccsrc/kernel/mng/stream_active.h +++ b/mindspore/ccsrc/kernel/rts/stream_active.h @@ -14,12 +14,12 @@ * limitations under the License. */ -#ifndef MINDSPORE_CCSRC_KERNEL_MNG_STREAM_ACTIVE_H -#define MINDSPORE_CCSRC_KERNEL_MNG_STREAM_ACTIVE_H +#ifndef MINDSPORE_CCSRC_KERNEL_RTS_STREAM_ACTIVE_H +#define MINDSPORE_CCSRC_KERNEL_RTS_STREAM_ACTIVE_H #include #include -#include "kernel/mng/rt_kernel.h" -#include "kernel/mng/rt_kernel_info.h" +#include "kernel/rts/rt_kernel.h" +#include "kernel/rts/rt_kernel_info.h" namespace mindspore { namespace kernel { @@ -43,4 +43,4 @@ MS_REG_RTKERNEL(streamactive, StreamActiveKernel); } // namespace kernel } // namespace mindspore -#endif // MINDSPORE_CCSRC_KERNEL_MNG_STREAM_ACTIVE_H +#endif // MINDSPORE_CCSRC_KERNEL_RTS_STREAM_ACTIVE_H diff --git a/mindspore/ccsrc/kernel/mng/stream_switch.cc b/mindspore/ccsrc/kernel/rts/stream_switch.cc similarity index 98% rename from mindspore/ccsrc/kernel/mng/stream_switch.cc rename to mindspore/ccsrc/kernel/rts/stream_switch.cc index b77c44cf9e5..4fc8f8ef59b 100644 --- a/mindspore/ccsrc/kernel/mng/stream_switch.cc +++ b/mindspore/ccsrc/kernel/rts/stream_switch.cc @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "kernel/mng/stream_switch.h" +#include "kernel/rts/stream_switch.h" #include #include diff --git a/mindspore/ccsrc/kernel/mng/stream_switch.h b/mindspore/ccsrc/kernel/rts/stream_switch.h similarity index 86% rename from mindspore/ccsrc/kernel/mng/stream_switch.h rename to mindspore/ccsrc/kernel/rts/stream_switch.h index 55cf323ec72..3cc09b74945 100644 --- a/mindspore/ccsrc/kernel/mng/stream_switch.h +++ b/mindspore/ccsrc/kernel/rts/stream_switch.h @@ -14,13 +14,13 @@ * limitations under the License. */ -#ifndef MINDSPORE_CCSRC_KERNEL_MNG_STREAM_SWITCH_H -#define MINDSPORE_CCSRC_KERNEL_MNG_STREAM_SWITCH_H +#ifndef MINDSPORE_CCSRC_KERNEL_RTS_STREAM_SWITCH_H +#define MINDSPORE_CCSRC_KERNEL_RTS_STREAM_SWITCH_H #include #include -#include "kernel/mng/rt_kernel.h" -#include "kernel/mng/rt_kernel_info.h" +#include "kernel/rts/rt_kernel.h" +#include "kernel/rts/rt_kernel_info.h" namespace mindspore { namespace kernel { @@ -46,4 +46,4 @@ MS_REG_RTKERNEL(streamswitch, StreamSwitchKernel); } // namespace kernel } // namespace mindspore -#endif // MINDSPORE_CCSRC_KERNEL_MNG_STREAM_SWITCH_H +#endif // MINDSPORE_CCSRC_KERNEL_RTS_STREAM_SWITCH_H diff --git a/tests/ut/cpp/CMakeLists.txt b/tests/ut/cpp/CMakeLists.txt index f5bc07ff69c..17d7cb1e359 100644 --- a/tests/ut/cpp/CMakeLists.txt +++ b/tests/ut/cpp/CMakeLists.txt @@ -70,7 +70,7 @@ file(GLOB_RECURSE MINDSPORE_SRC_LIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "../../../mindspore/ccsrc/kernel/akg/*.cc" "../../../mindspore/ccsrc/kernel/kash/*.cc" "../../../mindspore/ccsrc/kernel/cce/*.cc" - "../../../mindspore/ccsrc/kernel/mng/*.cc" + "../../../mindspore/ccsrc/kernel/rts/*.cc" "../../../mindspore/ccsrc/kernel/hccl/*.cc" "../../../mindspore/ccsrc/kernel/kernel_query.cc" "../../../mindspore/ccsrc/kernel/kernel_build_info.cc" @@ -80,7 +80,7 @@ file(GLOB_RECURSE MINDSPORE_SRC_LIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "../../../mindspore/ccsrc/pre_activate/mem_reuse/*.cc" "../../../mindspore/ccsrc/pre_activate/pass/*.cc" "../../../mindspore/ccsrc/kernel/aicpu/aicpu_kernel_metadata.cc" - "../../../mindspore/ccsrc/kernel/mng/rt_kernel_info.cc" + "../../../mindspore/ccsrc/kernel/rts/rt_kernel_info.cc" "../../../mindspore/ccsrc/kernel/common_utils.cc" "../../../mindspore/ccsrc/kernel/oplib/*.cc" "../../../mindspore/ccsrc/kernel/tbe/*.cc"