File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -2276,13 +2276,15 @@ void
2276
2276
ModelInstanceState::SetCurrentCudaStream (
2277
2277
const cudaStream_t& stream, const int & device_id)
2278
2278
{
2279
+ #ifdef TRITON_ENABLE_GPU
2279
2280
at::cuda::CUDAStream torch_stream =
2280
2281
at::cuda::getStreamFromExternal (stream, device_id);
2281
2282
// This function replaces the default stream with the stream we created. It
2282
2283
// is not necessary to change the current device to the desired device when
2283
2284
// replacing the default stream for that device. See the documentation here:
2284
2285
// https://pytorch.org/cppdocs/api/function_namespacec10_1_1cuda_1a6ed50cc0fc16cc7014d9c2f4c3bd098d.html
2285
2286
at::cuda::setCurrentCUDAStream (torch_stream);
2287
+ #endif
2286
2288
}
2287
2289
2288
2290
// ///////////
You can’t perform that action at this time.
0 commit comments