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

UserWarning: C++ kernel for SRU CPU inference was not loaded. Use Python version instead. warnings.warn("C++ kernel for SRU CPU inference was not loaded. " #144

Open
lin-lin-qi opened this issue Nov 12, 2020 · 2 comments
Labels

Comments

@lin-lin-qi
Copy link

lin-lin-qi commented Nov 12, 2020

dear teacher: firstly, thanks for much, your work help me in my paper.
when I use SRU to run the example with pytharm where home page show, I have got a warning like this:
""UserWarning: C++ kernel for SRU CPU inference was not loaded. Use Python version instead. warnings.warn("C++ kernel for SRU CPU inference was not loaded. """
and I had try to solve it by baidu, but not work, I am realy hope you can guide me ,
version info: sru2.3.4 & pytorch1.4.0 & python 3.5.4

@taoleicn
Copy link
Contributor

@lin-lin-qi
I think you are trying to use your model for inference / testing / demo by running on CPU?

When possible SRU will try to compile a c++ version of its recurrence computation, this will give greater speed when running inference on CPU.

When the compilation of the c++ version or loading of it is not successful, it will default to use a pure python implementation. This version will run slower. See

sru/sru/sru_functional.py

Lines 110 to 112 in f199973

else:
warnings.warn("C++ kernel for SRU CPU inference was not loaded. "
"Use Python version instead.")

@lin-lin-qi
Copy link
Author

lin-lin-qi commented Aug 19, 2021 via email

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

No branches or pull requests

2 participants