CAR icon indicating copy to clipboard operation
CAR copied to clipboard

ModuleNotFoundError: No module named 'adaptive_gridsampler.adaptive_gridsampler_cuda'

Open WonJunPark opened this issue 4 years ago • 5 comments

For the inference operation, the following operation was carried out, but an error appears.

get CAR-pytorch source

git clone https://github.com/sunwj/CAR.git cd CAR

compile the code of the resampler

cd adaptive_gridsampler python3 setup.py build_ext --inplace

WonJunPark avatar Feb 27 '21 08:02 WonJunPark

I have the same error. But as I run the setup.py , it shows a lot of warning.

PinRuei avatar Mar 29 '21 05:03 PinRuei

Change floor to floorf at adaptive_gridsampler/adaptive_gridsampler_kernel.cu Line 49-54.

Tested at CUDA 11.0 Windows / Linux (18.04 LTS)

            scalar_t alpha = p_x - floorf(p_x);
            scalar_t beta = p_y - floorf(p_y);

            int xL = max(min(int(Fluor(p_x)), int(w + 2 * padding - 1)), 0);
            int xR = max(min(xL + 1, int(w + 2 * padding - 1)), 0);
            int yT = max(min(int(floorf(p_y)), int(h + 2 * padding - 1)), 0);

jiunbae avatar May 07 '21 00:05 jiunbae

Same problem here. ModuleNotFoundError: No module named 'adaptive_gridsampler_cuda' Replacing 'floor' with 'floorf' in adaptive_gridsampler_kernel.cu didn't change anything.

Drorharush avatar Jan 18 '22 14:01 Drorharush

@Drorharush yes, nothing happened after changing as @jiunbae mentioned.

Exited with this error. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

SanKumSan avatar Aug 07 '22 08:08 SanKumSan

who solved this issue please

MariaSA2023 avatar Apr 15 '23 13:04 MariaSA2023