示例#1
0
def vtDcgmIntrospectGetFieldsExecTime(dcgm_handle,
                                      introspectContext,
                                      versionTest,
                                      waitIfNoData=True):
    fn = dcgmFP("dcgmIntrospectGetFieldsExecTime")

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

    fullExecTime = dcgm_structs.c_dcgmIntrospectFullFieldsExecTime_v2()
    fullExecTime.version = dcgm_structs.make_dcgm_version(fullExecTime, 2)
    logger.debug("Structure version: %d" % fullExecTime.version)

    fullExecTime.version = versionTest
    execTime.version = versionTest

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

    introspectContext.version = versionTest

    ret = fn(dcgm_handle, byref(introspectContext), byref(execTime),
             waitIfNoData)
    dcgm_structs._dcgmCheckReturn(ret)
    return execTime
示例#2
0
def dcgmIntrospectGetFieldsExecTime(dcgm_handle, introspectContext, waitIfNoData=True):
    fn = dcgmFP("dcgmIntrospectGetFieldsExecTime")
    
    execTime = dcgm_structs.c_dcgmIntrospectFullFieldsExecTime_v2()
    execTime.version = dcgm_structs.dcgmIntrospectFullFieldsExecTime_version2
    
    ret = fn(dcgm_handle, byref(introspectContext), byref(execTime), waitIfNoData)
    dcgm_structs._dcgmCheckReturn(ret)
    return execTime
示例#3
0
def dcgmIntrospectGetFieldExecTime(dcgm_handle, fieldId, waitIfNoData=True):
    fn = dcgm_structs._dcgmGetFunctionPointer("dcgmIntrospectGetFieldExecTime")

    execTime = dcgm_structs.c_dcgmIntrospectFullFieldsExecTime_v2()
    execTime.version = dcgm_structs.dcgmIntrospectFullFieldsExecTime_version2

    ret = fn(dcgm_handle, fieldId, byref(execTime), waitIfNoData)
    dcgm_structs._dcgmCheckReturn(ret)
    return execTime