blob: 62f312a36505eeb2937b9412cb8ce53a9b6db693 [file] [log] [blame]
#include <torch/csrc/jit/print_handler.h>
#include <iostream>
#include <string>
namespace torch {
namespace jit {
std::atomic<PrintHandler> print_handler([](const std::string& str) {
std::cout << str;
});
PrintHandler getPrintHandler() {
return print_handler.load();
}
void setPrintHandler(PrintHandler ph) {
print_handler.store(ph);
}
} // namespace jit
} // namespace torch