Skip to content

[snpe] Add performance profile configuration support#24

Merged
anyj0527 merged 1 commit into
nnstreamer:mainfrom
anyj0527:snpe-perf-profile
Dec 11, 2025
Merged

[snpe] Add performance profile configuration support#24
anyj0527 merged 1 commit into
nnstreamer:mainfrom
anyj0527:snpe-perf-profile

Conversation

@anyj0527

@anyj0527 anyj0527 commented Dec 10, 2025

Copy link
Copy Markdown
Member

usage:... custom=Runtime:DSP,...,PerfProfile:"burst" ...

  • Add support for configuring SNPE performance profiles through custom properties.
  • The default performance profile is set to 'BALANCED'

REF:

typedef enum
{
  SNPE_PERFORMANCE_PROFILE_DEFAULT = 0,
  SNPE_PERFORMANCE_PROFILE_BALANCED = 0,
  SNPE_PERFORMANCE_PROFILE_HIGH_PERFORMANCE = 1,
  SNPE_PERFORMANCE_PROFILE_POWER_SAVER = 2,
  SNPE_PERFORMANCE_PROFILE_SYSTEM_SETTINGS = 3,
  SNPE_PERFORMANCE_PROFILE_SUSTAINED_HIGH_PERFORMANCE = 4,
  SNPE_PERFORMANCE_PROFILE_BURST = 5,
  SNPE_PERFORMANCE_PROFILE_LOW_POWER_SAVER = 6,
  SNPE_PERFORMANCE_PROFILE_HIGH_POWER_SAVER = 7,
  SNPE_PERFORMANCE_PROFILE_LOW_BALANCED = 8,
  SNPE_PERFORMANCE_PROFILE_EXTREME_POWER_SAVER = 9,
} Snpe_PerformanceProfile_t;

@anyj0527
anyj0527 requested a review from a team as a code owner December 10, 2025 07:28
@songgot

songgot commented Dec 10, 2025

Copy link
Copy Markdown

It seems like you're missing the code to set 'perfProfile'.

if (Snpe_SNPEBuilder_SetPerformanceProfile(snpebuilder_h, perfProfile) != SNPE_SUCCESS)
throw std::runtime_error("Failed to set performance profile");

@anyj0527

anyj0527 commented Dec 11, 2025

Copy link
Copy Markdown
Member Author

It seems like you're missing the code to set 'perfProfile'.

if (Snpe_SNPEBuilder_SetPerformanceProfile(snpebuilder_h, perfProfile) != SNPE_SUCCESS)
throw std::runtime_error("Failed to set performance profile");

Thanks! I missed the effective line. I added those, PTAL

@songgot songgot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM 👍

@abhajaswal abhajaswal left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@anyj0527 , LGTM, around 1 ms time difference seen when burst mode is enabled instead of deafult mode

usage:`... custom=Runtime:DSP,...,PerfProfile:"burst" ...`"
- Add support for configuring SNPE performance profiles through custom properties.
- The default performance profile is set to 'BALANCED'
REF:
```
typedef enum
{
  SNPE_PERFORMANCE_PROFILE_DEFAULT = 0,
  SNPE_PERFORMANCE_PROFILE_BALANCED = 0,
  SNPE_PERFORMANCE_PROFILE_HIGH_PERFORMANCE = 1,
  SNPE_PERFORMANCE_PROFILE_POWER_SAVER = 2,
  SNPE_PERFORMANCE_PROFILE_SYSTEM_SETTINGS = 3,
  SNPE_PERFORMANCE_PROFILE_SUSTAINED_HIGH_PERFORMANCE = 4,
  SNPE_PERFORMANCE_PROFILE_BURST = 5,
  SNPE_PERFORMANCE_PROFILE_LOW_POWER_SAVER = 6,
  SNPE_PERFORMANCE_PROFILE_HIGH_POWER_SAVER = 7,
  SNPE_PERFORMANCE_PROFILE_LOW_BALANCED = 8,
  SNPE_PERFORMANCE_PROFILE_EXTREME_POWER_SAVER = 9,
} Snpe_PerformanceProfile_t;
```

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
@anyj0527
anyj0527 merged commit 58667d4 into nnstreamer:main Dec 11, 2025
4 checks passed
@anyj0527
anyj0527 deleted the snpe-perf-profile branch December 11, 2025 10:03
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.

4 participants