layer-major prefill: stays off on AMD builds (#3976)
Only NVIDIA CUDA has run the layer-major walk. On a HIP build (wave32 or the gfx906 compat layer) lm_prepare now declines with a reason, so a prompt takes the chunk-major path and the one-time "layer-major off for this prompt" line names it. The code still compiles everywhere the shared prefill.cpp does; nothing else changes. With STRATA_PREFILL_LAYER_MAJOR unset nothing is reached. Not covered: HIP and SYCL were not built or run (SYCL has its own prefill.cpp).
This commit is contained in:
1 parent
e7318fa23d
commit
d02478b7a1
1 file changed
+5
@@ -5639,6 +5639,11 @@ void Prefill::lm_release() {
|
||||
int64_t Prefill::lm_prepare(int64_t n, std::string& why, int64_t cap) {
|
||||
Impl& m = *impl_;
|
||||
if (m.g == nullptr) { why = "not initialized"; return 0; }
|
||||
#if defined(STRATA_USE_HIP) || defined(STRATA_HIP_GFX906)
|
||||
// only NVIDIA CUDA has run this path; on an AMD build the prompt stays on the chunk-major path
|
||||
why = "layer-major prefill has only been run on NVIDIA CUDA";
|
||||
return 0;
|
||||
#endif
|
||||
const core::ModelGeometry& g = *m.g;
|
||||
const core::OnDevice on_device(m.device); // a layer split's later stage is sized on its own GPU
|
||||
// layer split (2026-10-24): each stage runs its own layers layer-major over the same super-chunk and hands the
|
||||
|
||||
Reference in new issue
Block a user