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

[filter] Support snpe filter in android #4487

Merged
merged 3 commits into from
Jun 14, 2024

Conversation

anyj0527
Copy link
Member

Self evaluation:

  1. Build test: [X]Passed [ ]Failed [ ]Skipped
  2. Run test: [X]Passed [ ]Failed [ ]Skipped

- Let `custom=Runtime:[CPU|GPU|DSP|NPU]` set each snpe runtime.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
- Support snpe (SDK v2) in Android.
  Some additional env variables are requires to be set.
  REF: https://docs.qualcomm.com/bundle/publicresource/topics/80-63442-2/dsp_runtime.html

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
- Determine proper source code out of `tensor_filter_snpe.cc` and `tensor_filter_snpe_v1.cc`

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
ifeq ($(shell test -d ${SNPE_ROOT}/include/zdl; echo $$?),0)
NNSTREAMER_FILTER_SNPE_SRCS := \
$(NNSTREAMER_EXT_HOME)/tensor_filter/tensor_filter_snpe_v1.cc
endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this too dangerous assumption?

I'd recommend:

  • build snpe(v2) if v2 is available
  • build snpe(v1) if v1 is available AND v2 is not available.

The current logic is

  • build snpe(v2) if v2 is available AND v1 is NOT available
  • build snpe(v1) if v1 is available AND.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume $SNPE_ROOT is unique and a single SNPE SDK does not have both header directories for V1 and V2. I think there is no possibility to both v1 and v2 available.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok.. if !exist(zdl) means !v2, let's proceed.

@myungjoo myungjoo merged commit c86df28 into nnstreamer:main Jun 14, 2024
15 checks passed
@anyj0527 anyj0527 deleted the snpe2-support-android branch June 28, 2024 06:11
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.

None yet

3 participants