如果我编译这个
__global__ void dummy_kernel(float *a, int N, float* b, int N2){
unsigned int i = blockIdx.y*blockDim.y + threadIdx.y;
unsigned int j = blockIdx.x*blockDim.x + threadIdx.x;
}
我得到这个空的 ptx 代码
.entry _Z9dummy_kernelPfiS_i(
.param .u64 _Z9dummy_kernelPfiS_i_param_0,
.param .u32 _Z9dummy_kernelPfiS_i_param_1,
.param .u64 _Z9dummy_kernelPfiS_i_param_2,
.param .u32 _Z9dummy_kernelPfiS_i_param_3
)
{
ret;
}
有没有办法强制编译器在不优化的情况下生成 ptx?