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

Add test for successive armnn model loads with diff thread counts #10

Merged
merged 4 commits into from
Jan 10, 2023

Conversation

jishminor
Copy link
Member

Signed-off-by: Josh Minor [email protected]

@jishminor
Copy link
Member Author

jishminor commented Jan 10, 2023

This PR attempts to address #5, dealing with concurrent execution of ArmNN delegated Tflite models.

It adds a test that verifies when multiple armnn delegated models are loaded in sequence a segfault does not occur. It appears that requesting a load with fewer threads works correctly, whereas the inverse fails.

The design of the Arm compute library scheduler is a singelton, meaning all armnn delegated models share the same scheduler. Because of this, the runtime doesn't like when one models sets a number of threads, then another model follows up by setting a lesser number of threads.

@jishminor
Copy link
Member Author

As a temporary hacky solution, I just simply maintain a global int for the min number of threads requested by an armnn delegated model so far, and if another model requests more threads, than it gets overwritten by current value of that global.

It's also important to note that the thread pool seems to be shared by all armnn models, rather than getting a unique threads per model for the execution of the armnn/acl op kernels.

@jishminor jishminor merged commit 7aa5140 into dev Jan 10, 2023
@jishminor jishminor deleted the fix/armnn_lock_threads branch January 10, 2023 23:12
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

Successfully merging this pull request may close these issues.

1 participant