Skip to content
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
d2e782e
Add 13.0 Tests
chloechia4 Oct 1, 2025
251e888
Add first set of generated cybind bindings
chloechia4 Oct 1, 2025
3ea65c8
Add _internal cybind generated bindings
chloechia4 Oct 1, 2025
343c4c7
Remove overriding tests
chloechia4 Oct 1, 2025
d29340a
Add previously deleted test
chloechia4 Oct 1, 2025
ef73d2e
Simplify test_batch_io_large_operations
chloechia4 Oct 1, 2025
ffe71b5
fmt
chloechia4 Oct 1, 2025
01a4b71
add _internal bindings
chloechia4 Oct 13, 2025
1193c05
add main bindings
chloechia4 Oct 13, 2025
202a206
fmt
chloechia4 Oct 13, 2025
e2a7e4b
test fmt
chloechia4 Oct 13, 2025
dad236b
bindings
chloechia4 Oct 13, 2025
cdee97d
remove files
chloechia4 Oct 14, 2025
902406b
remove unnecessary write check
chloechia4 Oct 14, 2025
2beaf11
add field checks for stats
chloechia4 Oct 15, 2025
9883354
add test for get_parameter_min_max and add pytest marker
chloechia4 Oct 15, 2025
60728da
reference exposed classes for stats tests
chloechia4 Oct 16, 2025
8ff0764
add OpsCounter and GPUStats
chloechia4 Oct 16, 2025
73ece8b
add new driver pxd and pyx files
chloechia4 Oct 16, 2025
98b2c95
add right bindings
chloechia4 Oct 16, 2025
94a1778
test fixes
chloechia4 Oct 16, 2025
49be89b
add tests
chloechia4 Oct 16, 2025
15ff0f4
Display cufile.log
mdboom Oct 16, 2025
df09b4a
Merge branch 'main' into main
chloechia4 Oct 16, 2025
26e696b
Try again to get logs out
mdboom Oct 16, 2025
f73707d
Don't hard stop when fail
mdboom Oct 16, 2025
eb006db
Try to be a little more robust
mdboom Oct 16, 2025
c19ab18
Remove attempt to get cufile log out
mdboom Oct 16, 2025
d603adc
Mark test as 'skip'
mdboom Oct 16, 2025
12f4ad0
Remove || true
mdboom Oct 16, 2025
e1eabf8
fix tests that have side effects & bugs; remove skip
leofang Oct 17, 2025
6b0f17a
stats
chloechia4 Oct 17, 2025
69f41c5
Merge branch 'main' into main
chloechia4 Oct 17, 2025
c86d5b4
Pull in the latest cybind changes from https://gitlab-master.nvidia.c…
mdboom Oct 20, 2025
65573fc
Update get_parameter_min_max_value API
mdboom Oct 20, 2025
642be44
Fix test
mdboom Oct 20, 2025
a9584c8
Reset stats when changed
mdboom Oct 20, 2025
3f81345
Disabling a broken test
mdboom Oct 20, 2025
8e9d052
Merge branch 'main' of https://github.com/chloechia4/cuda-python1 int…
leofang Oct 20, 2025
ed6eeb2
bring back all cdef classes
leofang Oct 20, 2025
125f968
Merge branch 'main' into main
mdboom Oct 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cuda_bindings/cuda/bindings/_internal/cufile.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ cdef CUfileError_t _cuFileBufDeregister(const void* bufPtr_base) except?<CUfileE
cdef ssize_t _cuFileRead(CUfileHandle_t fh, void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil
cdef ssize_t _cuFileWrite(CUfileHandle_t fh, const void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil
cdef CUfileError_t _cuFileDriverOpen() except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
cdef CUfileError_t _cuFileDriverClose() except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
cdef CUfileError_t _cuFileDriverClose_v2() except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
cdef long _cuFileUseCount() except* nogil
cdef CUfileError_t _cuFileDriverGetProperties(CUfileDrvProps_t* props) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
Expand All @@ -41,7 +42,6 @@ cdef CUfileError_t _cuFileGetParameterString(CUFileStringConfigParameter_t param
cdef CUfileError_t _cuFileSetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t value) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
cdef CUfileError_t _cuFileSetParameterBool(CUFileBoolConfigParameter_t param, cpp_bool value) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
cdef CUfileError_t _cuFileSetParameterString(CUFileStringConfigParameter_t param, const char* desc_str) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
cdef CUfileError_t _cuFileDriverClose() except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
cdef CUfileError_t _cuFileGetParameterMinMaxValue(CUFileSizeTConfigParameter_t param, size_t* min_value, size_t* max_value) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
cdef CUfileError_t _cuFileSetStatsLevel(int level) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
cdef CUfileError_t _cuFileGetStatsLevel(int* level) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
Expand Down
42 changes: 21 additions & 21 deletions cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ cdef void* __cuFileBufDeregister = NULL
cdef void* __cuFileRead = NULL
cdef void* __cuFileWrite = NULL
cdef void* __cuFileDriverOpen = NULL
cdef void* __cuFileDriverClose = NULL
cdef void* __cuFileDriverClose_v2 = NULL
cdef void* __cuFileUseCount = NULL
cdef void* __cuFileDriverGetProperties = NULL
Expand All @@ -91,7 +92,6 @@ cdef void* __cuFileGetParameterString = NULL
cdef void* __cuFileSetParameterSizeT = NULL
cdef void* __cuFileSetParameterBool = NULL
cdef void* __cuFileSetParameterString = NULL
cdef void* __cuFileDriverClose = NULL
cdef void* __cuFileGetParameterMinMaxValue = NULL
cdef void* __cuFileSetStatsLevel = NULL
cdef void* __cuFileGetStatsLevel = NULL
Expand Down Expand Up @@ -167,6 +167,13 @@ cdef int __check_or_init_cufile() except -1 nogil:
handle = load_library()
__cuFileDriverOpen = dlsym(handle, 'cuFileDriverOpen')

global __cuFileDriverClose
__cuFileDriverClose = dlsym(RTLD_DEFAULT, 'cuFileDriverClose')
if __cuFileDriverClose == NULL:
if handle == NULL:
handle = load_library()
__cuFileDriverClose = dlsym(handle, 'cuFileDriverClose')

global __cuFileDriverClose_v2
__cuFileDriverClose_v2 = dlsym(RTLD_DEFAULT, 'cuFileDriverClose_v2')
if __cuFileDriverClose_v2 == NULL:
Expand Down Expand Up @@ -328,13 +335,6 @@ cdef int __check_or_init_cufile() except -1 nogil:
handle = load_library()
__cuFileSetParameterString = dlsym(handle, 'cuFileSetParameterString')

global __cuFileDriverClose
__cuFileDriverClose = dlsym(RTLD_DEFAULT, 'cuFileDriverClose')
if __cuFileDriverClose == NULL:
if handle == NULL:
handle = load_library()
__cuFileDriverClose = dlsym(handle, 'cuFileDriverClose')

global __cuFileGetParameterMinMaxValue
__cuFileGetParameterMinMaxValue = dlsym(RTLD_DEFAULT, 'cuFileGetParameterMinMaxValue')
if __cuFileGetParameterMinMaxValue == NULL:
Expand Down Expand Up @@ -462,6 +462,9 @@ cpdef dict _inspect_function_pointers():
global __cuFileDriverOpen
data["__cuFileDriverOpen"] = <intptr_t>__cuFileDriverOpen

global __cuFileDriverClose
data["__cuFileDriverClose"] = <intptr_t>__cuFileDriverClose

global __cuFileDriverClose_v2
data["__cuFileDriverClose_v2"] = <intptr_t>__cuFileDriverClose_v2

Expand Down Expand Up @@ -531,9 +534,6 @@ cpdef dict _inspect_function_pointers():
global __cuFileSetParameterString
data["__cuFileSetParameterString"] = <intptr_t>__cuFileSetParameterString

global __cuFileDriverClose
data["__cuFileDriverClose"] = <intptr_t>__cuFileDriverClose

global __cuFileGetParameterMinMaxValue
data["__cuFileGetParameterMinMaxValue"] = <intptr_t>__cuFileGetParameterMinMaxValue

Expand Down Expand Up @@ -656,6 +656,16 @@ cdef CUfileError_t _cuFileDriverOpen() except?<CUfileError_t>CUFILE_LOADING_ERRO
)


cdef CUfileError_t _cuFileDriverClose() except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
global __cuFileDriverClose
_check_or_init_cufile()
if __cuFileDriverClose == NULL:
with gil:
raise FunctionNotFoundError("function cuFileDriverClose is not found")
return (<CUfileError_t (*)() noexcept nogil>__cuFileDriverClose)(
)


cdef CUfileError_t _cuFileDriverClose_v2() except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
global __cuFileDriverClose_v2
_check_or_init_cufile()
Expand Down Expand Up @@ -887,16 +897,6 @@ cdef CUfileError_t _cuFileSetParameterString(CUFileStringConfigParameter_t param
param, desc_str)


cdef CUfileError_t _cuFileDriverClose() except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
global __cuFileDriverClose
_check_or_init_cufile()
if __cuFileDriverClose == NULL:
with gil:
raise FunctionNotFoundError("function cuFileDriverClose is not found")
return (<CUfileError_t (*)() noexcept nogil>__cuFileDriverClose)(
)


cdef CUfileError_t _cuFileGetParameterMinMaxValue(CUFileSizeTConfigParameter_t param, size_t* min_value, size_t* max_value) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
global __cuFileGetParameterMinMaxValue
_check_or_init_cufile()
Expand Down
17 changes: 12 additions & 5 deletions cuda_bindings/cuda/bindings/cufile.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,7 @@ ctypedef CUfileBatchHandle_t BatchHandle
ctypedef CUfileError_t Error
ctypedef cufileRDMAInfo_t RDMAInfo
ctypedef CUfileFSOps_t FSOps
ctypedef CUfileOpCounter_t OpCounter
ctypedef CUfilePerGpuStats_t PerGpuStats
ctypedef CUfileDrvProps_t DrvProps
ctypedef CUfileStatsLevel1_t StatsLevel1
ctypedef CUfileStatsLevel2_t StatsLevel2
ctypedef CUfileStatsLevel3_t StatsLevel3


###############################################################################
Expand Down Expand Up @@ -77,3 +72,15 @@ cpdef str get_parameter_string(int param, int len)
cpdef set_parameter_size_t(int param, size_t value)
cpdef set_parameter_bool(int param, bint value)
cpdef set_parameter_string(int param, intptr_t desc_str)
cpdef get_parameter_min_max_value(int param, intptr_t min_value, intptr_t max_value)
cpdef set_stats_level(int level)
cpdef int get_stats_level() except? 0
cpdef stats_start()
cpdef stats_stop()
cpdef stats_reset()
cpdef get_stats_l1(intptr_t stats)
cpdef get_stats_l2(intptr_t stats)
cpdef get_stats_l3(intptr_t stats)
cpdef size_t get_bar_size_in_kb(int gpu_ind_ex) except? 0
cpdef set_parameter_posix_pool_slab_array(intptr_t size_values, intptr_t count_values, int len)
cpdef get_parameter_posix_pool_slab_array(intptr_t size_values, intptr_t count_values, int len)
Loading
Loading