MCPcopy Create free account
hub / github.com/catboost/catboost / RequestStream

Method RequestStream

catboost/cuda/cuda_lib/cuda_manager.cpp:227–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225}
226
227TComputationStream TCudaManager::RequestStream() {
228 if (FreeStreams.size() == 0) {
229 TDistributedObject<ui32> stream = CreateDistributedObject<ui32>();
230 for (ui64 dev = 0; dev < stream.DeviceCount(); ++dev) {
231 if (IsActiveDevice[dev]) {
232 stream.Set(dev, GetState().Devices[dev]->RequestStream());
233 } else {
234 stream.Set(dev, 0);
235 }
236 }
237 FreeStreams.push_back(Streams.size());
238 Streams.push_back(stream);
239 }
240
241 ui32 id = FreeStreams.back();
242 FreeStreams.pop_back();
243 return TComputationStream(id, this);
244}
245
246bool TCudaManager::HasRemoteDevices() const {
247 for (auto dev : State->Devices) {

Callers 9

TComputationStreamMethod · 0.45
RequestStreamFunction · 0.45
ExecMethod · 0.45
TestBatchReduceFunction · 0.45
Y_UNIT_TESTFunction · 0.45
Y_UNIT_TESTFunction · 0.45
Y_UNIT_TESTFunction · 0.45
RunInStreamsFunction · 0.45
Y_UNIT_TESTFunction · 0.45

Calls 7

DeviceCountMethod · 0.80
TComputationStreamClass · 0.70
sizeMethod · 0.45
SetMethod · 0.45
push_backMethod · 0.45
backMethod · 0.45
pop_backMethod · 0.45

Tested by 5

TestBatchReduceFunction · 0.36
Y_UNIT_TESTFunction · 0.36
Y_UNIT_TESTFunction · 0.36
Y_UNIT_TESTFunction · 0.36
Y_UNIT_TESTFunction · 0.36