vllm-ascend vnpu v1

This commit is contained in:
starkwj
2025-12-26 07:37:35 +00:00
parent 2f1aed98cc
commit 135cc0a505
168 changed files with 28337 additions and 9 deletions

View File

@@ -0,0 +1,29 @@
#pragma once
#include "shm_helper.h"
class ShmWorker {
public:
ShmWorker();
~ShmWorker();
bool register_worker(int32_t tgid, uint64_t *out_shareable_handle,
uint64_t *out_vmem_size);
bool lock_gpu();
void unlock_gpu();
private:
int32_t tgid;
ShmHelper *shm_helper;
std::thread heart_beat_thread;
std::atomic<bool> stop_heart_beat;
// request
uint64_t make_request(uint32_t type, uint64_t parameter);
int register_worker_shm();
// heart beat
void heart_beat_loop(int slot);
};