Esempio n. 1
0
def dcgmIntrospectGetFieldsMemoryUsage(dcgm_handle, introspectContext, waitIfNoData=True):
    fn = dcgmFP("dcgmIntrospectGetFieldsMemoryUsage")
    
    memInfo = dcgm_structs.c_dcgmIntrospectFullMemory_v1()
    memInfo.version = dcgm_structs.dcgmIntrospectFullMemory_version1
    
    ret = fn(dcgm_handle, byref(introspectContext), byref(memInfo), waitIfNoData)
    dcgm_structs._dcgmCheckReturn(ret)
    return memInfo
Esempio n. 2
0
def dcgmIntrospectGetFieldMemoryUsage(dcgm_handle, fieldId, waitIfNoData=True):
    fn = dcgm_structs._dcgmGetFunctionPointer("dcgmIntrospectGetFieldMemoryUsage")
    
    memInfo = dcgm_structs.c_dcgmIntrospectFullMemory_v1()
    memInfo.version = dcgm_structs.dcgmIntrospectFullMemory_version1
    
    ret = fn(dcgm_handle, fieldId, byref(memInfo), waitIfNoData)
    dcgm_structs._dcgmCheckReturn(ret)
    return memInfo
Esempio n. 3
0
def vtDcgmIntrospectGetFieldsMemoryUsage(dcgm_handle,
                                         introspectContext,
                                         versionTest,
                                         waitIfNoData=True):
    fn = dcgmFP("dcgmIntrospectGetFieldsMemoryUsage")

    memInfo = dcgm_structs.c_dcgmIntrospectFullMemory_v1()
    memInfo.version = dcgm_structs.make_dcgm_version(memInfo, 1)
    logger.debug("Structure version: %d" % memInfo.version)

    memInfo.version = versionTest

    introspectContext = dcgm_structs.c_dcgmIntrospectContext_v1()
    introspectContext.version = versionTest

    ret = fn(dcgm_handle, byref(introspectContext), byref(memInfo),
             waitIfNoData)
    dcgm_structs._dcgmCheckReturn(ret)
    return memInfo