dump_log.h 1.8 KB
Newer Older
C
ckey_Dou 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
/**
 * 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 POLY_DUMP_LOG_H_
#define POLY_DUMP_LOG_H_

#include <isl/cpp.h>
#include <tvm/node/node.h>
#include <string>
22
#include "poly/poly_util.h"
C
ckey_Dou 已提交
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
namespace akg {
namespace ir {
namespace poly {
std::string FormatMupaStr(const std::string &mupa_str, bool checkInString = false);
std::string FormatMupaStr(const isl::union_map &map);
std::string FormatMupaStr(const isl::union_set &set);
std::string FormatMupaStr(const isl::multi_aff &aff);
std::string FormatMupaStr(const isl::multi_pw_aff &mpa);
std::string FormatMupaStr(const isl::multi_union_pw_aff &mupa);
std::string FormatMupaStr(const isl::union_pw_aff &upa);

std::string FilePathCanonicalize(const std::string &file_name, bool is_log);
bool CreateFileIfNotExist(const std::string &file_name);
void CreateDirIfNotExist(const std::string &file_name);
std::string DumpSchTreeToString(const isl::schedule &sch);
void DumpSchTreeImpl(const std::string &file_name, const isl::schedule &sch);
39
std::string PrettyPrintSchTree(const isl::schedule &sch);
C
ckey_Dou 已提交
40
void PrintHeader(std::ofstream &of, const std::string &str);
41
void PrintHeader(const std::string &str);
42
void DumpNode(std::ofstream &of, const air::Node *node);
C
ckey_Dou 已提交
43 44 45 46 47 48

}  // namespace poly
}  // namespace ir
}  // namespace akg

#endif  // POLY_DUMP_LOG_H_