Skip to content

Precompile the workload for a single architecture - #356

Merged
maleadt merged 2 commits into
tb/unify-job-constructionfrom
tb/precompile-single-arch
Nov 24, 2026
Merged

maleadt merged 2 commits into
tb/unify-job-constructionfrom
tb/precompile-single-arch

Conversation

@maleadt

@maleadt maleadt commented Nov 24, 2026

Copy link
Copy Markdown
Member

The precompile workload compiles each kernel for eight architectures. That was needed while the compilation cache key depended on the architecture; since #311 the architecture is a runtime value, so the extra targets only add tileiras runs and package-image entries for kernels nobody launches.

This compiles for sm_100 only, which every supported bytecode version can target. Precompilation drops from about 18.5 s to 16.4 s; load time and the first launch are unchanged. It requires CompilerCaching 0.5.4 (maleadt/CompilerCaching.jl#36), which fixes recompiling const-return functions loaded from a package image for an architecture that wasn't precompiled.

The precompile workload compiled each kernel for up to eight architectures,
running tileiras once per kernel and architecture. That was needed while the
cache key, and with it the compiler's specializations, depended on the
architecture; since compilation jobs replaced those keys `sm_arch` is a runtime
value, so one target precompiles the same code. Blackwell is the target every
supported bytecode version accepts.
Precompiling the workload for a single architecture means a launch on any
other architecture loads a const-return CodeInstance from the package image
and recompiles it. CompilerCaching before 0.5.4 failed to recover the source
of such CodeInstances on Julia 1.13 and later.
@maleadt
maleadt force-pushed the tb/precompile-single-arch branch from abe5c85 to 33f4c7c Compare November 24, 2026 09:58
@maleadt
maleadt changed the base branch from main to tb/unify-job-construction November 24, 2026 09:58
@maleadt
maleadt added this pull request to stack #357 November 24, 2026 09:58
@maleadt
maleadt merged commit f82ea65 into main Nov 24, 2026
7 checks passed
@maleadt
maleadt deleted the tb/precompile-single-arch branch November 24, 2026 13:05
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