Skip to content

[bebop/rushb] Fix bugs in rushB mode to run E2E models - #95

Merged
daiyongyuan merged 10 commits into
mainfrom
fix/rushb-model-e2e
Aug 31, 2026
Merged

[bebop/rushb] Fix bugs in rushB mode to run E2E models#95
daiyongyuan merged 10 commits into
mainfrom
fix/rushb-model-e2e

Conversation

@daiyongyuan

@daiyongyuan daiyongyuan commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • initialize RushB BEMU workers with the topology of their selected Chip.pb endpoint
  • derive ABI accelerator IDs from tile/local Core placement instead of flat Core indices
  • support native x86 model runners and host-pointer DMA for both BEMU and Verilator
  • keep default Pebble Verilator unchanged; select RushB RTL only when --rushB is passed
  • restore toy RushB CI and add multi-tile endpoint coverage

Commit structure

  1. fix(bemu): initialize per-worker topology for rushB
  2. fix(rushb): derive ABI accelerator IDs from Chip.pb
  3. test(rushb): restore toy CI and add multi-tile routing coverage

Dependency PRs

The submodule commits must be merged before updating the final gitlinks on the target branch.

Validation

  • LeNet RushB BEMU: PASS, classification 8
  • LeNet RushB Verilator: PASS, classification 8
  • python3 -m unittest compiler.scripts.tests.test_pb_to_target_registry: PASS
  • nix develop -c cargo test -p bebop-rushb: 2 passed
  • repository pre-commit hooks: PASS


from compiler.scripts.pb_to_target_registry import _rushb_targets


Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is superfluous; there is no testing framework, and no one will maintain it in the future.

Comment thread compiler/lib/RushBRuntime.c Outdated
#define BUCKYBALL_RUSHB_ACCELERATOR_ID 0
#endif

#ifndef BUCKYBALL_RUSHB_CHIP_ID

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variables are prone to conflicts, so why not pass parameters to each function?

Comment thread bb-tests/workloads/CMakeLists.txt Outdated

function(add_buckyball_rushb_native TARGET_NAME)
cmake_parse_arguments(ARG "CXX" "OUTPUT_SUBDIR" "SOURCES;INCLUDE_DIRS;DEPENDS" ${ARGN})
cmake_parse_arguments(ARG "CXX" "OUTPUT_SUBDIR;ACCELERATOR_ID;CHIP_ID" "SOURCES;INCLUDE_DIRS;DEPENDS" ${ARGN})

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what means ACCELERATOR_ID and CHIP_ID, what's the difference?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACCELERATOR_ID identifies a RushB command endpoint and is encoded as (tile_id << 16) | local_accelerator_id. CHIP_ID identifies the top-level Chip/BBSimDRAM instance used for host staging DMA.
Verilator Harness
└── Chip/SoC ← CHIP_ID
├── Tile 0
│ ├── Accelerator 0 ← ACCELERATOR_ID
│ └── Accelerator 1
└── Tile 1
└── Accelerator 0

@shirohasuki shirohasuki Aug 30, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CHIP_ID means toy=0/pebble=1/poly=2/goban=3? Have I got that right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CHIP_ID identifies a chip instance in a multi-chip simulation. In a normal single-chip simulation, CHIP_ID is typically 0 regardless of the design. Multiple cores within one chip are distinguished separately.

@shirohasuki shirohasuki Aug 30, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha, I think it's too early for buckyball to consider a multichip system. I reckon it will still take us a year to build a multi-core system that makes sense. So, I suggest removing them now~

@shirohasuki

Copy link
Copy Markdown
Member

We use the commit message format from the LLVM community.

@shirohasuki shirohasuki changed the title fix(rushb): restore BEMU and Verilator model E2E [bebop/rushb] Fix bugs in rushB mode to run E2E model Aug 30, 2026
@shirohasuki shirohasuki changed the title [bebop/rushb] Fix bugs in rushB mode to run E2E model [bebop/rushb] Fix bugs in rushB mode to run E2E models Aug 30, 2026
@daiyongyuan
daiyongyuan merged commit 4020438 into main Aug 31, 2026
12 of 15 checks 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.

2 participants