Skip to content

[WIP] cpu: Save selective oracle replay experiment#899

Draft
jensen-yan wants to merge 4 commits into
xs-devfrom
codex/bpu-selective-oracle
Draft

[WIP] cpu: Save selective oracle replay experiment#899
jensen-yan wants to merge 4 commits into
xs-devfrom
codex/bpu-selective-oracle

Conversation

@jensen-yan

Copy link
Copy Markdown
Collaborator

Summary

This draft PR saves the current selective BPU oracle replay experiment for later continuation.

The patch adds CSV record/replay parameters alongside the existing DB replay path:

  • selectiveOracleRecordCSVFile
  • selectiveOracleReplayCSVFile

CSV replay parses the old logical fetch-block format and feeds the existing filtered global replay stream instead of using a per-startPC FIFO. This preserves the useful short-window behavior for the mcf hot branch experiment while keeping the DB code path in place.

Status

This is experimental and not ready to merge as-is.

The short mcf check confirms that per-startPC FIFO was one source of bad alignment:

  • mcf_6388 1.5M, bad FIFO: 0x1088c = 7083/30511
  • mcf_6388 1.5M, CSV global replay: 0x1088c = 1309/30511, TraceMissing = 1

The full 40M check still does not recover the earlier stitched prototype:

  • current CSV global replay: total IPC 0.493201, condMiss 610605, recovery 39759344
  • old stitched prototype: total IPC 0.504425, condMiss 516465, recovery 34001448
  • current CSV global replay has large second-window drift: TraceMissing = 988164

So the remaining issue is replay cursor drift over long runs, not CSV vs DB storage itself.

Validation

  • git diff --check
  • scons build/RISCV/gem5.opt --gold-linker -j64
  • mcf_6388 1.5M CSV replay using /tmp/bpu_oracle_mcf_6388_record_dual/selective_oracle_blocks.csv
  • mcf_6388 40M CSV replay using the same CSV
  • coremark 200K CSV record smoke: generated 27736 blocks and 38063 outcomes

Change-Id: If81aed7f8033ad46741f36159f1122d5b0cf8248
Change-Id: I14c53614b85ca1da2c07502bee8e836db776baa6
Change-Id: I3b30137657501cc2d7939e1b566e02bfd26b01da
Change-Id: Ib70b056521d48c03999bd9ae58633b9804a74d31
@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ec572de9-9410-4bcf-bb2d-094318b023a9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/bpu-selective-oracle

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

🚀 Coremark Smoke Test Results

Branch IPC Change
Base (xs-dev) 2.3168 -
This PR 2.3168 ➡️ 0.0000 (0.00%)

✅ Difftest smoke test passed!

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