[CK] Add project root marker for monorepo compatibility (#4430) ## Summary - Add `.ck-project-root` marker file at the composablekernel project root - Update `find_project_root()` in `script/tools/common.sh` to look for this marker instead of `.git` - Fixes project root detection when CK is part of the rocm-libraries monorepo ## Background Since the project was moved into the monorepo, the `.git` directory is at the monorepo root rather than the CK project root. This caused `find_project_root()` to return the wrong path, breaking tools in `script/tools/`. ## Test plan - [x] Verify `find_project_root` returns correct path from any CK subdirectory - [x] Verify `ck-build --help` works - [x] Verify `ck-configure --help` works Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Thomas Ning <Thomas.Ning@amd.com>
Composable Kernel Tools
This directory contains utility tools for building, testing, and analyzing Composable Kernel.
These tools are designed to be LLM-agnostic and can be used with any AI assistant or directly from the command line.
Available Tools
ck-docker
Build and test composable_kernel in Docker with ROCm support.
See README_ck-docker.md for details.
Quick start:
# Add to PATH
export PATH="$PATH:$PWD/script/tools"
# Start container and build
ck-docker start
ck-docker build test_amdgcn_mma
ck-docker test test_amdgcn_mma
ck-build-analysis
Analyze Composable Kernel build times using Clang's -ftime-trace profiler.
See README_ck-build-analysis.md for details.
Quick start:
# Add to PATH
export PATH="$PATH:$PWD/script/tools"
# Analyze build time
ck-build-analysis example_convnd_fwd_xdl_fp8
LLM Assistant Integration
These tools can be used as-is with any LLM assistant by providing the tool documentation to the assistant. The assistant can then invoke these tools on your behalf.
For example, you can ask:
- "Start the docker container"
- "Build and test test_amdgcn_mma"
- "Analyze build time for example_convnd_fwd_xdl_fp8"
The assistant will translate your natural language request into the appropriate tool invocation.
Dependencies
- ck-docker: Requires Docker and ROCm-capable GPU (for running tests)
- ck-build-analysis: Requires Docker, automatically installs Python dependencies (jinja2) via
uv
Directory Structure
script/tools/
├── README.md # This file
├── README_ck-docker.md # Documentation for ck-docker
├── README_ck-build-analysis.md # Documentation for ck-build-analysis
├── ck-docker # Docker container management tool
├── ck-build-analysis # Build time analysis tool
├── common.sh # Shared utilities for bash scripts
├── analyze_build_trace.py # Python script for trace analysis (PEP 723 compliant)
└── templates/
└── build_analysis_report.md.jinja # Jinja2 template for analysis reports
Contributing
When adding new tools to this directory:
- Keep them LLM-agnostic (avoid hardcoding references to specific AI assistants)
- Provide clear command-line usage documentation
- Include examples for both CLI and LLM assistant usage
- Follow the existing naming convention and structure