Open sijieaaa opened 1 year ago
If you find bugs about <THC/THC.h>, you can do the following modifications:
uncomment this line: https://github.com/xy-guo/LIGA-Stereo/blob/aee3731a24a0ab1667e633e520cc89be2f135272/liga/ops/build_cost_volume/src/BuildCostVolume_cuda.cu#L5
define a new ceil_div function:
int ceil_div(int a, int b){ return (a + b - 1) / b; }
replace this line: https://github.com/xy-guo/LIGA-Stereo/blob/aee3731a24a0ab1667e633e520cc89be2f135272/liga/ops/build_cost_volume/src/BuildCostVolume_cuda.cu#L232 with dim3 grid(std::min(ceil_div((long)(output_size / 2), 512), 4096));
dim3 grid(std::min(ceil_div((long)(output_size / 2), 512), 4096));
replace this line: https://github.com/xy-guo/LIGA-Stereo/blob/aee3731a24a0ab1667e633e520cc89be2f135272/liga/ops/build_cost_volume/src/BuildCostVolume_cuda.cu#L278 with dim3 grid(std::min(ceil_div((long)(grad.numel()), 512) , 4096));
dim3 grid(std::min(ceil_div((long)(grad.numel()), 512) , 4096));
replace THCudaCheck(cudaGetLastError()); with AT_CUDA_CHECK(cudaGetLastError());
THCudaCheck(cudaGetLastError());
AT_CUDA_CHECK(cudaGetLastError());
If you find bugs about <THC/THC.h>, you can do the following modifications:
uncomment this line: https://github.com/xy-guo/LIGA-Stereo/blob/aee3731a24a0ab1667e633e520cc89be2f135272/liga/ops/build_cost_volume/src/BuildCostVolume_cuda.cu#L5
define a new ceil_div function:
replace this line: https://github.com/xy-guo/LIGA-Stereo/blob/aee3731a24a0ab1667e633e520cc89be2f135272/liga/ops/build_cost_volume/src/BuildCostVolume_cuda.cu#L232 with
dim3 grid(std::min(ceil_div((long)(output_size / 2), 512), 4096));
replace this line: https://github.com/xy-guo/LIGA-Stereo/blob/aee3731a24a0ab1667e633e520cc89be2f135272/liga/ops/build_cost_volume/src/BuildCostVolume_cuda.cu#L278 with
dim3 grid(std::min(ceil_div((long)(grad.numel()), 512) , 4096));
replace
THCudaCheck(cudaGetLastError());
withAT_CUDA_CHECK(cudaGetLastError());