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

Vulkan backend not working with MNN #4

Open
ghost opened this issue Jun 22, 2022 · 3 comments
Open

Vulkan backend not working with MNN #4

ghost opened this issue Jun 22, 2022 · 3 comments

Comments

@ghost
Copy link

ghost commented Jun 22, 2022

While trying to run benchmark.cpp utilizing the Vulkan backend as ./benchmark.out /home/ubuntu/MNN/models 1000 10 7 setting forward = MNN_FORWARD_VULKAN, I get the error Can't Find type=7 backend, use 0 instead even though I had built MNN following the instructions in here which also builds for the Vulkan backend setting -DMNN_VULKAN=true. I am working on an NVIDIA Jetson with Jetpack version 5.0.1.

@Qengineering
Copy link
Owner

That's a known issue. The benchmark software doesn't respond on Vulkan, nor CUDA settings.
However, given the output, it is using CUDA behind the curtains. See #3

@ghost
Copy link
Author

ghost commented Jun 22, 2022

I think it falls back to the CPU when it is not able to find the Vulkan backend when I observe the output. I want the code to be using Vulkan behind the curtains to compare its performance with CUDA actually. How do I do that? #3 seems to correspond to running the code with CUDA and the fix given is for that right?

@Qengineering
Copy link
Owner

It's a stupid method. Just build MNN without CUDA and Vulkan and run your model to get the inference time.
Then build MNN with Vulkan and see what the difference is.
You could also build the framework with (only) CUDA and you'll have all the actual numbers.
Given the relatively quick build-up of MNN, you shouldn't be working on it all day.
On the other hand, I wouldn't recommend debugging and testing the benchmark software.
And I have my doubts about the reliability of the benchmark itself. Better to test your model in the actual situation

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

1 participant