This repository has been archived on 2026-11-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
radiance-sycl/core/sched/advance.cpp
T
Deadcode 6df26315b9 radiance 1.0.6
- A text prompt to /v1/completions reads the model's control tokens as tokens, as vLLM and
  llama.cpp do. A client that renders its own chat template can send "<|im_start|>user ..." and
  the model sees the turn markers; they used to reach it as plain text. /tokenize and
  /v1/embeddings read a text prompt the same way, and a prompt that already opens with BOS gets
  no second one.
- The VRAM budget counts the engine's own hardware queues, which the driver backs with about
  33 MiB of VRAM each, and the KV tiers' copy staging. Both used to come out of
  --gpu-headroom-mib: Qwen3.8-Flash-Next ran with 9 MiB free under load against the 96 MiB it
  asked to keep, the room a kernel's first launch allocates from. The startup receipt has a
  "hardware queues" line.
- Running the whole model on the CPU (RADIANCE_HOST_DOMAIN=1 with no GPU visible) no longer
  repeats words or answers differently at temperature 0. A decode step could read its input
  token before the copy that delivers it had landed.
- The README says to clone the repository before installing.
2026-10-04 20:07:08 +02:00

29 lines
1.0 KiB
C++

/* advance.cpp -- issuing an advance. See advance.h. */
#include "advance_impl.h"
#include "device/device.h"
namespace rad {
int step_advance(const AdvanceArgs& a, RadStream s) {
if (a.n_seq <= 0) return RAD_OK;
/* THE HOST BACKEND'S STREAMS ARE QUEUES, each run by its own worker thread (device/host.cpp),
* and its device memory is host memory. So the rows run here once the stream has finished
* everything issued before this call, which is where the kernel would run in stream order.
* Without the wait they can read a sampled token or a staged row whose copy is still queued,
* and the next step then continues from the token before it. */
if (device_is_host()) {
RAD_TRY(rad_stream_sync(s));
for (int i = 0; i < a.n_seq; ++i) adv_row(a, i);
return RAD_OK;
}
#if defined(RAD_HAVE_HIP) && RAD_HAVE_HIP
return rad_step_advance_launch(&a, (void*)s) == 0 ? RAD_OK : RAD_E_DEVICE;
#else
(void)s;
return RAD_E_UNSUPPORTED;
#endif
}
} /* namespace rad */