MCPcopy Create free account
hub / github.com/NVIDIA/nvcomp / create_gpu_streams

Function create_gpu_streams

benchmarks/benchmark_allgather.cpp:184–197  ·  view source on GitHub ↗

Create all needed streams one each GPU

Source from the content-addressed store, hash-verified

182
183// Create all needed streams one each GPU
184static void create_gpu_streams(
185 std::vector<std::vector<cudaStream_t>>* streams,
186 const int gpus,
187 int STREAMS_PER_GPU)
188{
189 streams->resize(gpus);
190 for (int i = 0; i < gpus; ++i) {
191 CUDA_CHECK(cudaSetDevice(i));
192 (*streams)[i].resize(STREAMS_PER_GPU);
193 for (int j = 0; j < STREAMS_PER_GPU; ++j) {
194 cudaStreamCreateWithFlags(&((*streams)[i][j]), cudaStreamNonBlocking);
195 }
196 }
197}
198
199// Synchronize all streams on all GPUs
200static void sync_all_streams(

Callers 2

run_lz4_benchmarkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected