Thank you for your replying.
In outputlayer_cuda_weight_backward_kernel,   grad_weight[k][grad_indexs[1][col]] += can work correctly(the data is very sparse).
I will try above suggestions. Do you know what toolkits can anaylze the arithmetic workload of GPU, which can be used in pytorch?
Best regards
Jia