Skip to content

balar: shared packet wire ABI + coherence-aware DoorbellTestCPU and contract tests#2690

Open
nab880 wants to merge 11 commits into
sstsimulator:develfrom
nab880:pr1-balar
Open

balar: shared packet wire ABI + coherence-aware DoorbellTestCPU and contract tests#2690
nab880 wants to merge 11 commits into
sstsimulator:develfrom
nab880:pr1-balar

Conversation

@nab880

@nab880 nab880 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

The existing balar_packet.h pulls in the CUDA toolkit headers (builtin_types.h, driver_types.h) and wraps everything in SST C++ namespaces. That makes the byte layout impossible to share with any peer that isn't a full SST/CUDA C++ translation unit — there was no safe, dependency-light way for another driver to agree on exactly what bytes balar expects.

This PR factors the on-the-wire definitions out of balar_packet.h into a new standalone header, balar_packet_wire.

Contributions:

  1. Share Balar's packet layout with non-SST/CUDA drivers (balar_packet_wire.h)
  2. Test coverage for a coverage for the cached-write → flush → doorbell path. (BalarTestCPU)
  3. Fix per-copy buffer leak on the device-to-host memcpy path

nab880 added 10 commits June 22, 2026 20:48
Add balar_test_topology.py (merlin router + coherent Bus for Doorbell P3)
Add contract SDL tests: doorbell, malloc_free, coherent_bus, wide_packet
Introduces a Doorbell-pattern test CPU that mirrors Doorbell's dual-interface
behavior without modifying BalarTestCPU, balarMMIO, or dmaEngine:
…ader

Centralize BalarCudaCallPacket_t in balar_packet_wire.h for host and firmware.
Stream compact MMIO returns for sysmode so QEMU can receive malloc handles and D2H data directly.
DoorbellTestCPU read the enable_memcpy_dump parameter but never used it. Dump the GPU sim (and reference) D2H...
… wire-ABI size asserts

Free the D2H simulator buffer (kept alive only via a balar-owned copy for validation); skip blank trace lines and fatal on unrecognized ones; use int64 for integer kernel args; free per-memcpy parser buffers; assert fallback CUDA struct sizes.
@sst-autotester

Copy link
Copy Markdown
Contributor

Status Flag 'Pre-Test Inspection' - Auto Inspected - Inspection is Not Necessary for this Pull Request.

@sst-autotester

Copy link
Copy Markdown
Contributor

Status Flag 'Pull Request AutoTester' - Failure: Timed out waiting for job SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements to start: Total Wait = 303

  • Other jobs have been previously started - We must stop them...

@sst-autotester

Copy link
Copy Markdown
Contributor

Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects:

Pull Request Auto Testing STARTING (click to expand)

Build Information

Test Name: SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements

  • Build Num: 2804
  • Status: STARTED

Build Information

Test Name: SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements_Make-Dist

  • Build Num: 1562
  • Status: STARTED

Build Information

Test Name: SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements_MT-2

  • Build Num: 2745
  • Status: STARTED

Build Information

Test Name: SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements_MR-2

  • Build Num: 2747
  • Status: STARTED

Build Information

Test Name: SST__Autotest_OSX-15-XC16_OMPI-4.1.6_PY3.10_sst-elements

  • Build Num: 1281
  • Status: STARTED

Using Repos:

Repo: ELEMENTS (nab880/sst-elements)
  • Branch: pr1-balar
  • SHA: 511a463
  • Mode: TEST_REPO
Repo: SQE (sstsimulator/sst-sqe)
  • Branch: devel
  • SHA: 3ce9dcdfae6aac9c50ae14ecadcf6cb736621ea5
  • Mode: SUPPORT_REPO
Repo: CORE (sstsimulator/sst-core)
  • Branch: devel
  • SHA: 032b1346e027675cbdeca98c0cffa6bf536e5c72
  • Mode: SUPPORT_REPO
Repo: MACRO (sstsimulator/sst-macro)
  • Branch: devel
  • SHA: cd50ac2eb723b7fd3e78b02b65e3a7ba7250c618
  • Mode: SUPPORT_REPO

Pull Request Author: nab880

@sst-autotester

Copy link
Copy Markdown
Contributor

Status Flag 'Pull Request AutoTester' - Jenkins Testing: 1 or more Jobs FAILED

Note: Testing will normally be attempted again in approx. 8 Hrs. If a change to the PR source branch occurs, the testing will be attempted again on next available autotester run.

Pull Request Auto Testing has FAILED (click to expand)

Job: SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements

  • Result: PASSED
  • Build #: 2804
  • URL: Jenkins server at https://sst-jenkins.sandia.gov/view/SST/job/SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements/2804/consoleFull

Job: SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements_Make-Dist

  • Result: FAILED
  • Build #: 1562
  • URL: Jenkins server at https://sst-jenkins.sandia.gov/view/SST/job/SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements_Make-Dist/1562/consoleFull
  • Job: - Status: FAILURE

Job: SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements_MT-2

  • Result: PASSED
  • Build #: 2745
  • URL: Jenkins server at https://sst-jenkins.sandia.gov/view/SST/job/SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements_MT-2/2745/consoleFull

Job: SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements_MR-2

  • Result: PASSED
  • Build #: 2747
  • URL: Jenkins server at https://sst-jenkins.sandia.gov/view/SST/job/SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements_MR-2/2747/consoleFull

Job: SST__Autotest_OSX-15-XC16_OMPI-4.1.6_PY3.10_sst-elements

  • Result: PASSED
  • Build #: 1281
  • URL: Jenkins server at https://sst-jenkins.sandia.gov/view/SST/job/SST__Autotest_OSX-15-XC16_OMPI-4.1.6_PY3.10_sst-elements/1281/consoleFull

balar_packet.h now includes balar_packet_wire.h, so the test harness must
symlink the wire header alongside balar_packet.h/balar_consts.h.
@sst-autotester

Copy link
Copy Markdown
Contributor

Status Flag 'Pre-Test Inspection' - Auto Inspected - Inspection is Not Necessary for this Pull Request.

@sst-autotester

Copy link
Copy Markdown
Contributor

Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects:

Pull Request Auto Testing STARTING (click to expand)

Build Information

Test Name: SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements

  • Build Num: 2806
  • Status: STARTED

Build Information

Test Name: SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements_Make-Dist

  • Build Num: 1564
  • Status: STARTED

Build Information

Test Name: SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements_MT-2

  • Build Num: 2747
  • Status: STARTED

Build Information

Test Name: SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements_MR-2

  • Build Num: 2749
  • Status: STARTED

Build Information

Test Name: SST__Autotest_OSX-15-XC16_OMPI-4.1.6_PY3.10_sst-elements

  • Build Num: 1283
  • Status: STARTED

Using Repos:

Repo: ELEMENTS (nab880/sst-elements)
  • Branch: pr1-balar
  • SHA: 792f965
  • Mode: TEST_REPO
Repo: SQE (sstsimulator/sst-sqe)
  • Branch: devel
  • SHA: 3ce9dcdfae6aac9c50ae14ecadcf6cb736621ea5
  • Mode: SUPPORT_REPO
Repo: CORE (sstsimulator/sst-core)
  • Branch: devel
  • SHA: 032b1346e027675cbdeca98c0cffa6bf536e5c72
  • Mode: SUPPORT_REPO
Repo: MACRO (sstsimulator/sst-macro)
  • Branch: devel
  • SHA: cd50ac2eb723b7fd3e78b02b65e3a7ba7250c618
  • Mode: SUPPORT_REPO

Pull Request Author: nab880

@sst-autotester

Copy link
Copy Markdown
Contributor

Status Flag 'Pull Request AutoTester' - Jenkins Testing: all Jobs PASSED

Pull Request Auto Testing has PASSED (click to expand)

Build Information

Test Name: SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements

  • Build Num: 2806
  • Status: PASSED

Build Information

Test Name: SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements_Make-Dist

  • Build Num: 1564
  • Status: PASSED

Build Information

Test Name: SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements_MT-2

  • Build Num: 2747
  • Status: PASSED

Build Information

Test Name: SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements_MR-2

  • Build Num: 2749
  • Status: PASSED

Build Information

Test Name: SST__Autotest_OSX-15-XC16_OMPI-4.1.6_PY3.10_sst-elements

  • Build Num: 1283
  • Status: PASSED

@sst-autotester

Copy link
Copy Markdown
Contributor

Status Flag 'Pre-Merge Inspection' - - This Pull Request Requires Inspection... The code must be inspected by a member of the Team before Testing/Merging
NO REVIEWS HAVE BEEN PERFORMED ON THIS PULL REQUEST!

@sst-autotester

Copy link
Copy Markdown
Contributor

All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur...

@berquist berquist added this to the SST v16.1.0 milestone Jun 25, 2026
@sst-autotester

Copy link
Copy Markdown
Contributor

All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur...

4 similar comments
@sst-autotester

Copy link
Copy Markdown
Contributor

All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur...

@sst-autotester

Copy link
Copy Markdown
Contributor

All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur...

@sst-autotester

Copy link
Copy Markdown
Contributor

All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur...

@sst-autotester

Copy link
Copy Markdown
Contributor

All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur...

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.

3 participants