cuda_stream_manager.cpp 391 Bytes
Newer Older
Rick Ho's avatar
Rick Ho committed
1
#include <cassert>
2
#include <thread>
Rick Ho's avatar
Rick Ho committed
3
4
5

#include "cuda_stream_manager.h"

6
thread_local CudaStreamManager smgr;
Rick Ho's avatar
Rick Ho committed
7

8
9

/*
Jiezhong Qiu's avatar
Jiezhong Qiu committed
10
CudaStreamManager* getCudaStreamManager(const size_t num_expert, const int device) { 
Rick Ho's avatar
Rick Ho committed
11
    if (!smgr) {
Jiezhong Qiu's avatar
Jiezhong Qiu committed
12
        smgr = new CudaStreamManager(num_expert, device);        
Rick Ho's avatar
Rick Ho committed
13
14
    }
    assert(smgr->num_expert == num_expert);
Jiezhong Qiu's avatar
Jiezhong Qiu committed
15
    assert(smgr->device == device);
Rick Ho's avatar
Rick Ho committed
16
17
    return smgr;
}
18
*/