Skip to content

fix: L1 cache benchmark uses wrong buffer size due to case mismatch#693

Open
harp-intel wants to merge 1 commit intomainfrom
fix/l1-cache-size-lookup
Open

fix: L1 cache benchmark uses wrong buffer size due to case mismatch#693
harp-intel wants to merge 1 commit intomainfrom
fix/l1-cache-size-lookup

Conversation

@harp-intel
Copy link
Copy Markdown
Contributor

Summary

  • The cache_size_kb() shell function looks up L1D (uppercase D) in lscpu -C output, but lscpu reports the L1 data cache as L1d (lowercase d). The case-sensitive awk match silently fails, causing the buffer size to fall back to 1 KB instead of the intended half-of-L1d size.
  • Affects both L1 idle latency and L1 max bandwidth cache benchmarks on all platforms.
  • Fix: change the lookup key from L1D to L1d to match lscpu -C output.

Test plan

  • Verify lscpu -C output uses L1d on target platforms (Intel GNR, Intel SRF/CWF, AMD EPYC, etc.)
  • Run cache benchmarks and confirm L1 buffer size is now derived from actual L1d cache size
  • Confirm L2 and L3 benchmarks are unaffected

🤖 Generated with Claude Code

The cache_size_kb() function looks up "L1D" in lscpu -C output, but
lscpu reports the L1 data cache as "L1d" (lowercase d). The
case-sensitive awk match silently fails, causing the buffer size to
fall back to 1 KB instead of the intended half-of-L1d size. This
affects both L1 idle latency and L1 max bandwidth benchmarks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@harp-intel harp-intel requested a review from adgubrud May 1, 2026 22:05
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.

1 participant