3
3
* of Tennessee Research Foundation. All rights
4
4
* reserved.
5
5
* Copyright (c) 2014-2015 NVIDIA Corporation. All rights reserved.
6
+ * Copyright (c) 2024 Triad National Security, LLC. All rights reserved.
6
7
* $COPYRIGHT$
7
8
*
8
9
* Additional copyrights may follow
9
10
*
10
11
* $HEADER$
11
12
*/
12
13
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
15
16
16
17
#include "ompi_config.h"
17
18
@@ -31,43 +32,43 @@ BEGIN_C_DECLS
31
32
32
33
/* API functions */
33
34
34
- int mca_coll_cuda_init_query (bool enable_progress_threads ,
35
+ int mca_coll_accelerator_init_query (bool enable_progress_threads ,
35
36
bool enable_mpi_threads );
36
37
mca_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 ,
38
39
int * priority );
39
40
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 ,
41
42
struct ompi_communicator_t * comm );
42
43
43
44
int
44
- mca_coll_cuda_allreduce (const void * sbuf , void * rbuf , int count ,
45
+ mca_coll_accelerator_allreduce (const void * sbuf , void * rbuf , int count ,
45
46
struct ompi_datatype_t * dtype ,
46
47
struct ompi_op_t * op ,
47
48
struct ompi_communicator_t * comm ,
48
49
mca_coll_base_module_t * module );
49
50
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 ,
51
52
struct ompi_datatype_t * dtype ,
52
53
struct ompi_op_t * op ,
53
54
int root ,
54
55
struct ompi_communicator_t * comm ,
55
56
mca_coll_base_module_t * module );
56
57
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 ,
58
59
struct ompi_datatype_t * dtype ,
59
60
struct ompi_op_t * op ,
60
61
struct ompi_communicator_t * comm ,
61
62
mca_coll_base_module_t * module );
62
63
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 ,
64
65
struct ompi_datatype_t * dtype ,
65
66
struct ompi_op_t * op ,
66
67
struct ompi_communicator_t * comm ,
67
68
mca_coll_base_module_t * module );
68
69
69
70
int
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 ,
71
72
struct ompi_datatype_t * dtype ,
72
73
struct ompi_op_t * op ,
73
74
struct ompi_communicator_t * comm ,
@@ -83,7 +84,7 @@ mca_coll_cuda_reduce_scatter_block(const void *sbuf, void *rbuf, int rcount,
83
84
* @retval >0 The buffer belongs to a managed buffer in
84
85
* device memory.
85
86
*/
86
- static inline int mca_coll_cuda_check_buf (void * addr )
87
+ static inline int mca_coll_accelerator_check_buf (void * addr )
87
88
{
88
89
uint64_t flags ;
89
90
int dev_id ;
@@ -94,13 +95,13 @@ static inline int mca_coll_cuda_check_buf(void *addr)
94
95
}
95
96
}
96
97
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 )
98
99
{
99
100
int res ;
100
101
res = opal_accelerator .mem_copy (MCA_ACCELERATOR_NO_DEVICE_ID , MCA_ACCELERATOR_NO_DEVICE_ID ,
101
102
dest , src , size , MCA_ACCELERATOR_TRANSFER_UNSPEC );
102
103
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 ,
104
105
(int ) size );
105
106
abort ();
106
107
} else {
@@ -111,28 +112,28 @@ static inline void *mca_coll_cuda_memcpy(void *dest, const void *src, size_t siz
111
112
/* Types */
112
113
/* Module */
113
114
114
- typedef struct mca_coll_cuda_module_t {
115
+ typedef struct mca_coll_accelerator_module_t {
115
116
mca_coll_base_module_t super ;
116
117
117
118
/* Pointers to all the "real" collective functions */
118
119
mca_coll_base_comm_coll_t c_coll ;
119
- } mca_coll_cuda_module_t ;
120
+ } mca_coll_accelerator_module_t ;
120
121
121
- OBJ_CLASS_DECLARATION (mca_coll_cuda_module_t );
122
+ OBJ_CLASS_DECLARATION (mca_coll_accelerator_module_t );
122
123
123
124
/* Component */
124
125
125
- typedef struct mca_coll_cuda_component_t {
126
+ typedef struct mca_coll_accelerator_component_t {
126
127
mca_coll_base_component_2_4_0_t super ;
127
128
128
129
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 ;
131
132
132
133
/* Globally exported variables */
133
134
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 ;
135
136
136
137
END_C_DECLS
137
138
138
- #endif /* MCA_COLL_CUDA_EXPORT_H */
139
+ #endif /* MCA_COLL_ACCELERATOR_EXPORT_H */
0 commit comments