| 3054 | } |
| 3055 | |
| 3056 | hipError_t ihipGraphDebugDotPrint(hip::Graph* graph, const char* path, unsigned int flags) { |
| 3057 | std::ofstream fout; |
| 3058 | fout.open(path, std::ios::out); |
| 3059 | if (fout.fail()) { |
| 3060 | LogPrintfError("[hipGraph] Error during opening of file : %s", path); |
| 3061 | return hipErrorOperatingSystem; |
| 3062 | } |
| 3063 | fout << "digraph dot {" << std::endl; |
| 3064 | hip::Graph* g = reinterpret_cast<hip::Graph*>(graph); |
| 3065 | g->GenerateDOT(fout, (hipGraphDebugDotFlags)flags); |
| 3066 | fout << "}" << std::endl; |
| 3067 | fout.close(); |
| 3068 | return hipSuccess; |
| 3069 | } |
| 3070 | |
| 3071 | hipError_t hipGraphDebugDotPrint(hipGraph_t graph, const char* path, unsigned int flags) { |
| 3072 | HIP_INIT_API(hipGraphDebugDotPrint, graph, path, flags); |
no test coverage detected