Skip to content

Commit 9db2626

Browse files
committed
include error print
1 parent 915298f commit 9db2626

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/cpp/cpp_test_util.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,15 @@ void ForEachDevice(const std::function<void(const torch::Device&)>& devfn) {
182182
ForEachDevice({}, devfn);
183183
}
184184

185+
#include <iostream>
186+
using std::cerr;
185187
bool CloseValues(at::Tensor tensor1, at::Tensor tensor2, double rtol,
186188
double atol) {
187189
MaybeDumpGraph(tensor1);
188190
MaybeDumpGraph(tensor2);
189191
tensor1 = ToCpuTensor(tensor1);
190192
tensor2 = ToCpuTensor(tensor2);
193+
cerr << tensor1 << "\n\n" << tensor2 << "\n\n\n\n";
191194
if (torch::isnan(tensor1).any().item<bool>()) {
192195
EXPECT_TRUE(EqualValues(torch::isnan(tensor1), torch::isnan(tensor2)));
193196
tensor1.nan_to_num_();

0 commit comments

Comments
 (0)