agentleFS
sjain-stanfordsjain-stanford/claude-workspace/skills/rocjitsu-build-test/SKILL.md

rocjitsu-build-test

Skill2 starsChanged 22 days agoApache-2.0View on GitHub

Build and verify rocjitsu changes with focused CMake/Ninja targets, CTest, amdisa pytest, formatting, sanitizers, or corpus tests selected by affected subsystem and risk.

  • Installs packages

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 9 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run commands from the active rocjitsu source directory (.../rocm-systems/emulation/rocjitsu), using a build directory inside that same task …

    line 12
  2. Distinctive:

    Use the narrowest test that can falsify the change quickly, then widen coverage as confidence grows.

    line 19
  3. Distinctive:

    Run focused tests by exact name or regex with failure output.

    line 24
  4. Distinctive:

    Run the full local CTest suite when dependencies and time permit.

    line 25
  5. Very specific:

    Run Python tests for amdisa or corpus tooling changes.

    line 26
  6. Distinctive:

    Run formatting on changed files.

    line 27
  7. Distinctive:

    Add sanitizer, corpus, install-tree, or benchmark coverage only when the change or user request justifies its cost.

    line 28
  8. Distinctive:

    Never hide failures by disabling tests, broadening exclusions, or increasing timeouts without diagnosing the reason.

    line 31
  9. Very specific:

    Default developer/review build on the workspace's Linux GCC/Clang toolchain: set WORKSPACE_ROOT to the enclosing meta-workspace, then use …

    line 38
  10. Very specific:

    Keep output directories isolated across different revisions.

    line 60
  11. Distinctive:

    Run the smallest relevant set, then widen:

    line 84
  12. Distinctive:

    Read references/verification-matrix.md to choose subsystem-specific tests and higher-cost checks.

    line 99
  13. Very specific:

    Read and follow docs/style.md in the active rocjitsu task worktree when adding or changing code, and check changed code against it during …

    line 124
  14. Very specific:

    Run pre-commit from the rocm-systems repository root.

    line 129
  15. Distinctive:

    Use separate build directories so modes never contaminate one another:

    line 147

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

rocjitsu Build and Test

Resolve the source repository and qualification branch using the workspace's LOCAL_CONTEXT.md (if present) and rocjitsu-project guidance. NPI qualification must use the designated internal base and task worktree.

Run commands from the active rocjitsu source directory (.../rocm-systems/emulation/rocjitsu), using a build directory inside that same task worktree. Do not modify source while performing a report-only build or test request.

Verification philosophy

Use the narrowest test that can falsify the change quickly, then widen coverage as confidence grows. A normal sequence is:

  1. Configure once for the intended compiler/build mode.
  2. Build the smallest affected target, then the default target.
  3. Run focused tests by exact name or regex with failure output.
  4. Run the full local CTest suite when dependencies and time permit.
  5. Run Python tests for amdisa or corpus tooling changes.
  6. Run formatting on changed files.
  7. Add sanitizer, corpus, install-tree, or benchmark coverage only when the change or user request justifies its cost.

Never hide failures by disabling tests, broadening exclusions, or increasing timeouts without diagnosing the reason. Distinguish sanitizer findings from ordinary assertion failures, hangs, resource contention, external ROCr issues, and known instrumentation blind spots.

Configure and build

Default developer/review build on the workspace's Linux GCC/Clang toolchain: set WORKSPACE_ROOT to the enclosing meta-workspace, then use the compressed-debug initial cache for a new build directory. It preserves full debug information and compresses both objects and linked binaries; rocjitsu's many statically linked test programs otherwise repeat large uncompressed debug sections.

cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  -C "$WORKSPACE_ROOT/skills/rocjitsu-build-test/references/compressed-debug.cmake"
cmake --build build -j "$(nproc)"

The initializer applies only to new cache entries. Preserve an existing build's flags, and do not reconfigure or clean a build while reviewers or tests use it. On another toolchain, verify compiler, linker and debugger support for zstd debug sections before using it; zlib compression is an alternative. Explicit CI reproduction flags take precedence.

Prepare one build per revision/compiler/sanitizer mode and let reviewers reuse its binaries. A separate build is justified for a changed source snapshot, mutation test, sanitizer, or compiler comparison, not merely a new reviewer. Keep output directories isolated across different revisions; a shared writable build tree cannot safely serve several worktrees. A bounded shared ccache can save compilation time but does not eliminate linked binaries on disk.

Release is appropriate for performance/corpus qualification; Debug is useful for assertions and debugging. If the machine is memory constrained, follow CI's conservative worker policy instead of using every core:

cmake --build build -j "$(( ($(nproc) + 1) / 2 ))"

Inspect configure output. HIP and daemon tests are conditionally enabled; a green suite with HIP disabled does not qualify HIP/KFD/daemon behavior. ROCm may be selected with ROCM_PATH when it is not in the default location.

Focused and full tests

List tests before guessing names:

ctest --test-dir build --show-only

Run the smallest relevant set, then widen:

ctest --test-dir build -R '<regex>' --output-on-failure
ctest --test-dir build --output-on-failure -j "$(( ($(nproc) + 1) / 2 ))"

For a GoogleTest binary, listing and filtering directly is useful while iterating:

build/tests/<test-binary> --gtest_list_tests
build/tests/<test-binary> --gtest_filter='<Suite.Case>'

Read references/verification-matrix.md to choose subsystem-specific tests and higher-cost checks.

Python and generated ISA

For generator/parser/semantic changes:

python -m pip install -e lib/python/ pre-commit
python -m pytest lib/python/amdisa/tests -x

Regenerate from the rocm-systems repository root, not from the generated directory:

./emulation/rocjitsu/scripts/generate-amdisa.sh

Review the entire generated diff, ensure every generated output is included, rerun the Python suite, and build/test affected C++ targets. Never patch generated output merely to make a test pass.

Formatting and static analysis

Read and follow docs/style.md in the active rocjitsu task worktree when adding or changing code, and check changed code against it during verification. Passing formatting and static analysis does not replace checking the guide's rules that automated tools do not enforce.

Run pre-commit from the rocm-systems repository root. Prefer changed files for routine iteration; use all files only when requested or when changing the format configuration:

pre-commit run --files <changed-file>...

For clang-tidy qualification, use a separate build directory:

cmake -S . -B build-tidy -G Ninja -DRJ_CLANG_TIDY=ON \
  -C "$WORKSPACE_ROOT/skills/rocjitsu-build-test/references/compressed-debug.cmake"
cmake --build build-tidy -j "$(( ($(nproc) + 1) / 2 ))"

Sanitizers

Use separate build directories so modes never contaminate one another:

cmake -S . -B build-asan -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  -C "$WORKSPACE_ROOT/skills/rocjitsu-build-test/references/compressed-debug.cmake" \
  -DRJ_ENABLE_ASAN=ON -DRJ_ENABLE_UBSAN=ON
cmake --build build-asan -j "$(( ($(nproc) + 1) / 2 ))"
ctest --test-dir build-asan -R '<affected-regex>' --output-on-failure

Available options are RJ_ENABLE_ASAN, RJ_ENABLE_UBSAN, RJ_ENABLE_TSAN, and RJ_ENABLE_MSAN; RJ_SANITIZER_RUNTIME accepts AUTO, SHARED, or STATIC. Do not combine incompatible modes. TSan cannot model synchronization through distinct shared-memory aliases used at the simulator/client boundary; inspect stacks and ownership before classifying or suppressing a report.

Report

Report the checkout and commit, configure mode, whether ROCm/HIP tests were enabled, commands run, passed/failed/skipped tests, and warnings or diagnostics. State explicitly which higher-cost checks were not run and why. A focused pass is evidence for the affected contract, not a claim that the whole project is green.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.