예제 #1
0
def vtDcgmGroupGetInfo(dcgm_handle, group_id, versionTest):
    fn = dcgmFP("dcgmGroupGetInfo")
    device_values = dcgm_structs.c_dcgmGroupInfo_v2()
    device_values.version = dcgm_structs.make_dcgm_version(device_values, 2)
    logger.debug("Structure version: %d" % device_values.version)

    device_values.version = versionTest
    ret = fn(dcgm_handle, group_id, byref(device_values))
    dcgm_structs._dcgmCheckReturn(ret)
    return device_values
예제 #2
0
def dcgmGroupGetInfo(dcgm_handle, group_id, version=dcgm_structs.c_dcgmGroupInfo_version2):
    fn = dcgmFP("dcgmGroupGetInfo")
    
    #support the old version of the request since the host engine does
    if version == dcgm_structs.c_dcgmGroupInfo_version2:
        device_values = dcgm_structs.c_dcgmGroupInfo_v2()
        device_values.version = dcgm_structs.c_dcgmGroupInfo_version2
    else:
        dcgm_structs._dcgmCheckReturn(dcgm_structs.DCGM_ST_VER_MISMATCH)
    
    ret = fn(dcgm_handle, group_id, byref(device_values))
    dcgm_structs._dcgmCheckReturn(ret)
    return device_values