1 /** 2 * Copyright 2019 Huawei Technologies Co., Ltd 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef MINDSPORE_CCSRC_BACKEND_KERNEL_COMPILER_RTS_SEND_H 18 #define MINDSPORE_CCSRC_BACKEND_KERNEL_COMPILER_RTS_SEND_H 19 #include <memory> 20 #include <vector> 21 #include "backend/kernel_compiler/rts/rt_kernel.h" 22 #include "backend/kernel_compiler/rts/rt_kernel_info.h" 23 24 namespace mindspore { 25 namespace kernel { 26 class SendKernel : public RtKernel { 27 public: 28 SendKernel(); 29 ~SendKernel() override; 30 bool Init(const AnfNodePtr &anf_node) override; 31 bool Launch(const std::vector<AddressPtr> &inputs, const std::vector<AddressPtr> &workspace, 32 const std::vector<AddressPtr> &outputs, void *stream_ptr) override; 33 std::vector<TaskInfoPtr> GenTask(const std::vector<AddressPtr> &inputs, const std::vector<AddressPtr> &workspace, 34 const std::vector<AddressPtr> &outputs, uint32_t stream_id) override; 35 36 private: 37 uint32_t event_id_; 38 }; 39 40 MS_REG_RTKERNEL(streamsend, SendKernel); 41 } // namespace kernel 42 } // namespace mindspore 43 44 #endif // MINDSPORE_CCSRC_BACKEND_KERNEL_COMPILER_RTS_SEND_H 45