Skip to content

[Codegen][CPU] Add design doc for the LLVMCPU C-ukernel framework.#24573

Open
bjacob wants to merge 1 commit into
users/bjacob/cpu-ukernel-bodiesfrom
users/bjacob/cpu-ukernel-design-doc
Open

[Codegen][CPU] Add design doc for the LLVMCPU C-ukernel framework.#24573
bjacob wants to merge 1 commit into
users/bjacob/cpu-ukernel-bodiesfrom
users/bjacob/cpu-ukernel-design-doc

Conversation

@bjacob

@bjacob bjacob commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Adds README.md for compiler/plugins/target/LLVMCPU/builtins/ukernel/ as a single final documentation commit, rather than iterating the doc across the earlier framework commits (less churn for review).

Covers: scope (the framework is op-agnostic in principle, with inner_tiled as the initial and primary case getting the detailed treatment — inner-K-loop-only contract, and how specialization splits between symbol selection on the MMAIntrinsic and post-inlining loop unrolling on the intrinsics_{m,n,k} factors); the two structural pillars (lives in compiler/, bitcode-only; self-contained IR via hal.executable_object); the end-to-end lowering flow; the --iree-llvmcpu-enable-llvm-ukernels user flag; bring-your-own-ukernel; an authoring guide; testing at both the lit (compiler IR) and tests/e2e/matmul (numerical) levels; and the three seed examples.

Progress towards #24574.

@bjacob bjacob force-pushed the users/bjacob/cpu-ukernel-bodies branch from 8af2850 to cb00012 Compare June 5, 2026 15:17
@bjacob bjacob force-pushed the users/bjacob/cpu-ukernel-design-doc branch from 678d998 to e911197 Compare June 5, 2026 15:17
@bjacob bjacob force-pushed the users/bjacob/cpu-ukernel-bodies branch from cb00012 to 6cd0524 Compare June 5, 2026 15:19
@bjacob bjacob force-pushed the users/bjacob/cpu-ukernel-design-doc branch from e911197 to 309ffdf Compare June 5, 2026 15:19
@bjacob bjacob force-pushed the users/bjacob/cpu-ukernel-bodies branch from 6cd0524 to fc522fd Compare June 5, 2026 18:53
@bjacob bjacob force-pushed the users/bjacob/cpu-ukernel-design-doc branch from 309ffdf to 8af5f8e Compare June 5, 2026 18:53
@bjacob bjacob force-pushed the users/bjacob/cpu-ukernel-bodies branch from fc522fd to 5fb2905 Compare June 8, 2026 14:25
@bjacob bjacob force-pushed the users/bjacob/cpu-ukernel-design-doc branch 2 times, most recently from 0b48eed to be4ec36 Compare June 8, 2026 14:33
@bjacob bjacob force-pushed the users/bjacob/cpu-ukernel-bodies branch from 5fb2905 to 6ec426f Compare June 8, 2026 14:33
@bjacob bjacob force-pushed the users/bjacob/cpu-ukernel-design-doc branch 2 times, most recently from e840eb0 to c47ea03 Compare June 11, 2026 15:23
@bjacob bjacob force-pushed the users/bjacob/cpu-ukernel-bodies branch from 6602e64 to 18678c3 Compare June 11, 2026 15:23
@bjacob bjacob force-pushed the users/bjacob/cpu-ukernel-design-doc branch from c47ea03 to c7aa269 Compare June 11, 2026 16:27
@bjacob bjacob force-pushed the users/bjacob/cpu-ukernel-bodies branch from 18678c3 to a9f88d9 Compare June 11, 2026 16:27
@bjacob bjacob marked this pull request as ready for review June 11, 2026 18:45
@bjacob bjacob requested a review from egebeysel June 11, 2026 18:46
@bjacob bjacob force-pushed the users/bjacob/cpu-ukernel-bodies branch from a9f88d9 to b60f897 Compare June 16, 2026 20:07
@bjacob bjacob force-pushed the users/bjacob/cpu-ukernel-design-doc branch 2 times, most recently from f896f19 to d467c2c Compare June 16, 2026 20:15
@bjacob bjacob force-pushed the users/bjacob/cpu-ukernel-bodies branch from b60f897 to 6c0ae40 Compare June 17, 2026 13:40
@bjacob bjacob force-pushed the users/bjacob/cpu-ukernel-design-doc branch from d467c2c to 38ca327 Compare June 17, 2026 13:40
Adds README.md for compiler/plugins/target/LLVMCPU/builtins/ukernel/ as a
single final documentation commit, rather than iterating the doc across
the earlier framework commits (less churn for review).

Covers: scope (the framework is op-agnostic in principle, with
`inner_tiled` as the initial and primary case getting the detailed
treatment — inner-K-loop-only contract, and how specialization splits
between symbol selection on the `MMAIntrinsic` and post-inlining loop
unrolling on the `intrinsics_{m,n,k}` factors); the two structural
pillars (lives in compiler/, bitcode-only; self-contained IR via
`hal.executable_object`); the end-to-end lowering flow; the
`--iree-llvmcpu-enable-llvm-ukernels` user flag; bring-your-own-ukernel;
an authoring guide; testing at both the lit (compiler IR) and
`tests/e2e/matmul` (numerical) levels; and the three seed examples.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Benoit Jacob <jacob.benoit.1@gmail.com>
@bjacob bjacob force-pushed the users/bjacob/cpu-ukernel-bodies branch from 6c0ae40 to 62ad0cd Compare June 17, 2026 16:03
@bjacob bjacob force-pushed the users/bjacob/cpu-ukernel-design-doc branch from 38ca327 to 54665f8 Compare June 17, 2026 16:04
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.

1 participant