"git@developer.sourcefind.cn:OpenDAS/torch-sparce.git" did not exist on "04851655eab95ca6e10ce4014b5df1d338d0b34b"
Commit bc410d52 authored by Paul's avatar Paul
Browse files

Merge branch 'verify-verbose'

parents 237c3dbb 93562700
...@@ -37,6 +37,34 @@ inline void verify_args(const std::string& name, ...@@ -37,6 +37,34 @@ inline void verify_args(const std::string& name,
<< std::endl; << std::endl;
} }
auto cpu_nan_idx = find_idx(cpu, not_finite);
if(cpu_nan_idx >= 0)
std::cout << "Non finite number found in cpu at " << cpu_nan_idx << ": "
<< cpu[cpu_nan_idx] << std::endl;
auto gpu_nan_idx = find_idx(gpu, not_finite);
if(gpu_nan_idx >= 0)
std::cout << "Non finite number found in gpu at " << gpu_nan_idx << ": "
<< gpu[gpu_nan_idx] << std::endl;
std::cout << std::endl;
}
else
{
if(range_zero(cpu))
std::cout << "Cpu data is all zeros" << std::endl;
if(range_zero(gpu))
std::cout << "Gpu data is all zeros" << std::endl;
// auto mxdiff = max_diff(cpu, gpu);
// std::cout << "Max diff: " << mxdiff << std::endl;
// auto idx = mismatch_idx(cpu, gpu, float_equal);
// if(idx < range_distance(cpu))
// {
// std::cout << "Mismatch at " << idx << ": " << cpu[idx] << " != " << gpu[idx]
// << std::endl;
// }
auto cpu_nan_idx = find_idx(cpu, not_finite); auto cpu_nan_idx = find_idx(cpu, not_finite);
if(cpu_nan_idx >= 0) if(cpu_nan_idx >= 0)
std::cout << "Non finite number found in cpu at " << cpu_nan_idx << ": " std::cout << "Non finite number found in cpu at " << cpu_nan_idx << ": "
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment