Finish DS4 execution parity
This commit is contained in:
@@ -368,6 +368,25 @@ static uint64_t g_stream_expert_timing_cache_all_missing_layers;
|
||||
static uint64_t g_stream_expert_timing_cache_mixed_layers;
|
||||
static uint64_t g_stream_expert_timing_cache_resident_experts;
|
||||
static uint64_t g_stream_expert_timing_cache_missing_experts;
|
||||
|
||||
void ds4_gpu_stream_expert_cache_get_stats(
|
||||
ds4_gpu_stream_expert_cache_stats *stats) {
|
||||
if (!stats) return;
|
||||
*stats = (ds4_gpu_stream_expert_cache_stats) {
|
||||
.configured_count = ds4_gpu_stream_expert_cache_configured_count(),
|
||||
.current_count = g_stream_expert_cache_entry_count,
|
||||
.hits = g_stream_expert_cache_hits,
|
||||
.misses = g_stream_expert_cache_misses,
|
||||
.evictions = g_stream_expert_cache_evictions,
|
||||
.wraps = g_stream_expert_cache_wraps,
|
||||
.buffer_allocs = g_stream_expert_cache_buffer_allocs,
|
||||
.buffer_reuses = g_stream_expert_cache_buffer_reuses,
|
||||
.evict_advise_bytes = g_stream_expert_cache_evict_advise_bytes,
|
||||
.willneed_advise_bytes = g_stream_expert_cache_willneed_advise_bytes,
|
||||
.pread_bytes = g_stream_expert_cache_pread_bytes,
|
||||
.pread_ms = g_stream_expert_cache_pread_ms,
|
||||
};
|
||||
}
|
||||
typedef struct {
|
||||
uint64_t selected_calls;
|
||||
double selected_read_ms;
|
||||
@@ -32798,7 +32817,18 @@ int ds4_gpu_glm_routed_moe_one_tensor(
|
||||
downbuf = ds4_gpu_wrap_model_range(model_map, model_size,
|
||||
down_offset, down_tensor_bytes,
|
||||
&down_inner);
|
||||
if (!gatebuf || !upbuf || !downbuf) return 0;
|
||||
if (!gatebuf || !upbuf || !downbuf) {
|
||||
fprintf(stderr,
|
||||
"ds4: Metal GLM routed MoE could not map resident fallback layer=%u "
|
||||
"streaming=%d force_resident=%d gate_type=%u down_type=%u budget=%u\n",
|
||||
layer_index,
|
||||
g_ssd_streaming_mode,
|
||||
force_resident,
|
||||
gate_type,
|
||||
down_type,
|
||||
ds4_gpu_stream_expert_cache_configured_budget());
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
id<MTLComputePipelineState> pair_pipeline =
|
||||
|
||||
Reference in New Issue
Block a user