Skip to content

Add SobelFilter to SVE microbenchmark#5040

Merged
LoopedBard3 merged 5 commits intodotnet:mainfrom
ylpoonlg:github-sobelfilter
Mar 23, 2026
Merged

Add SobelFilter to SVE microbenchmark#5040
LoopedBard3 merged 5 commits intodotnet:mainfrom
ylpoonlg:github-sobelfilter

Conversation

@ylpoonlg
Copy link
Copy Markdown
Contributor

Performance Results

Run on Neoverse-V2

Method Size Mean Error StdDev Median Min Max Allocated
Scalar 9 106.89 ns 0.027 ns 0.023 ns 106.89 ns 106.86 ns 106.94 ns -
Vector128SobelFilter 9 47.21 ns 0.007 ns 0.006 ns 47.21 ns 47.20 ns 47.22 ns -
SveSobelFilter 9 28.89 ns 0.134 ns 0.125 ns 28.81 ns 28.77 ns 29.07 ns -
Scalar 64 7,125.25 ns 2.823 ns 2.503 ns 7,124.19 ns 7,122.83 ns 7,130.43 ns -
Vector128SobelFilter 64 1,255.35 ns 0.913 ns 0.854 ns 1,255.21 ns 1,254.21 ns 1,256.87 ns -
SveSobelFilter 64 1,339.70 ns 0.280 ns 0.219 ns 1,339.65 ns 1,339.41 ns 1,340.14 ns -
Scalar 527 507,148.17 ns 324.567 ns 287.720 ns 507,050.40 ns 506,733.19 ns 507,636.12 ns -
Vector128SobelFilter 527 73,998.18 ns 166.540 ns 147.634 ns 73,971.34 ns 73,795.42 ns 74,256.96 ns -
SveSobelFilter 527 100,770.21 ns 1,836.759 ns 1,628.239 ns 100,470.79 ns 96,333.15 ns 103,294.79 ns -

cc @dotnet/arm64-contrib @SwapnilGaikwad @LoopedBard3

LoopedBard3
LoopedBard3 previously approved these changes Mar 17, 2026
Copy link
Copy Markdown
Member

@LoopedBard3 LoopedBard3 left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for the benchmarks!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new SVE-focused microbenchmark for a 2D Sobel filter convolution, enabling comparison of scalar vs AdvSimd (Vector128) vs SVE implementations on Arm64/SVE-capable systems.

Changes:

  • Introduces SobelFilter microbenchmark with Scalar, Vector128SobelFilter, and SveSobelFilter benchmarks.
  • Adds setup/verification scaffolding and Sobel kernel initialization for repeatable runs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread src/benchmarks/micro/sve/SobelFilter.cs
Comment thread src/benchmarks/micro/sve/SobelFilter.cs
Comment thread src/benchmarks/micro/sve/SobelFilter.cs
Comment thread src/benchmarks/micro/sve/SobelFilter.cs Outdated
Comment thread src/benchmarks/micro/sve/SobelFilter.cs Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Member

@LoopedBard3 LoopedBard3 left a comment

Choose a reason for hiding this comment

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

Looks great! Thank you for the tests.

@LoopedBard3 LoopedBard3 merged commit c547019 into dotnet:main Mar 23, 2026
74 checks passed
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.

3 participants