Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

sycl: port upstream 0.1.33 (re-migration of its six engine files)

maxfridbe9ef7a7327345
diff --git a/docs/INTEL.md b/docs/INTEL.md
index a40cf2718..9e8c9e674 100644
--- a/docs/INTEL.md
+++ b/docs/INTEL.md
@@ -507,6 +507,14 @@ files with real conflicts. What it needed:
`kv_hybrid_parity` and `qsa_prompt_attn_parity` pass (the tests now turn on the XMX prompt attention they
check); `iq_multi_parity` (IQ2_XS) and `s2_expert_grouped_parity` as before.
+**The 0.1.33 merge (2026-10-01).** Upstream 0.1.32 -> 0.1.33 (17 commits): no shared file conflicted (the Intel
+code is all in `sycl/`); six engine files changed upstream and were merged by the same re-migration (only those six:
+the other files dpct produced differently were left alone). Two conflicts: `--resident-cpu-experts` (upstream's new
+`resident_cpu_explicit` beside the port's `--stream-experts`) and the prompt attention's compute-capability check
+(the port keeps its XMX dispatch). `sycl/setup_intel.py` and `sycl/serve/server_intel.py` ran unchanged against the
+new setup.py and server.py. Every output identical (Coder, IQ2_XS, the 40K prompt with borrowing); `gr_parity` and
+`qsa_prompt_attn_parity` pass.
+
**Prompt-slot borrowing: the hang (fixed 2026-10-01).** From 0.1.31 on, a prompt that borrowed cache slots stopped
in its first full chunk with the GPU at 100% and the host waiting on the compute queue. It was never a borrowing
bug: borrowing is just the only way the Coder streams experts during a prompt (every expert is resident otherwise),
diff --git a/sycl/CMakeLists.txt b/sycl/CMakeLists.txt
index 6444dd872..1bda26d65 100644
--- a/sycl/CMakeLists.txt
+++ b/sycl/CMakeLists.txt
@@ -10,7 +10,7 @@
#
# Device code is JIT-compiled from SPIR-V unless STRATA_SYCL_AOT names a device (bmg-g31 for the Arc Pro B70).
cmake_minimum_required(VERSION 3.24)
-project(strata_sycl VERSION 0.1.32 LANGUAGES C CXX) # the upstream engine version this port tracks
+project(strata_sycl VERSION 0.1.33 LANGUAGES C CXX) # the upstream engine version this port tracks
set(STRATA_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/..)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
diff --git a/sycl/src/core/expert_cache.cpp b/sycl/src/core/expert_cache.cpp
index 32e167307..ac0459bee 100644
--- a/sycl/src/core/expert_cache.cpp
+++ b/sycl/src/core/expert_cache.cpp
@@ -209,7 +209,14 @@ bool ExpertCache::open_sized(const std::vector<int64_t>& slot_bytes, int64_t n_l
return false;
}
#endif
+ // #369: each layer's cursor at the bottom of its own range, as open() seeds it - open() above ran on byte-sized
+ // "slots", so its seeds are not slot indices
layer_next_.assign((size_t) (n_layers > 0 ? n_layers : 0), 0);
+ for (int64_t l = 0; l < n_layers; ++l) {
+ int64_t lo = 0, hi = 0;
+ layer_slot_range(l, lo, hi);
+ layer_next_[(size_t) l] = (int32_t) lo;
+ }
return true;
}
diff --git a/sycl/src/core/expert_source.cpp b/sycl/src/core/expert_source.cpp
index efab717c9..6ba5598e9 100644
--- a/sycl/src/core/expert_source.cpp
+++ b/sycl/src/core/expert_source.cpp
@@ -1054,6 +1054,7 @@ bool FileExpertSource::pin_cache_complement(
uint64_t bytes = 0;
if (!detail::make_cache_complement_plan(n_layers_, n_expert_, layer_blob_bytes_, primary_gpu_pairs,
additional_gpu_pairs, offsets, bytes, err)) return false;
+ uint64_t budget_physical = 0; // #403: the RAM reading a budget was sized from (0: no budget)
if (budget_bytes > 0) {
// CS-T: a RAM budget. The complement's experts in `rank` order (the expert profile, hottest first) while
// they fit, the rest left on the mapped files; clamped to what the RAM has room for.
@@ -1062,13 +1063,19 @@ bool FileExpertSource::pin_cache_complement(
err = "FileExpertSource: cannot determine available RAM for --resident-budget-gib";
return false;
}
+ budget_physical = physical;
const uint64_t room = physical > headroom_bytes ? physical - headroom_bytes : 0;
if (budget_bytes > room) {
+ // #403: 256 MiB under the room, so the engine's own allocations after this reading still leave the
+ // headroom (a budget clamped to exactly the room failed the safety check below on a reading a few MB
+ // lower). An unclamped budget is unchanged.
+ const uint64_t margin = 256ull << 20;
+ const uint64_t clamped = room > margin ? room - margin : 0;
std::fprintf(stderr, "FileExpertSource: --resident-budget-gib %.2f is more than the RAM has room for "
- "(%.2f GiB available minus %.0f GiB headroom): %.2f GiB\n",
+ "(%.2f GiB available minus %.0f GiB headroom and a 0.25 GiB margin): %.2f GiB\n",
(double) budget_bytes / 1073741824.0, (double) physical / 1073741824.0,
- (double) headroom_bytes / 1073741824.0, (double) room / 1073741824.0);
- budget_bytes = room;
+ (double) headroom_bytes / 1073741824.0, (double) clamped / 1073741824.0);
+ budget_bytes = clamped;
}
std::vector<uint64_t> ranked(offsets.size(), kNoComplement);
uint64_t at = 0;
@@ -1095,8 +1102,10 @@ bool FileExpertSource::pin_cache_complement(
const bool lend = lend_from_slot >= 0 && lend_from_slot < n_slots && additional_gpu_pairs.empty();
uint64_t budget = std::numeric_limits<uint64_t>::max();
if (bytes > 0 || lend) {
- uint64_t physical = 0;
- if (!available_memory_bytes(physical)) {
+ // #403: with a budget, the reading it was sized from - a second reading a few MB lower (the engine's own
+ // allocations, the file cache) failed a budget the first one had clamped. (A budget turns `lend` off.)
+ uint64_t physical = budget_physical;
+ if (physical == 0 && !available_memory_bytes(physical)) {
err = "FileExpertSource: cannot determine available RAM for the resident-memory safety check";
return false;
}
diff --git a/sycl/src/kernels/cuda/fused_gr.dp.cpp b/sycl/src/kernels/cuda/fused_gr.dp.cpp
index 2a9f35b98..32fe61a49 100644
--- a/sycl/src/kernels/cuda/fused_gr.dp.cpp
+++ b/sycl/src/kernels/cuda/fused_gr.dp.cpp
@@ -1545,14 +1545,11 @@ void fused_gr_read_multi(const FusedGrArgs* a, int n_tok, float* xn_scratch, voi
*/
0 == 0)
split = 1;
- else if (need2 <= limit &&
- /*
- DPCT1027: The call to cudaFuncSetAttribute was replaced
- with 0 because SYCL currently does not support
- corresponding setting.
- */
- 0 == 0)
- split = 2;
+ else if (need2 <= limit)
+ // #375 (kenh0u): the S = 2 split (a 64 KB opt-in card: Turing) disagrees with itself in gr_parity
+ // (graph replay vs direct call) - such a card keeps the default read until that split is fixed
+ std::fprintf(stderr, "strata: STRATA_GR_V3=1 needs the two-half split on this card, which fails its "
+ "checks (#375): the default read is used\n");
/*
DPCT1026: The call to cudaGetLastError was removed because this
functionality is redundant in SYCL.
diff --git a/sycl/src/kernels/cuda/qsa_prompt_attn.dp.cpp b/sycl/src/kernels/cuda/qsa_prompt_attn.dp.cpp
index 3baef3ce5..22be5e4de 100644
--- a/sycl/src/kernels/cuda/qsa_prompt_attn.dp.cpp
+++ b/sycl/src/kernels/cuda/qsa_prompt_attn.dp.cpp
@@ -182,9 +182,9 @@ prompt_attn_kernel(const float *__restrict__ q, QsaAttnPools p,
sycl::fmax(S.qmax[2], S.qmax[3]));
int qe = 0;
/*
- DPCT1017: The sycl::frexp call is used instead of the frexpf call.
- These two calls do not provide exactly the same functionality. Check the
- potential precision and/or performance issues for the generated code.
+ DPCT1017: The sycl::frexp call is used instead of the frexpf call. These
+ two calls do not provide exactly the same functionality. Check the potential
+ precision and/or performance issues for the generated code.
*/
if (qm > 0.0f) sycl::frexp(
qm, sycl::address_space_cast<sycl::access::address_space::generic_space,
@@ -705,9 +705,9 @@ prompt_attn_i8_kernel(const float *__restrict__ q, QsaAttnPools p,
sycl::fmax(S.qmax[2], S.qmax[3]));
int qe = 0;
/*
- DPCT1017: The sycl::frexp call is used instead of the frexpf call.
- These two calls do not provide exactly the same functionality. Check the
- potential precision and/or performance issues for the generated code.
+ DPCT1017: The sycl::frexp call is used instead of the frexpf call. These
+ two calls do not provide exactly the same functionality. Check the potential
+ precision and/or performance issues for the generated code.
*/
if (qm > 0.0f) sycl::frexp(
qm, sycl::address_space_cast<sycl::access::address_space::generic_space,
@@ -1467,7 +1467,8 @@ bool qsa_prompt_attn_batch(const float *q, const QsaAttnPools &pools,
{ // sm_75 or newer: the MMA above compiles for both. sm_80+ runs the cp.async kernel (launch_i8); Turing has
// no cp.async, so it runs the v1 kernel (launch<1>, same accuracy, another summation order). An older card
// keeps the old kernel.
- static int cc_major[64] = {};
+ // #371: the compute capability with its minor - sm_70 (V100) has no m16n8k8 (the kernels trap below sm_75)
+ static int cc[64] = {};
int dev = 0;
/*
DPCT1026: The call to cudaGetLastError was removed because this
@@ -1477,10 +1478,12 @@ bool qsa_prompt_attn_batch(const float *q, const QsaAttnPools &pools,
dev < 0 || dev >= 64) {
; return false;
}
- if (cc_major[dev] == 0) {
- int major = 0;
+ if (cc[dev] == 0) {
+ int major = 0, minor = 0;
if (DPCT_CHECK_ERROR(
- major = dpct::get_device(dev).get_major_version()) != 0) {
+ major = dpct::get_device(dev).get_major_version()) != 0 ||
+ DPCT_CHECK_ERROR(
+ minor = dpct::get_device(dev).get_minor_version()) != 0) {
/*
DPCT1026: The call to cudaGetLastError was removed because
this functionality is redundant in SYCL.
@@ -1489,9 +1492,10 @@ bool qsa_prompt_attn_batch(const float *q, const QsaAttnPools &pools,
}
// STRATA_QSA_WARP=1|attn (an A/B arm): the pre-sm_80 kernels on any card, as RTX 20 runs them
const char* w = std::getenv("STRATA_QSA_WARP");
- cc_major[dev] = w && (!std::strcmp(w, "1") || !std::strcmp(w, "attn")) ? 7 : strata::cc_major_of(major);
+ cc[dev] = w && (!std::strcmp(w, "1") || !std::strcmp(w, "attn")) ? 75
+ : 10 * strata::cc_major_of(major) + strata::cc_minor_of(minor);
}
- (void) cc_major[dev];
+ (void) cc[dev];
// SYCL: the mma.sync kernel below is not ported (upstream's Turing/sm_80 split - `turing` - does not
// apply); its XMX port takes the same arguments
if (qsa_prompt_attn_xmx(q, pools, ids, steps, cap, s, attn, n_q, stream)) return true;
diff --git a/sycl/src/kernels/gr_parity.cpp b/sycl/src/kernels/gr_parity.cpp
index b1ff5d5b6..3567a2a63 100644
--- a/sycl/src/kernels/gr_parity.cpp
+++ b/sycl/src/kernels/gr_parity.cpp
@@ -27,6 +27,7 @@
#include <cmath>
#include <cstdio>
+#include <algorithm>
#include <cstdlib>
#include <cstring>
#include <random>
@@ -480,7 +481,22 @@ int fused_multi_lds_parity(const float* d_norm, const uint16_t* d_down, const ui
std::exit(1);
}
};
- auto same = [](const Snapshot& a, const Snapshot& b) {
+ // the split read (STRATA_GR_V3=1) sums in another order than the single-token kernel: equal within float
+ // rounding, not to the bit, so it is compared with a relative tolerance; the default kernels bit for bit
+ static const bool v3 = [] { const char* v = std::getenv("STRATA_GR_V3"); return v != nullptr && std::atoi(v) != 0; }();
+ auto close = [](const std::vector<float>& x, const std::vector<float>& y) {
+ double worst = 0.0, mag = 1e-30;
+ for (size_t i = 0; i < x.size(); ++i) {
+ worst = std::max(worst, (double) std::fabs(x[i] - y[i]));
+ mag = std::max(mag, (double) std::fabs(y[i]));
+ }
+ if (worst > 2e-6 * mag)
+ std::printf(" tolerance: worst %.3e of max |ref| %.3e (rel %.3e), n %zu\n", worst, mag, worst / mag, x.size());
+ return worst <= 2e-6 * mag;
+ };
+ auto same = [&](const Snapshot& a, const Snapshot& b) {
+ if (v3) // `lo` is the default kernels' workspace between down and up; the split read keeps it in shared memory
+ return close(a.r_out, b.r_out) && close(a.rs, b.rs) && close(a.inject, b.inject) && close(a.mixed, b.mixed);
return std::memcmp(a.r_out.data(), b.r_out.data(), a.r_out.size() * sizeof(float)) == 0 &&
std::memcmp(a.lo.data(), b.lo.data(), a.lo.size() * sizeof(float)) == 0 &&
std::memcmp(a.rs.data(), b.rs.data(), a.rs.size() * sizeof(float)) == 0 &&
diff --git a/sycl/src/program/generate.cpp b/sycl/src/program/generate.cpp
index c79ff935a..ff7806f75 100644
--- a/sycl/src/program/generate.cpp
+++ b/sycl/src/program/generate.cpp
@@ -291,6 +291,7 @@ struct Options {
bool resident_pin = false;
uint64_t resident_headroom = 8ull << 30;
bool resident_soft = false;
+ bool resident_cpu_explicit = false; ///< #384: --resident-cpu-experts given by itself (not only implied)
/// CS-T `--resident-budget-gib N`: the resident mode with a RAM budget - the N GiB of experts the GPU cache does
/// not hold that the expert profile ranks hottest are copied into RAM, the rest are read from the files in place
/// (the GGUF shards when the pack has no experts.bin). 0 = the whole complement (--resident-experts).
@@ -1269,7 +1270,7 @@ int main(int argc, char **argv) try {
else if (a == "--gpu-stages") o.gpu_stages = true;
else if (a == "--mmap-experts") o.mmap_experts = true;
else if (a == "--shared-expert-arena") o.shared_expert_arena = next("--shared-expert-arena");
- else if (a == "--resident-cpu-experts") o.resident_cpu_experts = true;
+ else if (a == "--resident-cpu-experts") o.resident_cpu_experts = o.resident_cpu_explicit = true;
else if (a == "--stream-experts") o.stream_experts = true;
else if (a == "--resident-experts") {
o.mmap_experts = o.resident_cpu_experts = o.resident_pin = o.resident_soft = true;
@@ -1382,9 +1383,20 @@ int main(int argc, char **argv) try {
std::fprintf(stderr, "strata generate: --resident-cpu-experts requires --mmap-experts and a static --expert-profile\n");
return 2;
}
- if (o.resident_cpu_experts &&
- (!o.layer_split.empty() || o.expert_cache_remote[0] > 0 || o.expert_cache_remote[1] > 0 ||
- o.expert_cache_remote[2] > 0)) {
+ const bool remote_caches = o.expert_cache_remote[0] > 0 || o.expert_cache_remote[1] > 0 ||
+ o.expert_cache_remote[2] > 0;
+ if (o.resident_cpu_experts && !o.layer_split.empty() && !remote_caches && o.resident_soft &&
+ !o.resident_cpu_explicit && o.resident_budget == 0) {
+ // #364 #384: setup's --resident-experts with a layer split (--gpus at start, or a config edited by hand) runs
+ // as the plain mmap mode - the placement those users measured 1.3-1.6x faster than one GPU - instead of
+ // refusing. Exactly --mmap-experts: nothing else reads these flags (the headroom only sizes the copy).
+ std::fprintf(stderr, "strata generate: WARNING: the resident RAM mode (--resident-experts) does not support a "
+ "layer split yet: the experts the GPUs do not hold are read through the OS file cache "
+ "(--mmap-experts), and RAM may fill up during long prompts\n");
+ o.resident_cpu_experts = o.resident_pin = o.resident_soft = false;
+ o.resident_headroom = 8ull << 30;
+ }
+ if (o.resident_cpu_experts && (!o.layer_split.empty() || remote_caches)) {
std::fprintf(stderr, "strata generate: --resident-cpu-experts does not support layer splits or remote expert caches\n");
return 2;
}
@@ -2358,10 +2370,10 @@ int main(int argc, char **argv) try {
st.mrope = sycl::malloc_device<int32_t>(
mrope_host.size(), dpct::get_in_order_queue())) != 0 ||
/*
- DPCT1114: cudaMemcpy is migrated to asynchronization memcpy,
- assuming in the original code the source host memory is pageable
- memory. If the memory is not pageable, call wait() on event
- return by memcpy API to ensure synchronization behavior.
+ DPCT1114: cudaMemcpy is migrated to asynchronization
+ memcpy, assuming in the original code the source host memory is
+ pageable memory. If the memory is not pageable, call wait() on
+ event return by memcpy API to ensure synchronization behavior.
*/
DPCT_CHECK_ERROR(dpct::get_in_order_queue().memcpy(
st.mrope, mrope_host.data(),
@@ -2730,9 +2742,9 @@ int main(int argc, char **argv) try {
DPCT_CHECK_ERROR(dev = dpct::get_current_device_id()) == 0 &&
DPCT_CHECK_ERROR(dpct::get_device(dev).get_device_info(p)) == 0;
/*
- DPCT1010: SYCL uses exceptions to report errors and does not use the
- error codes. The cudaGetLastError function call was replaced with 0. You
- need to rewrite this code.
+ DPCT1010: SYCL uses exceptions to report errors and does not use
+ the error codes. The cudaGetLastError function call was replaced with 0.
+ You need to rewrite this code.
*/
if (!named) 0;
const char *name =
@@ -2744,8 +2756,8 @@ int main(int argc, char **argv) try {
stderr, "strata generate: GPU %d: %s, compute capability %d.%d%s\n",
dev, name,
/*
- DPCT1005: The SYCL device version is different from CUDA Compute
- Compatibility. You may need to rewrite this code.
+ DPCT1005: The SYCL device version is different from CUDA
+ Compute Compatibility. You may need to rewrite this code.
*/
strata::cc_major_of(p.get_major_version()),
strata::cc_minor_of(p.get_minor_version()),
@@ -2925,16 +2937,20 @@ int main(int argc, char **argv) try {
const int64_t reserve = ((int64_t) o.vram_reserve_mib + prefill_mib) << 20;
const int64_t fit = std::max<int64_t>(((int64_t) free_b - reserve) / (int64_t) strata::kernels::cpu::expert_layout().max_blob, 0);
if (o.expert_cache > fit) {
- std::fprintf(stderr, "strata generate: layer split: --expert-cache %d leaves no room for the prompt path's "
- "buffers (%lld MiB) on CUDA0: %lld slots\n", o.expert_cache, (long long) prefill_mib,
- (long long) fit);
+ // a WARNING that names the knob: the user asked for this size, and gets fewer slots
+ std::fprintf(stderr, "strata generate: WARNING: layer split: --expert-cache %d leaves no room for the "
+ "prompt path's buffers (%lld MiB) and the %d MiB reserve on CUDA0: %lld slots instead "
+ "(a smaller --vram-reserve-mib leaves more of them)\n", o.expert_cache,
+ (long long) prefill_mib, o.vram_reserve_mib, (long long) fit);
o.expert_cache = (int) fit;
}
}
// plan v0.3 P6: a native pack's blobs differ per layer, so with a profile its slots are sized per pair: the
// same VRAM holds ~30% more IQ3_XXS experts than slots of the largest blob would
+ // #369: not with --expert-cache-per-layer - its per-layer slot ranges ignore the profile rank a sized slot was cut
+ // for, so a layer's larger blob could land in a smaller slot: that mode keeps slots of the largest blob
std::vector<int64_t> sized_slots;
- if (native_pack && o.expert_cache > 0 && !profile.empty()) {
+ if (native_pack && o.expert_cache > 0 && !profile.empty() && !o.expert_cache_per_layer) {
size_t free_b = 0, total_b = 0;
/*
DPCT1106: 'cudaMemGetInfo' was migrated with the Intel extensions
@@ -3085,10 +3101,17 @@ int main(int argc, char **argv) try {
// the policy rather than a hint.
int64_t prefilled = 0;
if (!profile.empty() && srcp != nullptr) {
- const int64_t want = std::min<int64_t>((int64_t) profile.size(), xcache.slots());
+ // #369 (dag08): per layer, a full layer skips only its own pairs - each layer takes its hottest experts until
+ // its range is full (one full layer used to end the whole fill, leaving most layers empty)
+ const bool per_layer = xcache.per_layer_admission();
+ const int64_t want = per_layer ? (int64_t) profile.size()
+ : std::min<int64_t>((int64_t) profile.size(), xcache.slots());
for (int64_t i = 0; i < want; ++i) {
const int32_t slot = xcache.admit(profile[(size_t) i].first, profile[(size_t) i].second);
- if (slot == strata::core::kNotResident) break;
+ if (slot == strata::core::kNotResident) {
+ if (per_layer) continue;
+ break;
+ }
const uint8_t* b = srcp->blob(profile[(size_t) i].first, profile[(size_t) i].second);
if (b == nullptr || !xcache.fill_slot_blocking(slot, b, err,
(int64_t) strata::kernels::cpu::expert_layout().blob_bytes(profile[(size_t) i].first))) {
@@ -3109,7 +3132,7 @@ int main(int argc, char **argv) try {
}
mem_mark("the profile fill");
std::fprintf(stderr, "strata generate: pre-filled %lld of %lld slots from the profile; slot 0 verified\n",
- (long long) prefilled, (long long) want);
+ (long long) prefilled, (long long) (per_layer ? xcache.slots() : want));
}
// SYCL port, plan item 2: the experts that did not fit VRAM, mirrored once in pinned host memory the GPU reads
// over PCIe (--stream-experts has no host copy otherwise: each routed miss was an SSD read). The share of misses
@@ -3330,8 +3353,8 @@ int main(int argc, char **argv) try {
std::fprintf(stderr, "strata generate: routing-aware prefetch of the file tier on (the next layer's router)\n");
} else {
/*
- DPCT1010: SYCL uses exceptions to report errors and does not use
- the error codes. The cudaGetLastError function call was replaced
+ DPCT1010: SYCL uses exceptions to report errors and does not
+ use the error codes. The cudaGetLastError function call was replaced
with 0. You need to rewrite this code.
*/
(void)0;
@@ -3562,10 +3585,11 @@ int main(int argc, char **argv) try {
} else {
for (int64_t c = 0; c < g.hc; ++c)
/*
- DPCT1124: cudaMemcpyAsync is migrated to asynchronous memcpy
- API. While the origin API might be synchronous, it depends on
- the type of operand memory, so you may need to call wait() on
- event return by memcpy API to ensure synchronization behavior.
+ DPCT1124: cudaMemcpyAsync is migrated to asynchronous
+ memcpy API. While the origin API might be synchronous, it
+ depends on the type of operand memory, so you may need to call
+ wait() on event return by memcpy API to ensure synchronization
+ behavior.
*/
if (DPCT_CHECK_ERROR(strata::q_of(token_stream)->memcpy(
ss.R + (size_t)c * g.n_embd, d_emb,
@@ -3857,8 +3881,8 @@ int main(int argc, char **argv) try {
real error-handling function.
*/
/*
- DPCT1010: SYCL uses exceptions to report errors and does not use
- the error codes. The cudaGetLastError function call was replaced
+ DPCT1010: SYCL uses exceptions to report errors and does not
+ use the error codes. The cudaGetLastError function call was replaced
with 0. You need to rewrite this code.
*/
std::fprintf(stderr,
@@ -3905,9 +3929,9 @@ int main(int argc, char **argv) try {
function.
*/
/*
- DPCT1010: SYCL uses exceptions to report errors and does
- not use the error codes. The cudaGetLastError function call
- was replaced with 0. You need to rewrite this code.
+ DPCT1010: SYCL uses exceptions to report errors and
+ does not use the error codes. The cudaGetLastError function
+ call was replaced with 0. You need to rewrite this code.
*/
dpct::get_error_string_dummy(0));
return 1;
@@ -3927,9 +3951,9 @@ int main(int argc, char **argv) try {
function.
*/
/*
- DPCT1010: SYCL uses exceptions to report errors and does
- not use the error codes. The cudaGetLastError function call
- was replaced with 0. You need to rewrite this code.
+ DPCT1010: SYCL uses exceptions to report errors and
+ does not use the error codes. The cudaGetLastError function
+ call was replaced with 0. You need to rewrite this code.
*/
dpct::get_error_string_dummy(0));
return 1;
@@ -4017,10 +4041,10 @@ int main(int argc, char **argv) try {
st->d_res = sycl::malloc_device<int32_t>(
host_res.size(), dpct::get_in_order_queue())) != 0 ||
/*
- DPCT1114: cudaMemcpy is migrated to asynchronization memcpy,
- assuming in the original code the source host memory is pageable
- memory. If the memory is not pageable, call wait() on event
- return by memcpy API to ensure synchronization behavior.
+ DPCT1114: cudaMemcpy is migrated to asynchronization
+ memcpy, assuming in the original code the source host memory is
+ pageable memory. If the memory is not pageable, call wait() on
+ event return by memcpy API to ensure synchronization behavior.
*/
DPCT_CHECK_ERROR(dpct::get_in_order_queue().memcpy(
st->d_res, host_res.data(),
@@ -4186,6 +4210,12 @@ int main(int argc, char **argv) try {
std::fprintf(stderr, "strata generate: WARNING: the resident RAM mode does not fit (%s); the experts the "
"GPU does not hold are read from the model folder through the OS file cache "
"(--mmap-experts), which is slower when the RAM cannot keep them\n", err.c_str());
+ } else if (o.resident_budget > 0) {
+ // #403: a RAM budget that cannot be kept is not a reason to stop - the experts it would have held are
+ // read from the files like the ones outside it (pin_cache_complement leaves nothing half-built)
+ std::fprintf(stderr, "strata generate: WARNING: the RAM budget (--resident-budget-gib) cannot be kept (%s); "
+ "every expert the GPU does not hold is read from the model files through the OS file "
+ "cache (--mmap-experts), which is slower\n", err.c_str());
} else {
std::fprintf(stderr, "strata generate: CPU expert residency: %s\n", err.c_str());
return 1;
@@ -4470,16 +4500,16 @@ int main(int argc, char **argv) try {
const strata::core::OnDevice on(stp->dev);
stp->sp.reset();
/*
- DPCT1010: SYCL uses exceptions to report errors and does
- not use the error codes. The cudaGetLastError function call
- was replaced with 0. You need to rewrite this code.
+ DPCT1010: SYCL uses exceptions to report errors and
+ does not use the error codes. The cudaGetLastError function
+ call was replaced with 0. You need to rewrite this code.
*/
(void)0;
}
sp.reset();
/*
- DPCT1010: SYCL uses exceptions to report errors and does not
- use the error codes. The cudaGetLastError function call was
+ DPCT1010: SYCL uses exceptions to report errors and does
+ not use the error codes. The cudaGetLastError function call was
replaced with 0. You need to rewrite this code.
*/
(void)0;
@@ -4905,10 +4935,10 @@ int main(int argc, char **argv) try {
try {
if (d_res != nullptr)
/*
- DPCT1114: cudaMemcpy is migrated to asynchronization memcpy,
- assuming in the original code the source host memory is pageable
- memory. If the memory is not pageable, call wait() on event
- return by memcpy API to ensure synchronization behavior.
+ DPCT1114: cudaMemcpy is migrated to asynchronization
+ memcpy, assuming in the original code the source host memory is
+ pageable memory. If the memory is not pageable, call wait() on
+ event return by memcpy API to ensure synchronization behavior.
*/
dpct::get_in_order_queue().memcpy(
d_res, host_res.data(), host_res.size() * sizeof(int32_t)).wait();
@@ -6458,8 +6488,8 @@ int main(int argc, char **argv) try {
function.
*/
/*
- DPCT1010: SYCL uses exceptions to report errors and does not
- use the error codes. The cudaGetLastError function call was
+ DPCT1010: SYCL uses exceptions to report errors and does
+ not use the error codes. The cudaGetLastError function call was
replaced with 0. You need to rewrite this code.
*/
(long long)pos, dpct::get_error_string_dummy(0));
@@ -6534,8 +6564,8 @@ int main(int argc, char **argv) try {
function.
*/
/*
- DPCT1010: SYCL uses exceptions to report errors and does not
- use the error codes. The cudaGetLastError function call was
+ DPCT1010: SYCL uses exceptions to report errors and does
+ not use the error codes. The cudaGetLastError function call was
replaced with 0. You need to rewrite this code.
*/
dpct::get_error_string_dummy(0));
@@ -6680,10 +6710,10 @@ int main(int argc, char **argv) try {
pending.clear();
if (d_res != nullptr)
/*
- DPCT1114: cudaMemcpy is migrated to asynchronization memcpy,
- assuming in the original code the source host memory is pageable
- memory. If the memory is not pageable, call wait() on event
- return by memcpy API to ensure synchronization behavior.
+ DPCT1114: cudaMemcpy is migrated to asynchronization
+ memcpy, assuming in the original code the source host memory is
+ pageable memory. If the memory is not pageable, call wait() on
+ event return by memcpy API to ensure synchronization behavior.
*/
dpct::get_in_order_queue().memcpy(
d_res, host_res.data(), host_res.size() * sizeof(int32_t)).wait();