3-way merge from the port's "main + PRs" migration to dpct of upstream 0.1.38 (prefill.cpp re-merged with the histogram diff: upstream's peer-device and fused restructure kept, the port's edits carried over - the stager's GGUF job, the stream-all gate, the fp16 NaN checks; generate.cpp: the pipelined profile fill beside upstream's prefetching serial fill; mtp/verify: the SYCL host mapping). - the PRs' header forks dropped: upstream has them now - stubs: --peer-device (peer_experts.cpp; open refuses) and the fused int8 prompt kernels (moe_fused_stub.cpp; MMQ is not built here) - off on SYCL: the sm_90 cluster greedy sampler and QSA top-k (fixups.py) - fused_gr: dpct's undeduced kernel names filled in (fixups.py) - STRATA_GDN_KEYHEAD stays opt-in on the port (upstream's gate is NVIDIA SM counts) - version 0.1.38 Tested on the B70: build clean; native_grouped, iq_multi, gr, qsa, kv_hybrid, quantize_act parity pass, qsa_prompt_attn's int8/fp16 pass (its new Q4_0 tensor-core cases are refused: not in the port); Coder short/long, IQ2_XS, 40K outputs identical; 128K int8 KV streaming 892 / 66.8 tok/s; GR_DOWN_MAX4 neutral, GDN_KEYHEAD 8% slower (stays off).
42 lines
1.5 KiB
C++
42 lines
1.5 KiB
C++
// src/core/peer_experts.cpp (SYCL port) - upstream's --peer-device tier (a second GPU as an expert-cache tier, 0.1.36+)
|
|
// is CUDA-only for now: this build answers "no peer". open() refuses with a message, so --peer-device fails clearly,
|
|
// and every other entry point is the state a run without --peer-device has. Upstream's file: src/core/peer_experts.cpp.
|
|
#include "strata/core/peer_experts.hpp"
|
|
|
|
#include <atomic>
|
|
|
|
namespace strata::core {
|
|
|
|
namespace {
|
|
std::atomic<bool> g_portable{false};
|
|
} // namespace
|
|
|
|
void set_peer_portable(bool on) { g_portable.store(on); }
|
|
bool peer_portable() { return g_portable.load(); }
|
|
|
|
PeerExperts::~PeerExperts() { close(); }
|
|
|
|
bool PeerExperts::open(int, const std::vector<std::pair<int32_t, int32_t>>&, const ExpertCache&, ExpertSource&, int64_t,
|
|
int64_t, int, int64_t, std::string& err) {
|
|
err = "--peer-device: the second-GPU expert tier is not ported to SYCL yet";
|
|
return false;
|
|
}
|
|
|
|
void PeerExperts::close() { device_ = -1; }
|
|
|
|
bool PeerExperts::launch(int64_t, const float*, const int32_t*, int64_t, int64_t, const int32_t*, std::string& err,
|
|
float*) {
|
|
err = "--peer-device: not available in the SYCL build";
|
|
return false;
|
|
}
|
|
|
|
bool PeerExperts::finish(float*, std::string& err) {
|
|
err = "--peer-device: not available in the SYCL build";
|
|
return false;
|
|
}
|
|
|
|
bool PeerExperts::adapt(const float*, const int32_t*, int, std::string&) { return true; }
|
|
void PeerExperts::apply_pending(bool) {}
|
|
|
|
} // namespace strata::core
|