Issue building prefix_sum
yuhao opened this issue · comments
gcc/g++ version 6.5.0
nvcc version 10.0
Python 3.6.8
on centos 7.9
trying to build prefix_sum and got the following. Any suggestion is appreciated!
prefix_sum.cu(80): error: a pointer to a bound function may only be used to call the function
prefix_sum.cu(80): error: type name is not allowed
prefix_sum.cu(80): error: expected an expression
prefix_sum.cu(81): error: a pointer to a bound function may only be used to call the function
prefix_sum.cu(81): error: type name is not allowed
prefix_sum.cu(81): error: expected an expression
prefix_sum.cu(95): error: a pointer to a bound function may only be used to call the function
prefix_sum.cu(95): error: type name is not allowed
prefix_sum.cu(95): error: expected an expression
prefix_sum.cu(96): error: a pointer to a bound function may only be used to call the function
prefix_sum.cu(96): error: type name is not allowed
prefix_sum.cu(96): error: expected an expression
Mine works with gcc/g++ 7.5.0, cuda 10.2 (10.1 should also works) and python 3.8.2 on ubuntu 18.04. Will check it out after a report deadline in several hours...
scan( grid_off.contiguous().data_ptr<int>(), grid_cnt.contiguous().data_ptr<int>(), num_grids, true );
The code looks fine to me. I use this conversion from at::Tensor to type* throughout the library. Maybe you can check your pytorch version? Mine is 1.6.0 and it is working.
Hmm update pytorch to 1.8 seems to do the trick. Thanks.