Archived
radiance 1.6.0
- Qwen-Image 2.1 and 2.1 Turbo: text to image and image edits over OpenAI's images API, /v1/images/generations and /v1/images/edits. An edit takes up to ten pictures and an optional mask, outside which the picture comes back exactly as it was; `background: transparent`, png, jpeg and webp output, `n` pictures from one prompt, streamed previews (`partial_images`), and vLLM-Omni's seed, negative_prompt with true_cfg_scale, num_inference_steps, width and height. arch/qwenimage21 serves the diffusers pipeline directory, converted with data/recipes/qwen-image-2.1-fp8.recipe (block fp8) or qwen-image-2.1-bf16.recipe. deploy/compose/qwen-image-2.1.yaml and qwen-image-2.1-turbo.yaml serve the fp8 containers on two cards. Two R9700s make a 2048x2048 picture in 61 s at the base model's 40 steps and in 13 s with Turbo (56 and 12 s with --tp-wire wht6), a 1024x1024 one in 6.0 and 2.6 s. The models are under Qwen's research license, which is non-commercial - an image generator is a program kind of its own (core/gen): an architecture declares its conditioning, denoising and decoding passes, and the driver runs the schedule, the pictures of a batch and the conditioning cache. An image model's /v1/models entry is its generator's name (qwen-image-2.1, qwen-image-2.1-turbo), and its capabilities and startup banner list only the images endpoints - the tiled prefill GEMMs run their tiles in groups of activation bands, 16 for fp8 and 8 for bf16, so an operand larger than the 64 MB cache is read once a group instead of once a band. A bf16 GEMM with more than 64 MB of weight runs up to twice as fast - fixed: a second lane opened in the middle of a step started beside work lane 0 had not finished. Gemma 4 26B-A4B opens its lane that way, so its first step after startup could read rows not yet written - startup no longer warns about --checkpoint-slots when it was not passed, nor about an expert floor on a model with no experts - the image's FFmpeg writes png, jpeg and webp (libwebp) - for out-of-tree plugins: RAD_ABI_VERSION is 16. The op vocabulary gains the image generator's ops (conv2d_nhwc, ln_mod, ln_mod_quant_fp8, flow_euler, attn_prefix_self and others; docs/OPS.md, "Image generation"), and all_reduce takes an optional `overlap`. Plugins built against 1.5.0 must be rebuilt
This commit is contained in:
1 parent
b93b531f63
commit
b068190326
66 files changed
+9035
-87
No files matched your search
@@ -98,6 +98,8 @@ constexpr uint32_t kFN = 128, kFK = 64; // kFK is BYTES per LDS row
|
||||
// alone.
|
||||
constexpr uint32_t kFKNarrow = 256;
|
||||
constexpr uint32_t kFWaves = 8;
|
||||
// Activation bands a raster group of the prefill tile holds in cache -- see the kernel's grouping.
|
||||
constexpr uint32_t kGroupM = 16;
|
||||
// 1 M tile x 8 N tiles a wave, so the 8 waves cover 8 DISTINCT row tiles.
|
||||
//
|
||||
// The register tile is the two of these together and it is a genuine knob -- the body takes it as a
|
||||
@@ -415,8 +417,25 @@ void gemm_fp8a8_kernel(
|
||||
const uint32_t kend = ck ? min(cols, kbeg + ck) : cols;
|
||||
if (kbeg >= kend) return;
|
||||
|
||||
const uint32_t m0 = blockIdx.x * FM;
|
||||
const uint32_t n0 = blockIdx.y * FN;
|
||||
// THE PREFILL TILE RUNS IN GROUPS OF kGroupM ACTIVATION BANDS. Blocks are dispatched in
|
||||
// flattened-id order, so with the plain x-fastest grid every weight band sweeps ALL of the
|
||||
// activation, and the activation is read once per 128 weight rows. That is free while it sits
|
||||
// in the 64 MB MALL and is the whole cost once it does not: at M = 16384 x K = 4096 (64 MB)
|
||||
// gate_up's 192 bands read 12 GB and ran at half the rate of M = 4096. Within a group the
|
||||
// kGroupM bands stay cached across the full N sweep, and the weight is read once a group.
|
||||
// With kGroupM bands or fewer the order is the plain one, and skipping the division keeps a
|
||||
// short prefill chunk at its old rate (2% at M = 512).
|
||||
uint32_t bm = blockIdx.x, bn = blockIdx.y;
|
||||
if (!AW && gridDim.x > kGroupM) {
|
||||
const uint32_t per = kGroupM * gridDim.y;
|
||||
const uint32_t lin = blockIdx.y * gridDim.x + blockIdx.x;
|
||||
const uint32_t first = (lin / per) * kGroupM, r = lin % per;
|
||||
const uint32_t gm = min(gridDim.x - first, kGroupM);
|
||||
bm = first + r % gm;
|
||||
bn = r / gm;
|
||||
}
|
||||
const uint32_t m0 = bm * FM;
|
||||
const uint32_t n0 = bn * FN;
|
||||
// Wave grid MW(M) x 1(N): a wave owns MT*16 A rows and all FN B rows. A 4x2 grid at the same
|
||||
// 128x128 tile -- 2x4 a wave, so 6 fragment reads per 8 WMMA rather than 9 -- is a WASH, which
|
||||
// says the fragment reads, which do not bank-conflict, are not the wall. There is no
|
||||
|
||||
Reference in new issue
Block a user