|
15 | 15 | * Copyright (c) 2015 Research Organization for Information Science |
16 | 16 | * and Technology (RIST). All rights reserved. |
17 | 17 | * Copyright (c) 2017 Intel, Inc. All rights reserved |
| 18 | + * Copyright (c) 2021 Triad National Security, LLC. All rights |
| 19 | + * reserved. |
18 | 20 | * $COPYRIGHT$ |
19 | 21 | * |
20 | 22 | * Additional copyrights may follow |
|
31 | 33 | #include "ompi/mca/pml/pml.h" |
32 | 34 | #include "ompi/mca/mtl/mtl.h" |
33 | 35 | #include "opal/prefetch.h" |
| 36 | +#include "opal/runtime/opal_params.h" |
34 | 37 |
|
35 | 38 | struct mca_pml_cm_send_request_t { |
36 | 39 | mca_pml_cm_request_t req_base; |
@@ -242,14 +245,16 @@ do { \ |
242 | 245 | (unsigned char*)buf + datatype->super.true_lb; \ |
243 | 246 | (req_send)->req_base.req_convertor.count = count; \ |
244 | 247 | (req_send)->req_base.req_convertor.pDesc = &datatype->super; \ |
245 | | - /* Switches off CUDA detection if \ |
246 | | - MTL set MCA_MTL_BASE_FLAG_CUDA_INIT_DISABLE during init */ \ |
247 | | - MCA_PML_CM_SWITCH_CUDA_CONVERTOR_OFF(flags, datatype, count); \ |
248 | | - (req_send)->req_base.req_convertor.flags |= flags; \ |
249 | | - /* Sets CONVERTOR_CUDA flag if CUDA buffer */ \ |
250 | | - opal_convertor_prepare_for_send( \ |
251 | | - &req_send->req_base.req_convertor, \ |
252 | | - &datatype->super, count, buf ); \ |
| 248 | + if (opal_built_with_cuda_support) { \ |
| 249 | + /* Switches off CUDA detection if \ |
| 250 | + MTL set MCA_MTL_BASE_FLAG_CUDA_INIT_DISABLE during init */ \ |
| 251 | + MCA_PML_CM_SWITCH_CUDA_CONVERTOR_OFF(flags, datatype, count); \ |
| 252 | + (req_send)->req_base.req_convertor.flags |= flags; \ |
| 253 | + /* Sets CONVERTOR_CUDA flag if CUDA buffer */ \ |
| 254 | + opal_convertor_prepare_for_send( \ |
| 255 | + &req_send->req_base.req_convertor, \ |
| 256 | + &datatype->super, count, buf ); \ |
| 257 | + } \ |
253 | 258 | } else { \ |
254 | 259 | MCA_PML_CM_SWITCH_CUDA_CONVERTOR_OFF(flags, datatype, count); \ |
255 | 260 | opal_convertor_copy_and_prepare_for_send( \ |
|
0 commit comments