Skip to content

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

Closed
dssgabriel wants to merge 1 commit into
mainfrom
feature/fix-stencils-mbt
Closed

fix(benchmarks): attempt to fix 2D stencil MBT(SV) versions#58
dssgabriel wants to merge 1 commit into
mainfrom
feature/fix-stencils-mbt

Conversation

@dssgabriel

@dssgabriel dssgabriel commented Jul 31, 2025

Copy link
Copy Markdown
Collaborator

Description

Trying to fix 2D stencils MBT & MBTSV impls, which do not compute the expected result.

How to reproduce:

cmake -B build \
      -G 'Ninja Multi-Config' \
      -DLayoutTiled_BUILD_BENCHMARKS=ON \
      -DLayoutTiled_BENCHMARKS_ENABLE_CHECKS=ON
cmake --build build --config RelWithDebInfo --target layout_tiled.benchmarks.stencil_2d
./build/benchmarks/RelWithDebInfo/layout_tiled.benchmarks.stencil_2d -n <DIMS>

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 A-benches Area: layout-tiled benchmarks labels Jul 31, 2025
@dssgabriel

Copy link
Copy Markdown
Collaborator Author

@cedricchevalier19 PR is open!

@github-actions

Copy link
Copy Markdown

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v20.1.8) reports: 8 concern(s)
  • benchmarks/stencil_2d.cpp:9:10: error: [clang-diagnostic-error]

    'experimental/mdspan' file not found

        9 | #include <experimental/mdspan>
          |          ^~~~~~~~~~~~~~~~~~~~~
    /home/runner/work/layout-tiled/layout-tiled/benchmarks/stencil_2d.cpp:31:8: warning: constructor does not initialize these fields: output_ [cppcoreguidelines-pro-type-member-init,hicpp-member-init]
       31 | struct Config {
          |        ^
       32 |   uint64_t n_ = 512;
       33 |   uint64_t t_ = 64;
       34 |   uint64_t d_ = 1;
       35 |   std::string output_;
          |                      
          |                      {}
  • benchmarks/stencil_2d.cpp:41:12: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable 'IsMdSpan2D' is non-const and globally accessible, consider making it const

       41 |   requires IsMdSpan2D<MdSpanIn> && IsMdSpan2D<MdSpanOut>
          |            ^
  • benchmarks/stencil_2d.cpp:65:12: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable 'IsMdSpan2D' is non-const and globally accessible, consider making it const

       65 |   requires IsMdSpan2D<MdSpanIn> && IsMdSpan2D<MdSpanOut>
          |            ^
  • benchmarks/stencil_2d.cpp:93:12: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable 'IsMdSpan2D' is non-const and globally accessible, consider making it const

       93 |   requires IsMdSpan2D<MdSpanIn> && IsMdSpan2D<MdSpanOut>
          |            ^
  • benchmarks/stencil_2d.cpp:187:12: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable 'IsMdSpan2D' is non-const and globally accessible, consider making it const

      187 |   requires IsMdSpan2D<MdSpanIn> && IsMdSpan2D<MdSpanOut>
          |            ^
  • benchmarks/stencil_2d.cpp:349:17: warning: [cppcoreguidelines-init-variables]

    variable 'file_stream' is not initialized

      349 |   std::ofstream file_stream;
          |                 ^          
          |                             = 0
  • benchmarks/stencil_2d.cpp:460:7: warning: [cppcoreguidelines-init-variables]

    variable 'opt' is not initialized

      460 |   int opt;
          |       ^  
          |           = 0
  • benchmarks/stencil_2d.cpp:461:17: warning: [concurrency-mt-unsafe]

    function is not thread safe

      461 |   while ((opt = getopt_long(argc, argv, "n:t:d:o:h", long_options, nullptr)) != -1) {
          |                 ^
    /home/runner/work/layout-tiled/layout-tiled/benchmarks/stencil_2d.cpp:461:54: warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,hicpp-no-array-decay]
      461 |   while ((opt = getopt_long(argc, argv, "n:t:d:o:h", long_options, nullptr)) != -1) {
          |                                                      ^

Have any feedback or feature suggestions? Share it here.

github-actions[bot]

This comment was marked as outdated.

@dssgabriel

Copy link
Copy Markdown
Collaborator Author

Closing this as #60 supersedes it (had issues with rebasing this on top of main + wrong branch name).

@dssgabriel dssgabriel closed this Jul 31, 2025
@dssgabriel
dssgabriel deleted the feature/fix-stencils-mbt branch July 31, 2025 17:41
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant