@@ -661,9 +661,9 @@ void GPUReconstructionCUDA::endGPUProfiling()
661661 GPUChkErr (cudaProfilerStop ());
662662}
663663
664- #if defined(ORT_CUDA_BUILD) && ORT_CUDA_BUILD == 1
665664void GPUReconstructionCUDA::SetONNXGPUStream (Ort::SessionOptions& session_options, int32_t stream, int32_t * deviceId)
666665{
666+ #if defined(ORT_CUDA_BUILD) && ORT_CUDA_BUILD == 1
667667 cudaGetDevice (deviceId);
668668 OrtCUDAProviderOptionsV2* cuda_options = nullptr ;
669669 CreateCUDAProviderOptions (&cuda_options);
@@ -679,8 +679,8 @@ void GPUReconstructionCUDA::SetONNXGPUStream(Ort::SessionOptions& session_option
679679
680680 // Finally, don't forget to release the provider options
681681 ReleaseCUDAProviderOptions (cuda_options);
682+ #endif // ORT_CUDA_BUILD
682683}
683- #endif // GPUCA_HAS_ONNX
684684
685685#else // HIP
686686void * GPUReconstructionHIP::getGPUPointer (void * ptr)
@@ -690,9 +690,9 @@ void* GPUReconstructionHIP::getGPUPointer(void* ptr)
690690 return retVal;
691691}
692692
693- #if defined(ORT_ROCM_BUILD) && ORT_ROCM_BUILD == 1
694693void GPUReconstructionHIP::SetONNXGPUStream (Ort::SessionOptions& session_options, int32_t stream, int32_t * deviceId)
695694{
695+ #if defined(ORT_ROCM_BUILD) && ORT_ROCM_BUILD == 1
696696 // Create ROCm provider options
697697 cudaGetDevice (deviceId);
698698 // const auto& api = Ort::GetApi();
@@ -702,9 +702,8 @@ void GPUReconstructionHIP::SetONNXGPUStream(Ort::SessionOptions& session_options
702702 rocm_options.arena_extend_strategy = 0 ;
703703 rocm_options.user_compute_stream = mInternals ->Streams [stream];
704704 session_options.AppendExecutionProvider_ROCM (rocm_options);
705+ #endif // ORT_ROCM_BUILD
705706}
706-
707- #endif // GPUCA_HAS_ONNX
708707#endif // __HIPCC__
709708
710709namespace o2 ::gpu
0 commit comments