Skip to content

fix(benchmarks): attempt to fix 2D stencil MBT(SV) versions#60

Open
dssgabriel wants to merge 5 commits into
mainfrom
fix/2d-stencil-mbt-impls
Open

fix(benchmarks): attempt to fix 2D stencil MBT(SV) versions#60
dssgabriel wants to merge 5 commits into
mainfrom
fix/2d-stencil-mbt-impls

Conversation

@dssgabriel

Copy link
Copy Markdown
Collaborator

Description

This PR is an attempt to fix the MBT and MBTSV implementations of the 2D stencil benchmark.

Related issue(s): #59

Scope: benchmarks

Type of change: fix

Checklist

  • New or existing tests cover these changes.

@dssgabriel dssgabriel self-assigned this Jul 31, 2025
@dssgabriel dssgabriel added C-enhancement Category: an enhancement or bug fix E-help-wanted Call for participation: help is requested A-benches Area: layout-tiled benchmarks labels Jul 31, 2025
@github-actions

github-actions Bot commented Jul 31, 2025

Copy link
Copy Markdown

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-format (v20.1.8) reports: 2 file(s) not formatted
  • benchmarks/stencil_2d.cpp
  • benchmarks/utils.hpp
clang-tidy (v20.1.8) reports: 6 concern(s)
  • benchmarks/stencil_2d.cpp:484:56: error: [clang-diagnostic-error]

    no matching function for call to 'cache_blocked'

      484 |   bs.run(fmt::format("R cb-{0}x{0}", TILE_L1), [&]() { cache_blocked<TILE_L1, TILE_L1>(mlr_in, mlr_out, cfg.d_); });
          |                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/runner/work/layout-tiled/layout-tiled/benchmarks/stencil_2d.cpp:66:6: note: candidate function template not viable: requires 2 arguments, but 3 were provided
       66 | auto cache_blocked(const MdSpanIn in, MdSpanOut out) -> void {
          |      ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/runner/work/layout-tiled/layout-tiled/benchmarks/stencil_2d.cpp:94:6: note: candidate function template not viable: requires at least 4 arguments, but 3 were provided
       94 | auto cache_blocked(const MdSpanIn in, MdSpanOut out, size_t TM, size_t TN, size_t D = DELTA) -> void {
          |      ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • benchmarks/stencil_2d.cpp:485:56: error: [clang-diagnostic-error]

    no matching function for call to 'cache_blocked'

      485 |   bs.run(fmt::format("R cb-{0}x{0}", TILE_L2), [&]() { cache_blocked<TILE_L2, TILE_L2>(mlr_in, mlr_out, cfg.d_); });
          |                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/runner/work/layout-tiled/layout-tiled/benchmarks/stencil_2d.cpp:66:6: note: candidate function template not viable: requires 2 arguments, but 3 were provided
       66 | auto cache_blocked(const MdSpanIn in, MdSpanOut out) -> void {
          |      ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/runner/work/layout-tiled/layout-tiled/benchmarks/stencil_2d.cpp:94:6: note: candidate function template not viable: requires at least 4 arguments, but 3 were provided
       94 | auto cache_blocked(const MdSpanIn in, MdSpanOut out, size_t TM, size_t TN, size_t D = DELTA) -> void {
          |      ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • benchmarks/stencil_2d.cpp:494:5: error: [clang-diagnostic-error]

    no matching function for call to 'manual_blocked_tiled'

      494 |     manual_blocked_tiled<TILE_L1, TILE_L1>(mlrtr_l1_in, mlrtr_l1_out, cfg.d_);
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/runner/work/layout-tiled/layout-tiled/benchmarks/stencil_2d.cpp:122:6: note: candidate function template not viable: requires 2 arguments, but 3 were provided
      122 | auto manual_blocked_tiled(const MdSpanIn in, MdSpanOut out) -> void {
          |      ^                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/runner/work/layout-tiled/layout-tiled/benchmarks/stencil_2d.cpp:276:6: note: candidate function template not viable: requires at least 4 arguments, but 3 were provided
      276 | auto manual_blocked_tiled(MdSpanIn in, MdSpanOut out, size_t TM, size_t TN, size_t D = DELTA) -> void {
          |      ^                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • benchmarks/stencil_2d.cpp:497:5: error: [clang-diagnostic-error]

    no matching function for call to 'manual_blocked_tiled'

      497 |     manual_blocked_tiled<TILE_L2, TILE_L2>(mlrtr_l2_in, mlrtr_l2_out, cfg.d_);
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/runner/work/layout-tiled/layout-tiled/benchmarks/stencil_2d.cpp:122:6: note: candidate function template not viable: requires 2 arguments, but 3 were provided
      122 | auto manual_blocked_tiled(const MdSpanIn in, MdSpanOut out) -> void {
          |      ^                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/runner/work/layout-tiled/layout-tiled/benchmarks/stencil_2d.cpp:276:6: note: candidate function template not viable: requires at least 4 arguments, but 3 were provided
      276 | auto manual_blocked_tiled(MdSpanIn in, MdSpanOut out, size_t TM, size_t TN, size_t D = DELTA) -> void {
          |      ^                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • benchmarks/stencil_2d.cpp:504:5: error: [clang-diagnostic-error]

    no matching function for call to 'manual_blocked_tiled_subview'

      504 |     manual_blocked_tiled_subview<TILE_L1, TILE_L1>(mlrtr_l1_in, mlrtr_l1_out, cfg.d_);
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/runner/work/layout-tiled/layout-tiled/benchmarks/stencil_2d.cpp:316:6: note: candidate function template not viable: requires 2 arguments, but 3 were provided
      316 | auto manual_blocked_tiled_subview(const MdSpanIn in, MdSpanOut out) -> void {
          |      ^                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • benchmarks/stencil_2d.cpp:507:5: error: [clang-diagnostic-error]

    no matching function for call to 'manual_blocked_tiled_subview'

      507 |     manual_blocked_tiled_subview<TILE_L2, TILE_L2>(mlrtr_l2_in, mlrtr_l2_out, cfg.d_);
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/runner/work/layout-tiled/layout-tiled/benchmarks/stencil_2d.cpp:316:6: note: candidate function template not viable: requires 2 arguments, but 3 were provided
      316 | auto manual_blocked_tiled_subview(const MdSpanIn in, MdSpanOut out) -> void {
          |      ^                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/runner/work/layout-tiled/layout-tiled/benchmarks/stencil_2d.cpp:530:10: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays]
      530 |   static struct option long_options[] = {
          |          ^

Have any feedback or feature suggestions? Share it here.

Explain the process with additional diagrams in an attempt to fix the 2D
stencil MBT impl

Signed-off-by: Gabriel Dos Santos <gabriel.dossantos@cea.fr>
Signed-off-by: Gabriel Dos Santos <gabriel.dossantos@cea.fr>
Signed-off-by: Gabriel Dos Santos <gabriel.dossantos@cea.fr>
@dssgabriel dssgabriel force-pushed the fix/2d-stencil-mbt-impls branch from 7386f3a to d782409 Compare August 1, 2025 15:31
Signed-off-by: Gabriel Dos Santos <gabriel.dossantos@cea.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-benches Area: layout-tiled benchmarks C-enhancement Category: an enhancement or bug fix E-help-wanted Call for participation: help is requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant