1 /** 2 * Copyright 2021 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 #ifndef MINDSPORE_CCSRC_DEBUG_RDR_TASK_DEBUG_INFO_RECORDER_H_ 17 #define MINDSPORE_CCSRC_DEBUG_RDR_TASK_DEBUG_INFO_RECORDER_H_ 18 #include <vector> 19 #include <string> 20 #include <memory> 21 22 #include "debug/rdr/base_recorder.h" 23 24 namespace mindspore { 25 namespace device { 26 namespace ascend { 27 namespace tasksink { 28 class TaskDebugInfo; 29 } // namespace tasksink 30 } // namespace ascend 31 } // namespace device 32 33 using TaskDebugInfoPtr = std::shared_ptr<device::ascend::tasksink::TaskDebugInfo>; 34 class TaskDebugInfoRecorder : public BaseRecorder { 35 public: TaskDebugInfoRecorder()36 TaskDebugInfoRecorder() {} TaskDebugInfoRecorder(const std::string & module,const std::string & name,const std::vector<TaskDebugInfoPtr> & task_debug_info)37 TaskDebugInfoRecorder(const std::string &module, const std::string &name, 38 const std::vector<TaskDebugInfoPtr> &task_debug_info) 39 : BaseRecorder(module, name), task_debug_info_(task_debug_info) {} ~TaskDebugInfoRecorder()40 ~TaskDebugInfoRecorder() {} 41 virtual void Export(); 42 43 private: 44 std::vector<TaskDebugInfoPtr> task_debug_info_; 45 }; 46 using TaskDebugInfoRecorderPtr = std::shared_ptr<TaskDebugInfoRecorder>; 47 } // namespace mindspore 48 #endif // MINDSPORE_CCSRC_DEBUG_RDR_TASK_DEBUG_INFO_RECORDER_H_ 49