未验证 提交 b7fbd339 编写于 作者: Y Yiqun Liu 提交者: GitHub

Support 0-D Tensor for check_numerics_kernel. (#54868)

上级 69bf5ee8
...@@ -496,10 +496,12 @@ void CheckNumericsKernel(const Context& ctx, ...@@ -496,10 +496,12 @@ void CheckNumericsKernel(const Context& ctx,
DenseTensor* values) { DenseTensor* values) {
int dev_id = tensor.place().device; int dev_id = tensor.place().device;
VLOG(6) << "op_type=" << op_type << ", var_name=" << var_name VLOG(6) << "op_type=" << op_type << ", var_name=" << var_name
<< ", dev_id=gpu:" << dev_id << ", dev_id=gpu:" << dev_id << ", numel=" << tensor.numel()
<< ", stack_height_limit=" << stack_height_limit << ", stack_height_limit=" << stack_height_limit
<< ", output_dir=" << output_dir; << ", output_dir=" << output_dir;
if (tensor.numel() <= 0) return;
// Print to the standard output. // Print to the standard output.
char* gpu_str_ptr = GetGpuHintStringPtr<T>(ctx, op_type, var_name, dev_id); char* gpu_str_ptr = GetGpuHintStringPtr<T>(ctx, op_type, var_name, dev_id);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册