33 * of Tennessee Research Foundation. All rights
44 * reserved.
55 * Copyright (c) 2014-2015 NVIDIA Corporation. All rights reserved.
6+ * Copyright (c) 2024 Triad National Security, LLC. All rights reserved.
67 * $COPYRIGHT$
78 *
89 * Additional copyrights may follow
910 *
1011 * $HEADER$
1112 */
1213
13- #ifndef MCA_COLL_CUDA_EXPORT_H
14- #define MCA_COLL_CUDA_EXPORT_H
14+ #ifndef MCA_COLL_ACCELERATOR_EXPORT_H
15+ #define MCA_COLL_ACCELERATOR_EXPORT_H
1516
1617#include "ompi_config.h"
1718
@@ -31,43 +32,43 @@ BEGIN_C_DECLS
3132
3233/* API functions */
3334
34- int mca_coll_cuda_init_query (bool enable_progress_threads ,
35+ int mca_coll_accelerator_init_query (bool enable_progress_threads ,
3536 bool enable_mpi_threads );
3637mca_coll_base_module_t
37- * mca_coll_cuda_comm_query (struct ompi_communicator_t * comm ,
38+ * mca_coll_accelerator_comm_query (struct ompi_communicator_t * comm ,
3839 int * priority );
3940
40- int mca_coll_cuda_module_enable (mca_coll_base_module_t * module ,
41+ int mca_coll_accelerator_module_enable (mca_coll_base_module_t * module ,
4142 struct ompi_communicator_t * comm );
4243
4344int
44- mca_coll_cuda_allreduce (const void * sbuf , void * rbuf , int count ,
45+ mca_coll_accelerator_allreduce (const void * sbuf , void * rbuf , int count ,
4546 struct ompi_datatype_t * dtype ,
4647 struct ompi_op_t * op ,
4748 struct ompi_communicator_t * comm ,
4849 mca_coll_base_module_t * module );
4950
50- int mca_coll_cuda_reduce (const void * sbuf , void * rbuf , int count ,
51+ int mca_coll_accelerator_reduce (const void * sbuf , void * rbuf , int count ,
5152 struct ompi_datatype_t * dtype ,
5253 struct ompi_op_t * op ,
5354 int root ,
5455 struct ompi_communicator_t * comm ,
5556 mca_coll_base_module_t * module );
5657
57- int mca_coll_cuda_exscan (const void * sbuf , void * rbuf , int count ,
58+ int mca_coll_accelerator_exscan (const void * sbuf , void * rbuf , int count ,
5859 struct ompi_datatype_t * dtype ,
5960 struct ompi_op_t * op ,
6061 struct ompi_communicator_t * comm ,
6162 mca_coll_base_module_t * module );
6263
63- int mca_coll_cuda_scan (const void * sbuf , void * rbuf , int count ,
64+ int mca_coll_accelerator_scan (const void * sbuf , void * rbuf , int count ,
6465 struct ompi_datatype_t * dtype ,
6566 struct ompi_op_t * op ,
6667 struct ompi_communicator_t * comm ,
6768 mca_coll_base_module_t * module );
6869
6970int
70- mca_coll_cuda_reduce_scatter_block (const void * sbuf , void * rbuf , int rcount ,
71+ mca_coll_accelerator_reduce_scatter_block (const void * sbuf , void * rbuf , int rcount ,
7172 struct ompi_datatype_t * dtype ,
7273 struct ompi_op_t * op ,
7374 struct ompi_communicator_t * comm ,
@@ -83,7 +84,7 @@ mca_coll_cuda_reduce_scatter_block(const void *sbuf, void *rbuf, int rcount,
8384 * @retval >0 The buffer belongs to a managed buffer in
8485 * device memory.
8586 */
86- static inline int mca_coll_cuda_check_buf (void * addr )
87+ static inline int mca_coll_accelerator_check_buf (void * addr )
8788{
8889 uint64_t flags ;
8990 int dev_id ;
@@ -94,13 +95,13 @@ static inline int mca_coll_cuda_check_buf(void *addr)
9495 }
9596}
9697
97- static inline void * mca_coll_cuda_memcpy (void * dest , const void * src , size_t size )
98+ static inline void * mca_coll_accelerator_memcpy (void * dest , const void * src , size_t size )
9899{
99100 int res ;
100101 res = opal_accelerator .mem_copy (MCA_ACCELERATOR_NO_DEVICE_ID , MCA_ACCELERATOR_NO_DEVICE_ID ,
101102 dest , src , size , MCA_ACCELERATOR_TRANSFER_UNSPEC );
102103 if (res != 0 ) {
103- opal_output (0 , "CUDA : Error in cuMemcpy : res=%d, dest=%p, src=%p, size=%d" , res , dest , src ,
104+ opal_output (0 , "coll/accelerator : Error in mem_copy : res=%d, dest=%p, src=%p, size=%d" , res , dest , src ,
104105 (int ) size );
105106 abort ();
106107 } else {
@@ -111,28 +112,28 @@ static inline void *mca_coll_cuda_memcpy(void *dest, const void *src, size_t siz
111112/* Types */
112113/* Module */
113114
114- typedef struct mca_coll_cuda_module_t {
115+ typedef struct mca_coll_accelerator_module_t {
115116 mca_coll_base_module_t super ;
116117
117118 /* Pointers to all the "real" collective functions */
118119 mca_coll_base_comm_coll_t c_coll ;
119- } mca_coll_cuda_module_t ;
120+ } mca_coll_accelerator_module_t ;
120121
121- OBJ_CLASS_DECLARATION (mca_coll_cuda_module_t );
122+ OBJ_CLASS_DECLARATION (mca_coll_accelerator_module_t );
122123
123124/* Component */
124125
125- typedef struct mca_coll_cuda_component_t {
126+ typedef struct mca_coll_accelerator_component_t {
126127 mca_coll_base_component_2_4_0_t super ;
127128
128129 int priority ; /* Priority of this component */
129- int disable_cuda_coll ; /* Force disable of the CUDA collective component */
130- } mca_coll_cuda_component_t ;
130+ int disable_accelerator_coll ; /* Force disable of the accelerator collective component */
131+ } mca_coll_accelerator_component_t ;
131132
132133/* Globally exported variables */
133134
134- OMPI_DECLSPEC extern mca_coll_cuda_component_t mca_coll_cuda_component ;
135+ OMPI_DECLSPEC extern mca_coll_accelerator_component_t mca_coll_accelerator_component ;
135136
136137END_C_DECLS
137138
138- #endif /* MCA_COLL_CUDA_EXPORT_H */
139+ #endif /* MCA_COLL_ACCELERATOR_EXPORT_H */
0 commit comments