workload-tests
Skill1 starsChanged 2 months agoApache-2.0View on GitHub
Design, add, reorganize, or review Buckyball Ball, thread, and chip workload tests and their regression manifests.
In this repository25 other files it gives its agents.
- agent-runtimeSkill
- ball-alignSkill
- canvas-clientSkill
- checkSkill
- chip-designerSkill
- collaboration-panelSkill
- debug-bemuSkill
- debug-compilerSkill
- debug-p2eSkill
- debug-performanceSkill
- debug-verilatorSkill
- domain-modelingSkill
- graph-contractSkill
- grillingSkill
- grill-with-docsSkill
- ip-designerSkill
- model-optimizeSkill
- model-portSkill
- model-recipeSkill
- plugin-verifySkill
- programming-principlesSkill
- repo-installSkill
- reportSkill
- role-identitySkill
- waveformSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 7 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this skill for tests under examples/*/workloads, bb-tests/workloads, and chip regression manifests.
- Very specific: line 22
Do not call a test full_bank merely because it is a BankOp.
- Distinctive: line 36
Keep CTest and BallOp inputs small and hand-checkable.
- Distinctive: line 39
Do not add standalone "contract tests." If a Ball cannot operate at the active geometry, make its CMake configuration fail with the Ball …
- Very specific: line 60
Put heterogeneous paths in separate C files in one workload directory.
- Distinctive: line 62
Use the shared bare-metal/Linux multicore runtime.
- Distinctive: line 76
Every active test must be registered in its local CMake file and built by its layer's aggregate target.
- Very specific: line 88
Do not use search_path, paths in the manifest, per-workload pk/trace flags.
- Distinctive: line 90
Add small CTests and BallOps to Verilator manifests.
- Distinctive: line 93
After a rename or move, verify every manifest file name has exactly one match in the freshly synchronized output.
- Distinctive: line 100
Run the appropriate BEMU and Verilator regressions.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Workload Tests
Use this skill for tests under examples/*/workloads, bb-tests/workloads,
and chip regression manifests. Keep the test's layer, scale, backend, and name
explicit.
Test layers
| Layer | Purpose | Scale | Primary backend |
| CTest | One Ball instruction or a small direct consumer | About 32x16 | Verilator and BEMU |
| BallOp MLIR | One Ball dialect operation and its lowering | Small | Verilator and BEMU |
| BankOp MLIR | Bank SSA allocation, mapping, and at least one bank's worth of meaningful work | Active bank geometry | BEMU |
| Thread | Integration of the Balls belonging to one thread | Small, realistic composition | BEMU and Verilator where supported |
| Chip | Cross-thread, memory-domain, or multi-Ball integration | Small, realistic composition | BEMU; Verilator where supported |
Do not call a test full_bank merely because it is a BankOp. Name the operation,
layout, data pattern, or boundary it proves, for example
im2col_k3_windows or toint8_i32_pack16.
Source and coverage rules
- One focused test per source file. No multiple
mains, multipleRUNcases, or case-switching test files. - A test source, including generated MLIR input, must not exceed 100 lines. Split by behavior instead of moving test logic into a large shared helper.
- Preserve distinct coverage when reorganizing. Do not delete an old test until a registered replacement covers the same behavior at the correct layer. Kernel-size, padding, layout, tail, accumulation, and sequencing variants are distinct coverage unless proven otherwise.
- Keep CTest and BallOp inputs small and hand-checkable. BankOp tests must exercise real computation over at least one configured bank, not a unit-scale, identity-table, or no-op data path dressed up as a bank test.
- Do not add standalone "contract tests." If a Ball cannot operate at the active geometry, make its CMake configuration fail with the Ball name, required geometry, and actual generated values.
Parameters and configuration
- Geometry and topology come from the active chip's
chip.pband generated headers (params.h,topology.h), never from fixed bank depths, widths, thread counts, or shared-bank bases in a test. - Derive row/lanes/counts from generated parameters where the Ball ISA does not fix them. ISA-fixed dimensions such as a 16x16 array may remain explicit.
- A test must continue to mean the same thing after valid chip parameter changes. Reject unsupported geometries at configuration time; do not clamp, silently shrink, or provide a fallback.
Multicore chip tests
- Build one workload ELF. It dispatches with
bb_get_thread_id(); the framework does not know role names or choose a leader after boot. bb_get_thread_id()returns{core, thread}. Cores are homogeneous; thread-level paths may differ within a core.- Put heterogeneous paths in separate C files in one workload directory. The
*-main.cppfile only owns shared state and dispatches by{core, thread}. - Use the shared bare-metal/Linux multicore runtime. Thread 0 performs the existing level-one boot and reports completion; do not recreate a parallel boot protocol in individual tests.
Registration and regression
- Workload names always begin with
<chip>-<thread>-. The two naming entry points arebuckyball_ctest_name(thread, test_id), which produces<chip>-<thread>-ctest-<test_id>, andbuckyball_mlirtest_name(thread, test_id), which produces<chip>-<thread>-mlirtest-<test_id>. Each test owns itstest_id. For example, CTest IDs may bemvin_2d,thread-conv_pipeline, orchip-shared_transpose; MLIR IDs may beball_transpose_i8orbank_quant_i32_pack16. Do not add local name-formatting helpers. - Every active test must be registered in its local CMake file and built by its layer's aggregate target. A source present on disk but absent from an aggregate is not coverage.
Regression manifests list only the complete workload file name:
[workloads] tests = ["pebble-pebble-ctest-example-baremetal"]A workload file name must be unique under
bb-tests/output. The runner scans that output root and fails if the name is missing or has multiple matches. Do not usesearch_path, paths in the manifest, per-workloadpk/trace flags. Backend selection and tracing belong to the runner.- Add small CTests and BallOps to Verilator manifests. Add BankOps to BEMU manifests. Add thread/chip tests to every backend that actually supports that chip; do not claim coverage through stale or non-existent artifacts.
- After a rename or move, verify every manifest file name has exactly one match in the freshly synchronized output.
Completion checks
- Enforce the line limit and confirm one test per source.
- Build the relevant CTest and MLIR aggregate targets with
-O2. - Run the appropriate BEMU and Verilator regressions. Use BEMU trace when diagnosing or when the batch configuration enables it; trace is a backend setting, not a workload attribute.
- Report the tests added, migrated, and deliberately removed, plus any unsupported geometry that now fails explicitly.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

