@@ -185,42 +185,50 @@ cdef extern from '<cufile.h>':
185185 ctypedef struct CUfileError_t ' CUfileError_t' :
186186 CUfileOpError err
187187 CUresult cu_err
188+
188189cdef struct _anon_pod0 ' _anon_pod0' :
189190 unsigned int major_version
190191 unsigned int minor_version
191192 size_t poll_thresh_size
192193 size_t max_direct_io_size
193194 unsigned int dstatusflags
194195 unsigned int dcontrolflags
196+
195197cdef extern from ' <cufile.h>' :
196198 ctypedef struct cufileRDMAInfo_t ' cufileRDMAInfo_t' :
197199 int version
198200 int desc_len
199201 char * desc_str
202+
200203cdef extern from ' <cufile.h>' :
201204 ctypedef struct CUfileFSOps_t ' CUfileFSOps_t' :
202205 char * (* fs_type)(void * )
203206 int (* getRDMADeviceList)(void * , sockaddr_t** )
204207 int (* getRDMADevicePriority)(void * , char * , size_t, loff_t, sockaddr_t* )
205208 ssize_t (* read)(void * , char * , size_t, loff_t, cufileRDMAInfo_t* )
206209 ssize_t (* write)(void * , const char * , size_t, loff_t, cufileRDMAInfo_t* )
210+
207211cdef union _anon_pod1 ' _anon_pod1' :
208212 int fd
209213 void * handle
214+
210215cdef struct _anon_pod3 ' _anon_pod3' :
211216 void * devPtr_base
212217 off_t file_offset
213218 off_t devPtr_offset
214219 size_t size
220+
215221cdef extern from ' <cufile.h>' :
216222 ctypedef struct CUfileIOEvents_t ' CUfileIOEvents_t' :
217223 void * cookie
218224 CUfileStatus_t status
219225 size_t ret
226+
220227cdef extern from ' <cufile.h>' :
221228 ctypedef struct CUfileOpCounter_t ' CUfileOpCounter_t' :
222229 uint64_t ok
223230 uint64_t err
231+
224232cdef extern from ' <cufile.h>' :
225233 ctypedef struct CUfilePerGpuStats_t ' CUfilePerGpuStats_t' :
226234 char uuid[16 ]
@@ -253,6 +261,7 @@ cdef extern from '<cufile.h>':
253261 uint64_t n_mmap_err
254262 uint64_t n_mmap_free
255263 uint64_t reg_bytes
264+
256265cdef extern from ' <cufile.h>' :
257266 ctypedef struct CUfileDrvProps_t ' CUfileDrvProps_t' :
258267 _anon_pod0 nvfs
@@ -262,13 +271,16 @@ cdef extern from '<cufile.h>':
262271 unsigned int max_device_pinned_mem_size
263272 unsigned int max_batch_io_size
264273 unsigned int max_batch_io_timeout_msecs
274+
265275cdef extern from ' <cufile.h>' :
266276 ctypedef struct CUfileDescr_t ' CUfileDescr_t' :
267277 CUfileFileHandleType type
268278 _anon_pod1 handle
269279 CUfileFSOps_t* fs_ops
280+
270281cdef union _anon_pod2 ' _anon_pod2' :
271282 _anon_pod3 batch
283+
272284cdef extern from ' <cufile.h>' :
273285 ctypedef struct CUfileStatsLevel1_t ' CUfileStatsLevel1_t' :
274286 CUfileOpCounter_t read_ops
@@ -314,25 +326,29 @@ cdef extern from '<cufile.h>':
314326 uint64_t batch_completion_lat_sum_us
315327 uint64_t last_batch_read_bytes
316328 uint64_t last_batch_write_bytes
329+
317330cdef extern from ' <cufile.h>' :
318331 ctypedef struct CUfileIOParams_t ' CUfileIOParams_t' :
319332 CUfileBatchMode_t mode
320333 _anon_pod2 u
321334 CUfileHandle_t fh
322335 CUfileOpcode_t opcode
323336 void * cookie
337+
324338cdef extern from ' <cufile.h>' :
325339 ctypedef struct CUfileStatsLevel2_t ' CUfileStatsLevel2_t' :
326340 CUfileStatsLevel1_t basic
327341 uint64_t read_size_kb_hist[32 ]
328342 uint64_t write_size_kb_hist[32 ]
343+
329344cdef extern from ' <cufile.h>' :
330345 ctypedef struct CUfileStatsLevel3_t ' CUfileStatsLevel3_t' :
331346 CUfileStatsLevel2_t detailed
332347 uint32_t num_gpus
333348 CUfilePerGpuStats_t per_gpu_stats[16 ]
334349
335350
351+
336352cdef extern from * :
337353 """
338354 // This is the missing piece we need to supply to help Cython & C++ compilers.
0 commit comments