You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.8 KiB
48 lines
1.8 KiB
/**
|
|
* Copyright 2019-2021 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 GE_COMMON_DUMP_DUMP_EXCEPTION_H_
|
|
#define GE_COMMON_DUMP_DUMP_EXCEPTION_H_
|
|
|
|
#include <vector>
|
|
|
|
#include "graph/op_desc.h"
|
|
#include "framework/common/ge_types.h"
|
|
#include "graph/load/model_manager/task_info/task_info.h"
|
|
|
|
namespace ge {
|
|
class DumpException {
|
|
public:
|
|
DumpException() = default;
|
|
~DumpException();
|
|
|
|
void SaveDumpOpInfo(const OpDescPtr &op, uint32_t task_id, uint32_t stream_id,
|
|
vector<void *> &input_addrs, vector<void *> &output_addrs);
|
|
void SaveDumpOpInfo(const RuntimeParam &model_param, const OpDescPtr &op, uint32_t task_id, uint32_t stream_id);
|
|
Status DumpExceptionInfo(const std::vector<rtExceptionInfo> &exception_infos) const;
|
|
bool GetOpDescInfo(uint32_t stream_id, uint32_t task_id, OpDescInfo &op_desc_info) const;
|
|
|
|
private:
|
|
void SaveOpDescInfo(const OpDescPtr &op, uint32_t task_id, uint32_t stream_id, OpDescInfo &op_desc_info);
|
|
Status DumpExceptionInput(const OpDescInfo &op_desc_info, const string &dump_file) const;
|
|
Status DumpExceptionOutput(const OpDescInfo &op_desc_info, const string &dump_file) const;
|
|
|
|
std::vector<OpDescInfo> op_desc_info_;
|
|
};
|
|
} // namespace ge
|
|
|
|
#endif // GE_COMMON_DUMP_DUMP_OP_H_
|