Skip to content

Add a per-simulator observer for accepted L2 cache accesses - #151

Open
Fduzyx wants to merge 1 commit into
accel-sim:devfrom
Fduzyx:feature/l2-cache-event-observer
Open

Fduzyx wants to merge 1 commit into
accel-sim:devfrom
Fduzyx:feature/l2-cache-event-observer

Conversation

@Fduzyx

@Fduzyx Fduzyx commented Nov 3, 2026

Copy link
Copy Markdown

Expose accepted L2 data_cache::access() calls through an optional per-simulator callback. This lets integrations collect cache events without adding tool-specific counters or dependencies to the simulator. Records carry native access types and statistics statuses, request metadata, the original access address, and separate GPU-cycle and cache-call timestamps.

Notifications follow the existing statistics updates. Reservation failures, fills, and supplementary accounting do not create additional events. Existing access results and request handling remain in place. An unregistered observer incurs level/pointer checks without constructing records or allocating memory. The non-owning callback must be non-throwing and follow the documented thread, lifetime, and non-reentrancy requirements.

Add opt-in CMake tests, run them from the existing CMake CI script, and document event semantics and usage.

Validation against dev 4195dd4f229cbf03f4f38c49139ae94d01d23f03:

  • Baseline and candidate CMake Release builds passed with GCC 13.3, CMake 3.28.3, and CUDA 12.8.61; CTest passed 2/2 tests.
  • Directed production-cache tests cover lifecycle errors, pending hits, sector misses, rejection/retry, address mutation, write allocation, and non-global access types. Ten native-behavior summaries match unmodified dev and remain unchanged with an observer attached and after unregistration.
  • Replayed existing Rodinia backprop 4096 SASS traces through Accel-Sim 7ba54ded60c4ba0083410c37d22d719166acd6dc: baseline, candidate without an observer, and candidate with an observer all completed both kernels. After excluding build banners, wall-clock/rate lines, and the observer summary, all 7,000 remaining output lines matched. Each run produced 14,731 simulated cycles and 10,473,824 simulated instructions. All 61,275 observed events matched the native accepted-access counts, including each status bucket.

The workload check is trace replay, not a fresh CUDA execution or numerical-output validation. Hopper coalescer/forwarding integration, runtime overhead, other toolchains, and remote CI remain untested. No zero-overhead or performance benefit is claimed. No PMU implementation, RTL, MMU integration, or additional simulator dependency is included.

Expose accepted L2 accesses through an optional per-instance callback.
Preserve native status semantics and document the callback lifetime contract.

Add directed cache and lifecycle tests to the CMake CI path.
@Fduzyx

Fduzyx commented Nov 4, 2026

Copy link
Copy Markdown
Author

Hi maintainers, the CI Tests run is awaiting maintainer approval. Could you please approve the workflow when convenient? Local validation results are included in the PR description. Thank you!

@JRPan

JRPan commented Nov 4, 2026

Copy link
Copy Markdown

Thanks. I'll take a look. Later

@accel-sim accel-sim deleted a comment from github-actions Bot Nov 4, 2026
@Fduzyx

Fduzyx commented Nov 6, 2026

Copy link
Copy Markdown
Author

Thanks for taking a look. The AI review run appears to have ended without a completed review.

The runner checked out dev, then tried to read files added by this PR, including src/gpgpu-sim/l2-cache-observer.h and tests/l2-observer/. These files are present in PR commit 2beb8a4, but absent from the checked-out base branch.

The log contains no final verdict or specific findings, and the workflow defaults to CONCERNS when no verdict is produced.

Could you please clear the ai-concerns label and route this PR for human review? I'm happy to address any concrete feedback. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants