radiance 1.8.0

- video: MiniMax-H3 and FastVideo's FastH3 8-Step V2, a video with its stereo soundtrack from text
  on OpenAI's /v1/videos, block fp8 on two cards
- music: MiniMax-Music3, songs from lyrics and a description on /v1/audio/speech
- speech: Breeze-TTS-2 on /v1/audio/speech and vLLM-Omni's realtime WebSocket
- runtime LoRA adapters beside the base model, picked per request by `model` (baKon, #105)
- several agent streams keep their cached history: --checkpoint-slots auto, the new default, sizes
  the snapshot store by --max-num-seqs (#108)
- the Swift 1.5 27B W4 releases convert and serve: compressed-tensors AWQ and GPTQ int4, AutoRound,
  ModelOpt NVFP4 (#110)
- the image's host tests pass where perf_event_open is refused, as in BuildKit's sandbox (#106)
- plugin ABI 21: out-of-tree plugins must be rebuilt
This commit is contained in:
Deadcode committed 2026-10-18 11:38:37 +02:00
1 parent 91127395ee
commit 7a7707a955
179 files changed
+37542 -1892

No files matched your search

+32 -12
View File
@@ -1,23 +1,41 @@
/* engine_gen.cpp -- the image generator's loop: the driver's passes (core/gen/driver.h) run on
* the ranks like token steps, one at a time, each drained before the next.
/* engine_gen.cpp -- a generator's loop: the driver's passes (core/gen/pass.h; driver.h for
* images, audio_driver.h for audio, video_driver.h for video) run on the ranks like token steps, one at a time, each drained
* before the next.
*
* Draining is cheap: a pass is tens to thousands of milliseconds of device work, and the next
* pass depends only on the driver's host bookkeeping, so the wait costs the microseconds of
* building it. Issuing ahead would need a second staging region and a commit protocol.
*/
#include "engine_priv.h"
#include "gen/driver.h"
#include "gen/pass.h"
#include <chrono>
#include <thread>
namespace rad {
/* A generator pass's kind, for the buffer probe's lines. */
static const char* pass_name(int gen) {
switch (gen) {
case RAD_GEN_PASS_COND: return "cond";
case RAD_GEN_PASS_DENOISE: return "denoise";
case RAD_GEN_PASS_DECODE: return "decode";
case RAD_GEN_PASS_PROMPT: return "prompt";
case RAD_GEN_PASS_FRAME: return "frame";
case RAD_GEN_PASS_WINDOW: return "window";
case RAD_GEN_PASS_VOCODE: return "vocode";
case RAD_GEN_PASS_VCOND: return "vcond";
case RAD_GEN_PASS_VSTEP: return "vstep";
case RAD_GEN_PASS_ADECODE: return "adecode";
case RAD_GEN_PASS_VDECODE: return "vdecode";
default: return "";
}
}
int Engine::gen_loop() {
if (rad_dev_set(ranks_[0]->device) < 0)
RAD_ERR("image generator loop: could not bind rank 0's device");
RAD_ERR("generator loop: could not bind rank 0's device");
int step = 0, idle = 0;
const rad_buf img = ranks_[0]->program.generator.image_out;
/* An error ends the driver's requests, then the loop. */
auto stop = [&](int st) {
gen_->shutdown("the engine stopped on an error and is not serving", st);
@@ -43,15 +61,17 @@ int Engine::gen_loop() {
rad_strerror(st));
return stop(st);
}
/* A decode pass's image, copied behind it on rank 0's stream; every rank holds the same
* pixels. */
if (const int64_t n = gen_->decode_bytes(); n > 0) {
const void* src = ranks_[0]->ctx.buf_ptr(img);
/* What the pass leaves for the host (an image, a window's samples, the frames' status),
* copied behind it on rank 0's stream; every rank holds the same values. */
for (const gen::IPassDriver::Readback& r : gen_->readbacks()) {
if (st < 0 || r.bytes <= 0) continue;
const void* src = ranks_[0]->ctx.buf_ptr(r.buf);
if (!src) {
RAD_ERR("the generator's image buffer was declared but never planned");
RAD_ERR("the generator's output buffer '%s' was declared but never planned",
ranks_[0]->program.buffers[r.buf].name.c_str());
return stop(RAD_E_STATE);
}
st = rad_memcpy_async(gen_->host_image(), src, n, ranks_[0]->ctx.stream());
st = rad_memcpy_async(r.host, src, r.bytes, ranks_[0]->ctx.stream());
}
for (auto& rk : ranks_)
if (st >= 0) st = rad_stream_sync(rk->ctx.stream());
@@ -59,7 +79,7 @@ int Engine::gen_loop() {
RAD_ERR("generator pass %d: the device failed: %s", step, rad_strerror(st));
return stop(st);
}
dump_buffers(ranks_[0]->ctx, step);
dump_buffers(ranks_[0]->ctx, step, pass_name(b->gen));
gen_->done();
++step;
}