support multi npu partially

This commit is contained in:
starkwj
2026-01-08 06:54:33 +00:00
parent fa0fb46853
commit b760eada0a
12 changed files with 331 additions and 160 deletions

View File

@@ -7,7 +7,7 @@ class ShmManager {
ShmManager();
~ShmManager();
void set_gpu_info(uint64_t vmem_size, uint64_t shared_handle);
void set_gpu_info(int gpu_id, uint64_t vmem_size, uint64_t shared_handle);
// request
void process_requests();
@@ -29,6 +29,7 @@ class ShmManager {
ShmHelper *shm_helper;
std::vector<int32_t> local_worker_tgids;
std::vector<int32_t> alive_worker_tgids;
std::vector<int> valid_gpu_ids;
std::atomic<bool> stop_loop_flag;
std::function<void(const std::vector<int32_t> &)> cb_on_worker_change;
};