Skip to content

Commit 9a9a1e2

Browse files
authored
Docs: align softmax modes and release metadata (#40)
## Summary - fix stale docs references to removed `CLAUDE.md` - correct public API wording in `DEVELOPMENT.md` (`forge_cute_py.ops.<op>()`) - update README benchmark quick reference with softmax benchmark commands and impl-mode notes - clarify current release state in `CONTRIBUTING.md` (`v0.1.0-rc1` exists; final `v0.1.0` pending) - add changelog bullets for softmax impl-mode selection and benchmark CLI updates ## Scope - docs-only patch (`README.md`, `DEVELOPMENT.md`, `ROADMAP.md`, `CHANGELOG.md`, `CONTRIBUTING.md`) - no runtime code changes ## Notes - follow-up to #39
2 parents 7ef01b2 + d9b9517 commit 9a9a1e2

5 files changed

Lines changed: 21 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2323
- Reference implementations for all Week 0-2 operations
2424
- Comprehensive test suite with PyTorch reference validation
2525
- Environment check utility (`forge_cute_py.env_check`)
26-
- Documentation: README, DEVELOPMENT.md (#11), CLAUDE.md, CONTRIBUTING.md with contribution policy (#7)
26+
- Documentation: README, DEVELOPMENT.md (#11), CONTRIBUTING.md with contribution policy (#7)
2727
- Pre-commit hooks installation instructions in CONTRIBUTING.md (#7)
2828
- Support for float16, bfloat16, and float32 dtypes
29+
- `FORGE_SOFTMAX_IMPL` softmax mode selection (`auto`, `ref`, `kernel`)
2930

3031
### Changed
3132
- Modal benchmarks now use strict GPU matching (`!` suffix) for consistent hardware
@@ -37,6 +38,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3738
- Enhanced error messages with device information for better debugging
3839
- Set tolerance to 0 (exact comparison) for transpose correctness tests
3940
- Updated documentation to reflect current three-layer architecture and modern PyTorch patterns
41+
- Added `--impl` to `bench/benchmark_online_softmax.py` and updated benchmark handling for strict kernel mode
4042

4143
### Infrastructure
4244
- Package scaffolding with `pyproject.toml` and proper Python 3.13+ support

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ A change that affects kernels or harness behavior should include:
8686

8787
The project is currently in `v0.1.0` development:
8888
- Focused on harness stabilization and Week 0-2 kernel implementations
89-
- Not yet tagged - will be tagged when v0.1.0 milestones are complete
89+
- Release candidate tag exists: `v0.1.0-rc1`
90+
- Final `v0.1.0` tag is pending completion of remaining milestones
9091
- See [ROADMAP.md](ROADMAP.md) for detailed progress tracking
9192

9293
### Release process (for maintainers)

DEVELOPMENT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pattern:
3131
2. **Public API** (`op_name`): Allocates output tensor, calls internal op, returns
3232
result. For ops with autograd, wraps a `torch.autograd.Function`.
3333

34-
This enables usage via both `forge_cute_py.op_name()` and
34+
This enables usage via both `forge_cute_py.ops.op_name()` and
3535
`torch.ops.forge_cute_py._op_name()`.
3636

3737
### Current implementation status (v0.1)
@@ -41,7 +41,7 @@ This enables usage via both `forge_cute_py.op_name()` and
4141
| `copy_transpose` | CuTe DSL | Fully implemented with tile-based shared memory |
4242
| `reduce` | CuTe DSL | Placeholder (sum only) |
4343
| `reduce_sum` | Reference | Placeholder (awaiting benchmarking) |
44-
| `softmax_online` | Reference | Stub with autograd support (kernel TODO) |
44+
| `softmax_online` | Reference | Stub with autograd support (kernel TODO, mode-gated via `FORGE_SOFTMAX_IMPL`) |
4545

4646
### Development flow
4747

README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
`forge-cute-py` is a project for developing and evaluating **CuTe DSL** kernels in Python.
22

3-
As initially planned, it should provides a workflow to **run kernels, validate correctness against PyTorch references, benchmark performance, and profile**.
3+
As initially planned, it provides a workflow to **run kernels, validate correctness against PyTorch references, benchmark performance, and profile**.
44

55
## Current scope (v0.1)
66

@@ -30,7 +30,7 @@ Not currently in scope for v0: FlashAttention kernels (FA1+), decode/KV-cache, F
3030

3131
```bash
3232
uv sync
33-
````
33+
```
3434

3535
If you need an editable/dev install, use your normal `uv` workflow (project is expected to be runnable via `uv run ...`).
3636

@@ -84,6 +84,8 @@ Run a standalone benchmark:
8484

8585
```bash
8686
uv run python bench/benchmark_copy_transpose.py --tile-size 16
87+
uv run python bench/benchmark_online_softmax.py --impl auto
88+
uv run python bench/benchmark_online_softmax.py --impl kernel
8789
```
8890

8991
Profile a kernel with helper script:
@@ -108,7 +110,7 @@ ncu --set full -o profiles/copy_transpose uv run python bench/benchmark_copy_tra
108110
| copy_transpose | Implemented | tile_size=16/32 | CuTe DSL kernel with tiled shared memory |
109111
| reduce | Implemented (sum only) | - | Placeholder (awaiting benchmarking) |
110112
| reduce_sum | Stub (ref) | - | Placeholder (awaiting benchmarking) |
111-
| softmax_online | Stub (ref) | single-pass | Uses PyTorch reference with autograd support; kernel to be implemented |
113+
| softmax_online | Stub (ref) | single-pass | Reference-backed by default; `FORGE_SOFTMAX_IMPL` can force `ref` or strict `kernel` mode |
112114

113115
---
114116

@@ -150,10 +152,17 @@ uv run pre-commit run --all-files # Run linting/formatting
150152
uv run python bench/run.py --suite smoke # Run benchmark suite
151153
uv run python bench/run.py --suite smoke --out out.json # Save results
152154
uv run python bench/benchmark_copy_transpose.py # Standalone benchmark
153-
uv run python bench/benchmark_reduce.py # Standalone benchmark
155+
uv run python bench/benchmark_reduce.py # Standalone benchmark
156+
uv run python bench/benchmark_online_softmax.py --impl auto # softmax fwd+bwd (fallback allowed)
157+
uv run python bench/benchmark_online_softmax.py --impl kernel # softmax fwd+bwd (hard fail if kernel missing)
154158
modal run bench/modal_bench.py --suite smoke --out results.json # Remote run on B200 via Modal
155159
```
156160

161+
`softmax_online` mode is controlled by `FORGE_SOFTMAX_IMPL`:
162+
- `auto` (default): try kernel first, then fallback to reference.
163+
- `ref`: force reference implementation.
164+
- `kernel`: require kernel implementation and fail fast if unavailable.
165+
157166
### Modal setup (remote benchmarks)
158167
```bash
159168
uv pip install modal

ROADMAP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Target: Harness infrastructure + Week 0-2 kernel implementations aligned to Kern
2323
- [x] Profiling documentation and helper scripts
2424
- [x] CI/CD with ruff linting and formatting
2525
- [x] Pre-commit hooks configuration
26-
- [x] Documentation (README, CONTRIBUTING, CLAUDE.md)
26+
- [x] Documentation (README, CONTRIBUTING, DEVELOPMENT)
2727

2828
### Copy/Transpose Kernel
2929
- [x] CuTe DSL kernel implementation (`forge_cute_py/kernels/copy_transpose.py`)

0 commit comments

Comments
 (0)