This is an archive of the discontinued LLVM Phabricator instance.

[libc][benchmark] Fix wrong BatchSize leading to data not fitting in L1.
ClosedPublic

Authored by gchatelet on Nov 16 2022, 3:04 AM.

Diff Detail

Event Timeline

gchatelet created this revision.Nov 16 2022, 3:04 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptNov 16 2022, 3:04 AM
gchatelet requested review of this revision.Nov 16 2022, 3:04 AM
gchatelet added inline comments.Nov 16 2022, 3:06 AM
libc/benchmarks/LibcMemoryBenchmark.cpp
85–86

The error is here. It always should have been ParameterStorageBytes but we were using BufferSize.

courbet accepted this revision.Nov 16 2022, 4:40 AM
courbet added inline comments.
libc/benchmarks/LibcMemoryBenchmark.cpp
92

The error message is not very useful. Maybe something along the lines of:

We're splitting a buffer of the size of the L1 cache between a data buffer and a benchmark parameters buffer, so by construction the total shoul dnot exceed the size of the L1 cache

This revision is now accepted and ready to land.Nov 16 2022, 4:40 AM
gchatelet updated this revision to Diff 475779.Nov 16 2022, 4:52 AM
gchatelet marked an inline comment as done.
  • Update error message
This revision was landed with ongoing or failed builds.Nov 16 2022, 4:56 AM
This revision was automatically updated to reflect the committed changes.
gchatelet added inline comments.Nov 16 2022, 4:56 AM
libc/benchmarks/LibcMemoryBenchmark.cpp
92

Much better, thx!