File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ cdef class FieldValue:
7575 elif value_type == ValueType.UNSIGNED_LONG_LONG:
7676 return int(value.ull_val[0])
7777 elif value_type == ValueType.SIGNED_LONG_LONG:
78- return int(value.ll_val [0])
78+ return int(value.sll_val [0])
7979 elif value_type == ValueType.SIGNED_INT:
8080 return int(value.si_val[0])
8181 elif value_type == ValueType.UNSIGNED_SHORT:
Original file line number Diff line number Diff line change @@ -445,6 +445,19 @@ def test_field_values(subtests):
445445 assert field_values [0 ].value <= old_value
446446
447447
448+ @pytest .mark .agent_authored (model = "gpt-5.6-sol" )
449+ def test_field_value_decodes_signed_long_long ():
450+ """SIGNED_LONG_LONG decodes from nvmlValue_t.sll_val as a Python int."""
451+ field_value = nvml .FieldValue ()
452+ field_value .nvml_return = int (nvml .Return .SUCCESS )
453+ field_value .value_type = int (nvml .ValueType .SIGNED_LONG_LONG )
454+ field_value .value .sll_val [0 ] = - 45
455+
456+ value = _device .FieldValue (field_value ).value
457+ assert value == - 45
458+ assert type (value ) is int
459+
460+
448461@pytest .mark .skipif (helpers .IS_WSL or helpers .IS_WINDOWS , reason = "Device attributes not supported on WSL or Windows" )
449462def test_get_all_devices_with_cpu_affinity (subtests ):
450463 for i in range (multiprocessing .cpu_count ()):
You can’t perform that action at this time.
0 commit comments