什么是redzone_checker?在GPU上分析我的Tensorflow应用程序 [英] What is redzone_checker? Profiling my tensorflow application on a GPU

查看:214
本文介绍了什么是redzone_checker?在GPU上分析我的Tensorflow应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用NVIDIA的命令行Visual Profiler nvprof对一个tensorflow GPU应用程序进行性能分析,而已启动并且在性能分析中非常活跃的内核之一就是所谓的redzone_checker吗?我一生无法在互联网上任何地方找到任何有用的信息……

I am profiling a tensorflow GPU application with NVIDIA's command line Visual Profiler nvprof, and one of the kernels that was launched and is very active in the profiling is something called redzone_checker? I cannot for the life of me find any useful information on what this means anywhere on the internet...

任何帮助或提示都将不胜感激.

Any help or tips would be greatly appreciated.

nvprof中的redzone_checker内核

推荐答案

redzone_checker内核在TensorFlow(v2.3.0)中实现

redzone_checker kernel is implemented in TensorFlow (v2.3.0) https://github.com/tensorflow/tensorflow/blob/master/tensorflow/stream_executor/gpu/redzone_allocator.cc line 138

根据代码中的注释,redzone_checker内核检查输入缓冲区中的每个字节是否等于redzone_pattern.

According to the comment in the code, the redzone_checker kernel checks that every byte in input_buffer is equal to redzone_pattern.

抱歉,对于不确定的信息,我猜想(redzone)一词来自内存保护方面的redzone.堆栈或全局对象周围的红色区域可检测上溢和下溢.

Sorry for uncertain information, I guess the term (redzone) is brought from the redzone on memory protection. The redzones around stack or global object to detect overflows and underflows.

我使用nvprof(带有--print-gpu-trace选项)概要文件示例( https://www.tensorflow.org/xla ),而没有XLA JIT编译.仅在XLA JIT编译情况下,仅显示mnist redzone_checker调用,但其他概要分析结果中没有redzone_checker调用.

I profiled using nvprof (with --print-gpu-trace option) mnist examples(https://www.tensorflow.org/xla) with XLA JIT compilation and without it. redzone_checker invocations are shown only mnist with XLA JIT compilation but there is no redzone_checker invocation in the other profiled result.

我的结论是,由TensorFlow提供的内核修改(甚至通过XLA编译器进行了优化)也会导致调用redzone_checker来保护内存.

My conclusion is that modification on kernel provided by TensorFlow (even optimized by XLA compiler) leads invocations of redzone_checker to protect memory.

这篇关于什么是redzone_checker?在GPU上分析我的Tensorflow应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆