-
-
Notifications
You must be signed in to change notification settings - Fork 293
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
Use load_param_mem
with ncnn CPU inference
#2142
Use load_param_mem
with ncnn CPU inference
#2142
Conversation
There isn't also one for the bin? That's a shame |
@joeyballentine It's... complicated. When I tried to port the There is an API that will do what we want for |
That makes sense. If you're in contact with NCNN devs, could you ask them if they could start officially supporting Vulkan in the python bindings? I'd love to no longer have to maintain my fork |
@joeyballentine Yes, that is actually already on my TODO list. |
Great. There's still other things my fork changes that afaik aren't included in the official bindings, such as throwing python errors rather than just logging errors. This was necessary for the safe OOM catching chaiNNer does. I think that's the last requirement besides Vulkan support that would need to be ported before we could just get rid of my fork entirely |
Yeah makes sense. I'm a big fan of killing off forks and upstreaming things whenever possible, so yeah, I intend to spend some effort on this. Not sure how long it'll take me, especially given my lack of familiarity with Vulkan. |
If it makes you feel any better, I don't know shit about how Vulkan works. I was just trying things out until it did what I needed it to do 😆 In terms of enabling Vulkan for python, it's just a compiler flag they have off. I hardcoded it to be enabled everywhere in my fork (which I heavily regret now due to merge conflicts every time I try to merge upstream's changes). AFAIK you just add an env var and it compiles with Vulkan enabled |
Oh good, if it's just a cmake flag change, then maybe I can deal with that at the same time that I'm getting POWER9 VSX support enabled by default in their Python package. |
(VSX by default is not going to happen until an upstream Clang bug gets fixed though -- right now Clang artificially slows down ncnn on POWER9 by around 15% due to a stupid bug in a header file that Clang ships with. So probably will be a few weeks at least before that gets unblocked.) |
Upstream ncnn now has a Pybind for
load_param_mem
, so we can utilize that and make things a bit more efficient.