https://github.com/halide/Halide
Raw File
Tip revision: f80fb1b060c8fc96ef6e748f59c6b532dc534ad6 authored by Steven Johnson on 03 February 2022, 00:41:23 UTC
Gen2 C++ Generator Experiment, KEEP
Tip revision: f80fb1b
DebugToFile.h
#ifndef HALIDE_DEBUG_TO_FILE_H
#define HALIDE_DEBUG_TO_FILE_H

/** \file
 * Defines the lowering pass that injects code at the end of
 * every realization to dump functions to a file for debugging.  */

#include <map>
#include <vector>

#include "Expr.h"

namespace Halide {
namespace Internal {

class Function;

/** Takes a statement with Realize nodes still unlowered. If the
 * corresponding functions have a debug_file set, then inject code
 * that will dump the contents of those functions to a file after the
 * realization. */
Stmt debug_to_file(Stmt s,
                   const std::vector<Function> &outputs,
                   const std::map<std::string, Function> &env);

}  // namespace Internal
}  // namespace Halide

#endif
back to top