Add Vulkan longhaul support
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <condition_variable>
|
||||
#include <cstdint>
|
||||
#include <deque>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
@@ -43,6 +44,8 @@ private:
|
||||
const llama_model_loader::longhaul_source * source;
|
||||
int32_t expert_id;
|
||||
int slot;
|
||||
bool direct;
|
||||
std::vector<uint8_t> staging;
|
||||
bool ok = false;
|
||||
std::string error;
|
||||
};
|
||||
@@ -74,7 +77,6 @@ private:
|
||||
std::vector<int32_t> available_slots;
|
||||
std::vector<std::pair<int32_t, int32_t>> load_plan;
|
||||
std::vector<int32_t> id_buffer;
|
||||
std::vector<uint8_t> read_buffer;
|
||||
|
||||
std::vector<std::thread> io_workers;
|
||||
std::vector<io_job> io_jobs;
|
||||
@@ -85,7 +87,10 @@ private:
|
||||
size_t io_pending = 0;
|
||||
bool io_stopping = false;
|
||||
|
||||
std::map<ggml_backend_dev_t, ggml_backend_ptr> upload_backends;
|
||||
|
||||
bool source_is_direct(const llama_model_loader::longhaul_source & source) const;
|
||||
ggml_backend_t upload_backend(const llama_model_loader::longhaul_source & source);
|
||||
bool load_plan_sources();
|
||||
void invalidate_plan(int layer);
|
||||
void io_worker();
|
||||
|
||||
Reference in New Issue
Block a user