Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions cuda_bindings/tests/cufile.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
// e.g : export CUFILE_ENV_PATH_JSON="/home/<xxx>/cufile.json"


"properties" : {
"allow_compat_mode" : true
},

"execution" : {
// max number of workitems in the queue;
"max_io_queue_depth": 128,
Expand Down
9 changes: 9 additions & 0 deletions cuda_bindings/tests/test_cufile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1412,6 +1412,14 @@ def test_param(param, val):
@pytest.mark.usefixtures("ctx")
def test_set_get_parameter_bool():
"""Test setting and getting boolean parameters with cuFile validation."""
# Do not exercise allow/force compat via set_parameter_bool before any driver_open:
# pending API values are applied after JSON load on first open and can overwrite
# cufile.json (e.g. allow_compat_mode: true), causing DRIVER_NOT_INITIALIZED when
# nvidia-fs is not loaded. Other tests cover compat behavior where appropriate.
_COMPAT_PARAMS = (
cufile.BoolConfigParameter.PROPERTIES_ALLOW_COMPAT_MODE,
cufile.BoolConfigParameter.FORCE_COMPAT_MODE,
)
param_val_pairs = (
(cufile.BoolConfigParameter.PROPERTIES_USE_POLL_MODE, True),
(cufile.BoolConfigParameter.PROPERTIES_ALLOW_COMPAT_MODE, False),
Expand All @@ -1426,6 +1434,7 @@ def test_set_get_parameter_bool():
(cufile.BoolConfigParameter.SKIP_TOPOLOGY_DETECTION, False),
(cufile.BoolConfigParameter.STREAM_MEMOPS_BYPASS, True),
)
param_val_pairs = tuple((p, v) for p, v in param_val_pairs if p not in _COMPAT_PARAMS)

def test_param(param, val):
orig_val = cufile.get_parameter_bool(param)
Expand Down
Loading