Skip to content

Support matrix AB ReadNoSnp in OpenLLC#79

Closed
zykucas wants to merge 1 commit into
for-hbl2-testfrom
feature/matrix-ab-readnosnp
Closed

Support matrix AB ReadNoSnp in OpenLLC#79
zykucas wants to merge 1 commit into
for-hbl2-testfrom
feature/matrix-ab-readnosnp

Conversation

@zykucas

@zykucas zykucas commented Jul 2, 2026

Copy link
Copy Markdown

OpenLLC Matrix A/B Non-Coherent Read Support (ReadNoSnp)

Summary

This PR adds OpenLLC-side support for Matrix A/B non-coherent reads issued as CHI ReadNoSnp.

Together with the matching HBL2 change, Matrix A/B Get requests can bypass the coherent read path and use ReadNoSnp, reducing snoop/ownership overhead for matrix/GEMM workloads.

Changes

  • Added matrixAB metadata to OpenLLC self directory entries.
  • Added ReadNoSnp handling in the LLC MainPipe.
  • Added self/client directory update behavior for ReadNoSnp.
  • Added Matrix A/B replacement handling for cached clean ReadNoSnp lines.
  • Added memory read/refill support for ReadNoSnp.
  • Connected downstream memory CompData into the RefillUnit.
  • Updated ResponseUnit and MemUnit handling for ReadNoSnp / WriteNoSnpFull interactions.
  • Updated RequestArb read classification to include ReadNoSnp.
  • Added a TestTopMatrix switch:
    • --matrix-ab-nc 1: enable Matrix A/B ReadNoSnp
    • --matrix-ab-nc 0: disable it for comparison

Validation

Basic Regression Tests

Test Result Notes
openLLC-test-matrix-trace PASS line_trace-64-1024-64-matrix.txt
openLLC-test-l2l3 PASS finalized at cycle 540000

GEMM Trace Sweep

For openLLC-test-matrix-trace:

The following full GEMM line traces were tested with Matrix A/B ReadNoSnp enabled and disabled.

GEMM Trace ReadNoSnp on ReadNoSnp off Saved cycles Cycle reduction Speedup
line_trace-64-256-64-matrix.txt 16,312 17,324 1,012 5.84% 1.062x
line_trace-64-512-64-matrix.txt 27,580 30,618 3,038 9.92% 1.110x
line_trace-64-1024-64-matrix.txt 51,914 59,066 7,152 12.11% 1.138x
line_trace-64-2048-64-matrix.txt 99,820 115,962 16,142 13.92% 1.162x
line_trace-64-4096-64-matrix.txt 195,898 229,754 33,856 14.74% 1.173x
line_trace-64-8192-64-matrix.txt 388,290 457,338 69,048 15.10% 1.178x
line_trace-64-16384-64-matrix.txt 773,822 912,506 138,684 15.20% 1.179x

Overall GEMM sweep result:

  • Arithmetic mean speedup: 1.143x
  • Arithmetic mean cycle reduction: 12.40%
  • Weighted speedup by total cycles: 1.173x
  • Weighted cycle reduction by total cycles: 14.76%

The benefit increases with the GEMM trace size and stabilizes around 1.18x for the larger traces.

Copy link
Copy Markdown
Member

This work has been migrated to OpenXiangShan/XSAICache#5. Closing this PR in favor of the consolidated implementation there.

@Ivyfeather Ivyfeather closed this Jul 20, 2026
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.

2 participants