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

Android Applications crashing when delgating to GPU #4

Open
kishore-xinthe opened this issue Dec 26, 2024 · 1 comment
Open

Android Applications crashing when delgating to GPU #4

kishore-xinthe opened this issue Dec 26, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@kishore-xinthe
Copy link
Contributor

When running android apps - https://github.com/quic/ai-hub-apps/tree/main/apps/android and when clicking Run Model without changing the delegation between CPU, GPU and NPU.

@kishore-xinthe kishore-xinthe added the bug Something isn't working label Dec 26, 2024
@rayyan-xinthe
Copy link
Collaborator

The actual code from the Qualcomm AI Hub Apps originally had an array of hardware accelerators grouped in the same list, with the CPU in a separate array. This code has been modified to include separate delegates for the NPU, GPU, and CPU as required.
The crashing issue has been resolved in the uploaded code. The problem solved by the following code snippet when creating the GPU delegate. Initially, the sequence was NPU, GPU, and CPU. However, after separating them into individual delegates in the code, the object for the GPU delegate was not created, causing the application to crash.

if (cpuOnlyClassification){ this.cpuOnlyClassification = false; } this.gpuOnlyClassification = true; this.npuOnlyClassification = false;

image

Additionally, added these line of codes so that if the user do not select the delegator, the GPU delegator will be created by default. The application starts by default selected GPU only radio button.
else if (checkedId == R.id.gpuDelegateRadio){ if (cpuOnlyClassification){ this.cpuOnlyClassification = false; } this.gpuOnlyClassification = true; this.npuOnlyClassification = false;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants