mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Summary: This makes it so we can see the output of prim::Print in environments like iPython notebooks which override sys.stdout Pull Request resolved: https://github.com/pytorch/pytorch/pull/21625 Differential Revision: D15756793 Pulled By: jamesr66a fbshipit-source-id: 7d9a14b2e229ed358e784318e9d862677db2c461
19 lines
340 B
C++
19 lines
340 B
C++
#pragma once
|
|
|
|
#include <torch/csrc/WindowsTorchApiMacro.h>
|
|
|
|
#include <atomic>
|
|
#include <functional>
|
|
#include <iostream>
|
|
|
|
namespace torch {
|
|
namespace jit {
|
|
|
|
using PrintHandler = void (*)(const std::string&);
|
|
|
|
TORCH_API void setPrintHandler(PrintHandler ph);
|
|
TORCH_API PrintHandler getPrintHandler();
|
|
|
|
} // namespace jit
|
|
} // namespace torch
|