feat: route experimental native expert misses through bounded KAR CUDA
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace strata::kar {
|
||||
|
||||
// Experimental native decode cache-miss arm. Prefill and cache hits retain
|
||||
// the native IQ weights. Not a full compressed-model serving implementation.
|
||||
class ExpertMiss {
|
||||
public:
|
||||
ExpertMiss();
|
||||
~ExpertMiss();
|
||||
bool open(const char* archive, uint32_t layers, uint32_t experts,
|
||||
uint32_t hidden, uint32_t intermediate, uint32_t level,
|
||||
std::string& error);
|
||||
bool compute(int64_t layer, const float* input, const int32_t* ids,
|
||||
int64_t tokens, int64_t k, int32_t* kind, float* output,
|
||||
std::string& error);
|
||||
static bool dispatch(void* user, int64_t layer, const float* input,
|
||||
const int32_t* ids, int64_t tokens, int64_t k,
|
||||
int32_t* kind, float* output, std::string& error);
|
||||
uint64_t computed() const;
|
||||
private:
|
||||
struct Impl;
|
||||
std::unique_ptr<Impl> impl_;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user