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

Hi, can you make it runnable on cpu-only? #16

Open
antran89 opened this issue Oct 25, 2018 · 7 comments
Open

Hi, can you make it runnable on cpu-only? #16

antran89 opened this issue Oct 25, 2018 · 7 comments

Comments

@antran89
Copy link

Hi,

I have a simple request to make the code runnable in cpu-only machine.
It is more testing the Python notebook.

Thank you.

@billcai
Copy link

billcai commented Oct 30, 2018

Not sure if it's possible - might need to find equivalents for the in place abn functions that currently rely on CUDA...I'm interested in finding out the answer to this question too.

@s-shikharcse
Copy link

Hey did you get any solution to this problem?

@antran89
Copy link
Author

I run it on GPU :-)

@billcai
Copy link

billcai commented Jan 23, 2019

I have a working CPU version - you need to change all the ifs in module/src/inplace_abn.cpp that seem to only enable the cuda versions. The CPU versions are already implemented but not used - you just need to activate them.

@NickMcCarthy101
Copy link

@billcai what do you mean by the ifs and is it just in the module/src/inplace_abn.cpp file that this is the case?

@billcai
Copy link

billcai commented Feb 20, 2019

Removed this if else statement and just leave the cpu version for all the functions in inplace_abn.cpp

For example, from:

if (x.is_cuda()) {
return mean_var_cuda(x);
} else {
return mean_var_cpu(x);
}

To:

return mean_var_cpu(x):

@shukla-19
Copy link

Thanks a lot @billcai . Your input helped me after days of struggle on the same. One more important thing I had to do was comment out or delete the "inplace_abn_cuda.cu" in the functions .py script in the modules. Ultimately, then the TernausNetV2 was imported.

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

5 participants