Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'adaptive_gridsampler.adaptive_gridsampler_cuda' #13

Open
WonJunPark opened this issue Feb 27, 2021 · 5 comments

Comments

@WonJunPark
Copy link

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

@PinRuei
Copy link

PinRuei commented Mar 29, 2021

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

@jiunbae
Copy link

jiunbae commented May 7, 2021

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);

@Drorharush
Copy link

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

@SanKumSan
Copy link

@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

@MariaSA2023
Copy link

who solved this issue please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants