如何找到函数的 CUDA __device__ 定义?
How to find the CUDA __device__ definition of a function?
我有一个特定的函数,我正在尝试查找其源定义,特别是 nvcc 编译器正在使用的函数。这个问题的措辞适用于 __device__
函数中使用的任何函数(或我想的符号)。给定:
__device__ void Foo(){
int x = round( 0.0f );
}
找到 nvcc 编译器用于生成设备代码的“round( float )”定义的 standard/canonical/recommended 方法是什么?
通常我使用 Visual Studio 的 F1“Go to Definition”,或者在项目文件中搜索“round”等。我还搜索 CUDA Toolkit 文档和 CUDA MATH API。在这种情况下,我找到了 VS cmath 定义。但是我如何确定 nvcc 编译器使用哪个定义?
What is the standard/canonical/recommended way to find the definition for "round( float )" used by the nvcc compiler to generate device code?
Disassembly。大多数内置函数作为存根存在于 headers 中,作为设备编译器代码生成过程的一部分扩展为内联汇编序列。没有输入码可以查看
我有一个特定的函数,我正在尝试查找其源定义,特别是 nvcc 编译器正在使用的函数。这个问题的措辞适用于 __device__
函数中使用的任何函数(或我想的符号)。给定:
__device__ void Foo(){
int x = round( 0.0f );
}
找到 nvcc 编译器用于生成设备代码的“round( float )”定义的 standard/canonical/recommended 方法是什么?
通常我使用 Visual Studio 的 F1“Go to Definition”,或者在项目文件中搜索“round”等。我还搜索 CUDA Toolkit 文档和 CUDA MATH API。在这种情况下,我找到了 VS cmath 定义。但是我如何确定 nvcc 编译器使用哪个定义?
What is the standard/canonical/recommended way to find the definition for "round( float )" used by the nvcc compiler to generate device code?
Disassembly。大多数内置函数作为存根存在于 headers 中,作为设备编译器代码生成过程的一部分扩展为内联汇编序列。没有输入码可以查看