@@ -59,29 +59,23 @@ void OrtModel::reset(std::unordered_map<std::string, std::string> optionsMap)
5959
6060 std::string dev_mem_str = " Hip" ;
6161#if defined(ORT_ROCM_BUILD)
62- #if ORT_ROCM_BUILD == 1
63- if (device == " ROCM" ) {
64- Ort::ThrowOnError (OrtSessionOptionsAppendExecutionProvider_ROCM (pImplOrt->sessionOptions , deviceId));
65- LOG (info) << " (ORT) ROCM execution provider set" ;
66- }
67- #endif
62+ if (device == " ROCM" ) {
63+ Ort::ThrowOnError (OrtSessionOptionsAppendExecutionProvider_ROCM (pImplOrt->sessionOptions , deviceId));
64+ LOG (info) << " (ORT) ROCM execution provider set" ;
65+ }
6866#endif
6967#if defined(ORT_MIGRAPHX_BUILD)
70- #if ORT_MIGRAPHX_BUILD == 1
71- if (device == " MIGRAPHX" ) {
72- Ort::ThrowOnError (OrtSessionOptionsAppendExecutionProvider_MIGraphX (pImplOrt->sessionOptions , deviceId));
73- LOG (info) << " (ORT) MIGraphX execution provider set" ;
74- }
75- #endif
68+ if (device == " MIGRAPHX" ) {
69+ Ort::ThrowOnError (OrtSessionOptionsAppendExecutionProvider_MIGraphX (pImplOrt->sessionOptions , deviceId));
70+ LOG (info) << " (ORT) MIGraphX execution provider set" ;
71+ }
7672#endif
7773#if defined(ORT_CUDA_BUILD)
78- #if ORT_CUDA_BUILD == 1
79- if (device == " CUDA" ) {
80- Ort::ThrowOnError (OrtSessionOptionsAppendExecutionProvider_CUDA (pImplOrt->sessionOptions , deviceId));
81- LOG (info) << " (ORT) CUDA execution provider set" ;
82- dev_mem_str = " Cuda" ;
83- }
84- #endif
74+ if (device == " CUDA" ) {
75+ Ort::ThrowOnError (OrtSessionOptionsAppendExecutionProvider_CUDA (pImplOrt->sessionOptions , deviceId));
76+ LOG (info) << " (ORT) CUDA execution provider set" ;
77+ dev_mem_str = " Cuda" ;
78+ }
8579#endif
8680
8781 if (allocateDeviceMemory) {
0 commit comments