Code
stringlengths
103
85.9k
Summary
listlengths
0
94
Please provide a description of the function:def nvmlUnitGetHandleByIndex(index): r c_index = c_uint(index) unit = c_nvmlUnit_t() fn = _nvmlGetFunctionPointer("nvmlUnitGetHandleByIndex") ret = fn(c_index, byref(unit)) _nvmlCheckReturn(ret) return bytes_to_str(unit)
[ "\n /**\n * Acquire the handle for a particular unit, based on its index.\n *\n * For S-class products.\n *\n * Valid indices are derived from the \\a unitCount returned by \\ref nvmlUnitGetCount().\n * For example, if \\a unitCount is 2 the valid indices are 0 and 1, corresponding to U...
Please provide a description of the function:def nvmlUnitGetUnitInfo(unit): r c_info = c_nvmlUnitInfo_t() fn = _nvmlGetFunctionPointer("nvmlUnitGetUnitInfo") ret = fn(unit, byref(c_info)) _nvmlCheckReturn(ret) return bytes_to_str(c_info)
[ "\n /**\n * Retrieves the static information associated with a unit.\n *\n * For S-class products.\n *\n * See \\ref nvmlUnitInfo_t for details on available unit info.\n *\n * @param unit The identifier of the target unit\n * @param info ...
Please provide a description of the function:def nvmlUnitGetLedState(unit): r c_state = c_nvmlLedState_t() fn = _nvmlGetFunctionPointer("nvmlUnitGetLedState") ret = fn(unit, byref(c_state)) _nvmlCheckReturn(ret) return bytes_to_str(c_state)
[ "\n /**\n * Retrieves the LED state associated with this unit.\n *\n * For S-class products.\n *\n * See \\ref nvmlLedState_t for details on allowed states.\n *\n * @param unit The identifier of the target unit\n * @param state ...
Please provide a description of the function:def nvmlUnitGetPsuInfo(unit): r c_info = c_nvmlPSUInfo_t() fn = _nvmlGetFunctionPointer("nvmlUnitGetPsuInfo") ret = fn(unit, byref(c_info)) _nvmlCheckReturn(ret) return bytes_to_str(c_info)
[ "\n /**\n * Retrieves the PSU stats for the unit.\n *\n * For S-class products.\n *\n * See \\ref nvmlPSUInfo_t for details on available PSU info.\n *\n * @param unit The identifier of the target unit\n * @param psu ...
Please provide a description of the function:def nvmlUnitGetTemperature(unit, type): r c_temp = c_uint() fn = _nvmlGetFunctionPointer("nvmlUnitGetTemperature") ret = fn(unit, c_uint(type), byref(c_temp)) _nvmlCheckReturn(ret) return bytes_to_str(c_temp.value)
[ "\n /**\n * Retrieves the temperature readings for the unit, in degrees C.\n *\n * For S-class products.\n *\n * Depending on the product, readings may be available for intake (type=0),\n * exhaust (type=1) and board (type=2).\n *\n * @param unit Th...
Please provide a description of the function:def nvmlUnitGetFanSpeedInfo(unit): r c_speeds = c_nvmlUnitFanSpeeds_t() fn = _nvmlGetFunctionPointer("nvmlUnitGetFanSpeedInfo") ret = fn(unit, byref(c_speeds)) _nvmlCheckReturn(ret) return bytes_to_str(c_speeds)
[ "\n /**\n * Retrieves the fan speed readings for the unit.\n *\n * For S-class products.\n *\n * See \\ref nvmlUnitFanSpeeds_t for details on available fan speed info.\n *\n * @param unit The identifier of the target unit\n * @param fanSpeeds ...
Please provide a description of the function:def nvmlUnitGetDevices(unit): r c_count = c_uint(nvmlUnitGetDeviceCount(unit)) device_array = c_nvmlDevice_t * c_count.value c_devices = device_array() fn = _nvmlGetFunctionPointer("nvmlUnitGetDevices") ret = fn(unit, byref(c_count), c_devices) ...
[ "\n /**\n * Retrieves the set of GPU devices that are attached to the specified unit.\n *\n * For S-class products.\n *\n * The \\a deviceCount argument is expected to be set to the size of the input \\a devices array.\n *\n * @param unit The identifier...
Please provide a description of the function:def nvmlDeviceGetHandleByIndex(index): r c_index = c_uint(index) device = c_nvmlDevice_t() fn = _nvmlGetFunctionPointer("nvmlDeviceGetHandleByIndex_v2") ret = fn(c_index, byref(device)) _nvmlCheckReturn(ret) return bytes_to_str(device)
[ "\n /**\n * Acquire the handle for a particular device, based on its index.\n *\n * For all products.\n *\n * Valid indices are derived from the \\a accessibleDevices count returned by\n * \\ref nvmlDeviceGetCount(). For example, if \\a accessibleDevices is 2 the valid indices\n * ...
Please provide a description of the function:def nvmlDeviceGetHandleBySerial(serial): r c_serial = c_char_p(serial) device = c_nvmlDevice_t() fn = _nvmlGetFunctionPointer("nvmlDeviceGetHandleBySerial") ret = fn(c_serial, byref(device)) _nvmlCheckReturn(ret) return bytes_to_str(device)
[ "\n /**\n * Acquire the handle for a particular device, based on its board serial number.\n *\n * For Fermi &tm; or newer fully supported devices.\n *\n * This number corresponds to the value printed directly on the board, and to the value returned by\n * \\ref nvmlDeviceGetSerial().\n ...
Please provide a description of the function:def nvmlDeviceGetHandleByUUID(uuid): r c_uuid = c_char_p(uuid) device = c_nvmlDevice_t() fn = _nvmlGetFunctionPointer("nvmlDeviceGetHandleByUUID") ret = fn(c_uuid, byref(device)) _nvmlCheckReturn(ret) return bytes_to_str(device)
[ "\n /**\n * Acquire the handle for a particular device, based on its globally unique immutable UUID associated with each device.\n *\n * For all products.\n *\n * @param uuid The UUID of the target GPU\n * @param device Referen...
Please provide a description of the function:def nvmlDeviceGetHandleByPciBusId(pciBusId): r c_busId = c_char_p(pciBusId) device = c_nvmlDevice_t() fn = _nvmlGetFunctionPointer("nvmlDeviceGetHandleByPciBusId_v2") ret = fn(c_busId, byref(device)) _nvmlCheckReturn(ret) return bytes_to_str(...
[ "\n /**\n * Acquire the handle for a particular device, based on its PCI bus id.\n *\n * For all products.\n *\n * This value corresponds to the nvmlPciInfo_t::busId returned by \\ref nvmlDeviceGetPciInfo().\n *\n * Starting from NVML 5, this API causes NVML to initialize the target G...
Please provide a description of the function:def nvmlDeviceGetName(handle): r c_name = create_string_buffer(NVML_DEVICE_NAME_BUFFER_SIZE) fn = _nvmlGetFunctionPointer("nvmlDeviceGetName") ret = fn(handle, c_name, c_uint(NVML_DEVICE_NAME_BUFFER_SIZE)) _nvmlCheckReturn(ret) return bytes_to_str(c_n...
[ "\n /**\n * Retrieves the name of this device.\n *\n * For all products.\n *\n * The name is an alphanumeric string that denotes a particular product, e.g. Tesla &tm; C2070. It will not\n * exceed 64 characters in length (including the NULL terminator). See \\ref\n * nvmlConstants::N...
Please provide a description of the function:def nvmlDeviceGetBoardId(handle): r c_id = c_uint(); fn = _nvmlGetFunctionPointer("nvmlDeviceGetBoardId") ret = fn(handle, byref(c_id)) _nvmlCheckReturn(ret) return bytes_to_str(c_id.value)
[ "\n /**\n * Retrieves the device boardId from 0-N.\n * Devices with the same boardId indicate GPUs connected to the same PLX. Use in conjunction with\n * \\ref nvmlDeviceGetMultiGpuBoard() to decide if they are on the same board as well.\n * The boardId returned is a unique ID for the current ...
Please provide a description of the function:def nvmlDeviceGetMultiGpuBoard(handle): r c_multiGpu = c_uint(); fn = _nvmlGetFunctionPointer("nvmlDeviceGetMultiGpuBoard") ret = fn(handle, byref(c_multiGpu)) _nvmlCheckReturn(ret) return bytes_to_str(c_multiGpu.value)
[ "\n /**\n * Retrieves whether the device is on a Multi-GPU Board\n * Devices that are on multi-GPU boards will set \\a multiGpuBool to a non-zero value.\n *\n * For Fermi &tm; or newer fully supported devices.\n *\n * @param device The identifier of the targe...
Please provide a description of the function:def nvmlDeviceGetBrand(handle): r c_type = _nvmlBrandType_t() fn = _nvmlGetFunctionPointer("nvmlDeviceGetBrand") ret = fn(handle, byref(c_type)) _nvmlCheckReturn(ret) return bytes_to_str(c_type.value)
[ "\n /**\n * Retrieves the brand of this device.\n *\n * For all products.\n *\n * The type is a member of \\ref nvmlBrandType_t defined above.\n *\n * @param device The identifier of the target device\n * @param type Re...
Please provide a description of the function:def nvmlDeviceGetSerial(handle): r c_serial = create_string_buffer(NVML_DEVICE_SERIAL_BUFFER_SIZE) fn = _nvmlGetFunctionPointer("nvmlDeviceGetSerial") ret = fn(handle, c_serial, c_uint(NVML_DEVICE_SERIAL_BUFFER_SIZE)) _nvmlCheckReturn(ret) return byte...
[ "\n /**\n * Retrieves the globally unique board serial number associated with this device's board.\n *\n * For all products with an inforom.\n *\n * The serial number is an alphanumeric string that will not exceed 30 characters (including the NULL terminator).\n * This number matches the ...
Please provide a description of the function:def nvmlDeviceGetCpuAffinity(handle, cpuSetSize): r affinity_array = c_ulonglong * cpuSetSize c_affinity = affinity_array() fn = _nvmlGetFunctionPointer("nvmlDeviceGetCpuAffinity") ret = fn(handle, cpuSetSize, byref(c_affinity)) _nvmlCheckReturn(ret) ...
[ "\n /**\n * Retrieves an array of unsigned ints (sized to cpuSetSize) of bitmasks with the ideal CPU affinity for the device\n * For example, if processors 0, 1, 32, and 33 are ideal for the device and cpuSetSize == 2,\n * result[0] = 0x3, result[1] = 0x3\n *\n * For Kepler &tm; or newer ...
Please provide a description of the function:def nvmlDeviceGetMinorNumber(handle): r c_minor_number = c_uint() fn = _nvmlGetFunctionPointer("nvmlDeviceGetMinorNumber") ret = fn(handle, byref(c_minor_number)) _nvmlCheckReturn(ret) return bytes_to_str(c_minor_number.value)
[ "\n /**\n * Retrieves minor number for the device. The minor number for the device is such that the Nvidia device node file for\n * each GPU will have the form /dev/nvidia[minor number].\n *\n * For all products.\n * Supported only for Linux\n *\n * @param device ...
Please provide a description of the function:def nvmlDeviceGetUUID(handle): r c_uuid = create_string_buffer(NVML_DEVICE_UUID_BUFFER_SIZE) fn = _nvmlGetFunctionPointer("nvmlDeviceGetUUID") ret = fn(handle, c_uuid, c_uint(NVML_DEVICE_UUID_BUFFER_SIZE)) _nvmlCheckReturn(ret) return bytes_to_str(c_u...
[ "\n /**\n * Retrieves the globally unique immutable UUID associated with this device, as a 5 part hexadecimal string,\n * that augments the immutable, board serial identifier.\n *\n * For all products.\n *\n * The UUID is a globally unique identifier. It is the only available identifier f...
Please provide a description of the function:def nvmlDeviceGetInforomVersion(handle, infoRomObject): r c_version = create_string_buffer(NVML_DEVICE_INFOROM_VERSION_BUFFER_SIZE) fn = _nvmlGetFunctionPointer("nvmlDeviceGetInforomVersion") ret = fn(handle, _nvmlInforomObject_t(infoRomObject), c_v...
[ "\n /**\n * Retrieves the version information for the device's infoROM object.\n *\n * For all products with an inforom.\n *\n * Fermi and higher parts have non-volatile on-board memory for persisting device info, such as aggregate\n * ECC counts. The version of the data structures in thi...
Please provide a description of the function:def nvmlDeviceGetInforomImageVersion(handle): r c_version = create_string_buffer(NVML_DEVICE_INFOROM_VERSION_BUFFER_SIZE) fn = _nvmlGetFunctionPointer("nvmlDeviceGetInforomImageVersion") ret = fn(handle, c_version, c_uint(NVML_DEVICE_INFOROM_VERSION_BUFFER_SI...
[ "\n /**\n * Retrieves the global infoROM image version\n *\n * For all products with an inforom.\n *\n * Image version just like VBIOS version uniquely describes the exact version of the infoROM flashed on the board\n * in contrast to infoROM object version which is only an indicator of s...
Please provide a description of the function:def nvmlDeviceGetInforomConfigurationChecksum(handle): r c_checksum = c_uint() fn = _nvmlGetFunctionPointer("nvmlDeviceGetInforomConfigurationChecksum") ret = fn(handle, byref(c_checksum)) _nvmlCheckReturn(ret) return bytes_to_str(c_checksum.value)
[ "\n /**\n * Retrieves the checksum of the configuration stored in the device's infoROM.\n *\n * For all products with an inforom.\n *\n * Can be used to make sure that two GPUs have the exact same configuration.\n * Current checksum takes into account configuration stored in PWR and ECC i...
Please provide a description of the function:def nvmlDeviceGetPersistenceMode(handle): r c_state = _nvmlEnableState_t() fn = _nvmlGetFunctionPointer("nvmlDeviceGetPersistenceMode") ret = fn(handle, byref(c_state)) _nvmlCheckReturn(ret) return bytes_to_str(c_state.value)
[ "\n /**\n * Retrieves the persistence mode associated with this device.\n *\n * For all products.\n * For Linux only.\n *\n * When driver persistence mode is enabled the driver software state is not torn down when the last\n * client disconnects. By default this feature is disabled.\n...
Please provide a description of the function:def nvmlDeviceGetPciInfo(handle): r c_info = nvmlPciInfo_t() fn = _nvmlGetFunctionPointer("nvmlDeviceGetPciInfo_v2") ret = fn(handle, byref(c_info)) _nvmlCheckReturn(ret) return bytes_to_str(c_info)
[ "\n /**\n * Retrieves the PCI attributes of this device.\n *\n * For all products.\n *\n * See \\ref nvmlPciInfo_t for details on the available PCI info.\n *\n * @param device The identifier of the target device\n * @param pci ...
Please provide a description of the function:def nvmlDeviceGetClockInfo(handle, type): r c_clock = c_uint() fn = _nvmlGetFunctionPointer("nvmlDeviceGetClockInfo") ret = fn(handle, _nvmlClockType_t(type), byref(c_clock)) _nvmlCheckReturn(ret) return bytes_to_str(c_clock.value)
[ "\n /**\n * Retrieves the current clock speeds for the device.\n *\n * For Fermi &tm; or newer fully supported devices.\n *\n * See \\ref nvmlClockType_t for details on available clock information.\n *\n * @param device The identifier of the target device...
Please provide a description of the function:def nvmlDeviceGetSupportedMemoryClocks(handle): r # first call to get the size c_count = c_uint(0) fn = _nvmlGetFunctionPointer("nvmlDeviceGetSupportedMemoryClocks") ret = fn(handle, byref(c_count), None) if (ret == NVML_SUCCESS): # special c...
[ "\n /**\n * Retrieves the list of possible memory clocks that can be used as an argument for \\ref nvmlDeviceSetApplicationsClocks.\n *\n * For Kepler &tm; or newer fully supported devices.\n *\n * @param device The identifier of the target device\n * @param ...
Please provide a description of the function:def nvmlDeviceGetFanSpeed(handle): r c_speed = c_uint() fn = _nvmlGetFunctionPointer("nvmlDeviceGetFanSpeed") ret = fn(handle, byref(c_speed)) _nvmlCheckReturn(ret) return bytes_to_str(c_speed.value)
[ "\n /**\n * Retrieves the intended operating speed of the device's fan.\n *\n * Note: The reported speed is the intended fan speed. If the fan is physically blocked and unable to spin, the\n * output will not match the actual fan speed.\n *\n * For all discrete products with dedicated fa...
Please provide a description of the function:def nvmlDeviceGetTemperature(handle, sensor): r c_temp = c_uint() fn = _nvmlGetFunctionPointer("nvmlDeviceGetTemperature") ret = fn(handle, _nvmlTemperatureSensors_t(sensor), byref(c_temp)) _nvmlCheckReturn(ret) return bytes_to_str(c_temp.value)
[ "\n /**\n * Retrieves the current temperature readings for the device, in degrees C.\n *\n * For all products.\n *\n * See \\ref nvmlTemperatureSensors_t for details on available temperature sensors.\n *\n * @param device The identifier of the target devi...
Please provide a description of the function:def nvmlDeviceGetTemperatureThreshold(handle, threshold): r c_temp = c_uint() fn = _nvmlGetFunctionPointer("nvmlDeviceGetTemperatureThreshold") ret = fn(handle, _nvmlTemperatureThresholds_t(threshold), byref(c_temp)) _nvmlCheckReturn(ret) return bytes...
[ "\n /**\n * Retrieves the temperature threshold for the GPU with the specified threshold type in degrees C.\n *\n * For Kepler &tm; or newer fully supported devices.\n *\n * See \\ref nvmlTemperatureThresholds_t for details on available temperature thresholds.\n *\n * @param device ...
Please provide a description of the function:def nvmlDeviceGetPowerState(handle): r c_pstate = _nvmlPstates_t() fn = _nvmlGetFunctionPointer("nvmlDeviceGetPowerState") ret = fn(handle, byref(c_pstate)) _nvmlCheckReturn(ret) return bytes_to_str(c_pstate.value)
[ "\n /**\n * Deprecated: Use \\ref nvmlDeviceGetPerformanceState. This function exposes an incorrect generalization.\n *\n * Retrieve the current performance state for the device.\n *\n * For Fermi &tm; or newer fully supported devices.\n *\n * See \\ref nvmlPstates_t for details on al...
Please provide a description of the function:def nvmlDeviceGetPowerManagementMode(handle): r c_pcapMode = _nvmlEnableState_t() fn = _nvmlGetFunctionPointer("nvmlDeviceGetPowerManagementMode") ret = fn(handle, byref(c_pcapMode)) _nvmlCheckReturn(ret) return bytes_to_str(c_pcapMode.value)
[ "\n /**\n * This API has been deprecated.\n *\n * Retrieves the power management mode associated with this device.\n *\n * For products from the Fermi family.\n * - Requires \\a NVML_INFOROM_POWER version 3.0 or higher.\n *\n * For from the Kepler or newer families.\n * ...
Please provide a description of the function:def nvmlDeviceGetPowerManagementLimit(handle): r c_limit = c_uint() fn = _nvmlGetFunctionPointer("nvmlDeviceGetPowerManagementLimit") ret = fn(handle, byref(c_limit)) _nvmlCheckReturn(ret) return bytes_to_str(c_limit.value)
[ "\n /**\n * Retrieves the power management limit associated with this device.\n *\n * For Fermi &tm; or newer fully supported devices.\n *\n * The power limit defines the upper boundary for the card's power draw. If\n * the card's total power draw reaches this limit the power management a...
Please provide a description of the function:def nvmlDeviceGetPowerManagementLimitConstraints(handle): r c_minLimit = c_uint() c_maxLimit = c_uint() fn = _nvmlGetFunctionPointer("nvmlDeviceGetPowerManagementLimitConstraints") ret = fn(handle, byref(c_minLimit), byref(c_maxLimit)) _nvmlCheckRetur...
[ "\n /**\n * Retrieves information about possible values of power management limits on this device.\n *\n * For Kepler &tm; or newer fully supported devices.\n *\n * @param device The identifier of the target device\n * @param minLimit ...
Please provide a description of the function:def nvmlDeviceGetPowerUsage(handle): r c_watts = c_uint() fn = _nvmlGetFunctionPointer("nvmlDeviceGetPowerUsage") ret = fn(handle, byref(c_watts)) _nvmlCheckReturn(ret) return bytes_to_str(c_watts.value)
[ "\n /**\n * Retrieves power usage for this GPU in milliwatts and its associated circuitry (e.g. memory)\n *\n * For Fermi &tm; or newer fully supported devices.\n *\n * On Fermi and Kepler GPUs the reading is accurate to within +/- 5% of current power draw.\n *\n * It is only availabl...
Please provide a description of the function:def nvmlDeviceGetGpuOperationMode(handle): r c_currState = _nvmlGpuOperationMode_t() c_pendingState = _nvmlGpuOperationMode_t() fn = _nvmlGetFunctionPointer("nvmlDeviceGetGpuOperationMode") ret = fn(handle, byref(c_currState), byref(c_pendingState)) _...
[ "\n /**\n * Retrieves the current GOM and pending GOM (the one that GPU will switch to after reboot).\n *\n * For GK110 M-class and X-class Tesla &tm; products from the Kepler family.\n * Modes \\ref NVML_GOM_LOW_DP and \\ref NVML_GOM_ALL_ON are supported on fully supported GeForce products.\n ...
Please provide a description of the function:def nvmlDeviceGetMemoryInfo(handle): r c_memory = c_nvmlMemory_t() fn = _nvmlGetFunctionPointer("nvmlDeviceGetMemoryInfo") ret = fn(handle, byref(c_memory)) _nvmlCheckReturn(ret) return bytes_to_str(c_memory)
[ "\n /**\n * Retrieves the amount of used, free and total memory available on the device, in bytes.\n *\n * For all products.\n *\n * Enabling ECC reduces the amount of total available memory, due to the extra required parity bits.\n * Under WDDM most device memory is allocated and managed...
Please provide a description of the function:def nvmlDeviceGetBAR1MemoryInfo(handle): r c_bar1_memory = c_nvmlBAR1Memory_t() fn = _nvmlGetFunctionPointer("nvmlDeviceGetBAR1MemoryInfo") ret = fn(handle, byref(c_bar1_memory)) _nvmlCheckReturn(ret) return bytes_to_str(c_bar1_memory)
[ "\n /**\n * Gets Total, Available and Used size of BAR1 memory.\n *\n * BAR1 is used to map the FB (device memory) so that it can be directly accessed by the CPU or by 3rd party\n * devices (peer-to-peer on the PCIE bus).\n *\n * For Kepler &tm; or newer fully supported devices.\n *\n...
Please provide a description of the function:def nvmlDeviceGetComputeMode(handle): r c_mode = _nvmlComputeMode_t() fn = _nvmlGetFunctionPointer("nvmlDeviceGetComputeMode") ret = fn(handle, byref(c_mode)) _nvmlCheckReturn(ret) return bytes_to_str(c_mode.value)
[ "\n /**\n * Retrieves the current compute mode for the device.\n *\n * For all products.\n *\n * See \\ref nvmlComputeMode_t for details on allowed compute modes.\n *\n * @param device The identifier of the target device\n * @param mode ...
Please provide a description of the function:def nvmlDeviceGetEccMode(handle): r c_currState = _nvmlEnableState_t() c_pendingState = _nvmlEnableState_t() fn = _nvmlGetFunctionPointer("nvmlDeviceGetEccMode") ret = fn(handle, byref(c_currState), byref(c_pendingState)) _nvmlCheckReturn(ret) ret...
[ "\n /**\n * Retrieves the current and pending ECC modes for the device.\n *\n * For Fermi &tm; or newer fully supported devices.\n * Only applicable to devices with ECC.\n * Requires \\a NVML_INFOROM_ECC version 1.0 or higher.\n *\n * Changing ECC modes requires a reboot. The \"pendin...
Please provide a description of the function:def nvmlDeviceGetTotalEccErrors(handle, errorType, counterType): r c_count = c_ulonglong() fn = _nvmlGetFunctionPointer("nvmlDeviceGetTotalEccErrors") ret = fn(handle, _nvmlMemoryErrorType_t(errorType), _nvmlEccCounterType_t(counterType), byref(c_co...
[ "\n /**\n * Retrieves the total ECC error counts for the device.\n *\n * For Fermi &tm; or newer fully supported devices.\n * Only applicable to devices with ECC.\n * Requires \\a NVML_INFOROM_ECC version 1.0 or higher.\n * Requires ECC Mode to be enabled.\n *\n * The total error ...
Please provide a description of the function:def nvmlDeviceGetDetailedEccErrors(handle, errorType, counterType): r c_counts = c_nvmlEccErrorCounts_t() fn = _nvmlGetFunctionPointer("nvmlDeviceGetDetailedEccErrors") ret = fn(handle, _nvmlMemoryErrorType_t(errorType), _nvmlEccCounterType_t(counte...
[ "\n /**\n * Retrieves the detailed ECC error counts for the device.\n *\n * @deprecated This API supports only a fixed set of ECC error locations\n * On different GPU architectures different locations are supported\n * See \\ref nvmlDeviceGetMemoryErrorCounter\n ...
Please provide a description of the function:def nvmlDeviceGetMemoryErrorCounter(handle, errorType, counterType, locationType): r c_count = c_ulonglong() fn = _nvmlGetFunctionPointer("nvmlDeviceGetMemoryErrorCounter") ret = fn(handle, _nvmlMemoryErrorType_t(errorType), _nvmlEcc...
[ "\n /**\n * Retrieves the requested memory error counter for the device.\n *\n * For Fermi &tm; or newer fully supported devices.\n * Requires \\a NVML_INFOROM_ECC version 2.0 or higher to report aggregate location-based memory error counts.\n * Requires \\a NVML_INFOROM_ECC version 1.0 or hi...
Please provide a description of the function:def nvmlDeviceGetUtilizationRates(handle): r c_util = c_nvmlUtilization_t() fn = _nvmlGetFunctionPointer("nvmlDeviceGetUtilizationRates") ret = fn(handle, byref(c_util)) _nvmlCheckReturn(ret) return bytes_to_str(c_util)
[ "\n /**\n * Retrieves the current utilization rates for the device's major subsystems.\n *\n * For Fermi &tm; or newer fully supported devices.\n *\n * See \\ref nvmlUtilization_t for details on available utilization rates.\n *\n * \\note During driver initialization when ECC is enabl...
Please provide a description of the function:def nvmlDeviceGetEncoderUtilization(handle): r c_util = c_uint() c_samplingPeriod = c_uint() fn = _nvmlGetFunctionPointer("nvmlDeviceGetEncoderUtilization") ret = fn(handle, byref(c_util), byref(c_samplingPeriod)) _nvmlCheckReturn(ret) return [c_u...
[ "\n /**\n * Retrieves the current utilization and sampling size in microseconds for the Encoder\n *\n * For Kepler &tm; or newer fully supported devices.\n *\n * @param device The identifier of the target device\n * @param utilization ...
Please provide a description of the function:def nvmlDeviceGetPcieReplayCounter(handle): r c_replay = c_uint() fn = _nvmlGetFunctionPointer("nvmlDeviceGetPcieReplayCounter") ret = fn(handle, byref(c_replay)) _nvmlCheckReturn(ret) return bytes_to_str(c_replay.value)
[ "\n /**\n * Retrieve the PCIe replay counter.\n *\n * For Kepler &tm; or newer fully supported devices.\n *\n * @param device The identifier of the target device\n * @param value Reference in which to return the counter's value\...
Please provide a description of the function:def nvmlDeviceGetDriverModel(handle): r c_currModel = _nvmlDriverModel_t() c_pendingModel = _nvmlDriverModel_t() fn = _nvmlGetFunctionPointer("nvmlDeviceGetDriverModel") ret = fn(handle, byref(c_currModel), byref(c_pendingModel)) _nvmlCheckReturn(ret)...
[ "\n /**\n * Retrieves the current and pending driver model for the device.\n *\n * For Fermi &tm; or newer fully supported devices.\n * For windows only.\n *\n * On Windows platforms the device driver can run in either WDDM or WDM (TCC) mode. If a display is attached\n * to the device...
Please provide a description of the function:def nvmlDeviceGetVbiosVersion(handle): r c_version = create_string_buffer(NVML_DEVICE_VBIOS_VERSION_BUFFER_SIZE) fn = _nvmlGetFunctionPointer("nvmlDeviceGetVbiosVersion") ret = fn(handle, c_version, c_uint(NVML_DEVICE_VBIOS_VERSION_BUFFER_SIZE)) _nvmlChec...
[ "\n /**\n * Get VBIOS version of the device.\n *\n * For all products.\n *\n * The VBIOS version may change from time to time. It will not exceed 32 characters in length\n * (including the NULL terminator). See \\ref nvmlConstants::NVML_DEVICE_VBIOS_VERSION_BUFFER_SIZE.\n *\n * @...
Please provide a description of the function:def nvmlDeviceGetComputeRunningProcesses(handle): r # first call to get the size c_count = c_uint(0) fn = _nvmlGetFunctionPointer("nvmlDeviceGetComputeRunningProcesses") ret = fn(handle, byref(c_count), None) if (ret == NVML_SUCCESS): # speci...
[ "\n /**\n * Get information about processes with a compute context on a device\n *\n * For Fermi &tm; or newer fully supported devices.\n *\n * This function returns information only about compute running processes (e.g. CUDA application which have\n * active context). Any graphics applic...
Please provide a description of the function:def nvmlDeviceGetAutoBoostedClocksEnabled(handle): r c_isEnabled = _nvmlEnableState_t() c_defaultIsEnabled = _nvmlEnableState_t() fn = _nvmlGetFunctionPointer("nvmlDeviceGetAutoBoostedClocksEnabled") ret = fn(handle, byref(c_isEnabled), byref(c_defaultIsE...
[ "\n /**\n * Retrieve the current state of Auto Boosted clocks on a device and store it in \\a isEnabled\n *\n * For Kepler &tm; or newer fully supported devices.\n *\n * Auto Boosted clocks are enabled by default on some hardware, allowing the GPU to run at higher clock rates\n * to maxim...
Please provide a description of the function:def nvmlUnitSetLedState(unit, color): r fn = _nvmlGetFunctionPointer("nvmlUnitSetLedState") ret = fn(unit, _nvmlLedColor_t(color)) _nvmlCheckReturn(ret) return None
[ "\n /**\n * Set the LED state for the unit. The LED can be either green (0) or amber (1).\n *\n * For S-class products.\n * Requires root/admin permissions.\n *\n * This operation takes effect immediately.\n *\n *\n * <b>Current S-Class products don't provide unique LEDs for e...
Please provide a description of the function:def nvmlDeviceSetPersistenceMode(handle, mode): r fn = _nvmlGetFunctionPointer("nvmlDeviceSetPersistenceMode") ret = fn(handle, _nvmlEnableState_t(mode)) _nvmlCheckReturn(ret) return None
[ "\n /**\n * Set the persistence mode for the device.\n *\n * For all products.\n * For Linux only.\n * Requires root/admin permissions.\n *\n * The persistence mode determines whether the GPU driver software is torn down after the last client\n * exits.\n *\n * This operat...
Please provide a description of the function:def nvmlDeviceSetComputeMode(handle, mode): r fn = _nvmlGetFunctionPointer("nvmlDeviceSetComputeMode") ret = fn(handle, _nvmlComputeMode_t(mode)) _nvmlCheckReturn(ret) return None
[ "\n /**\n * Set the compute mode for the device.\n *\n * For all products.\n * Requires root/admin permissions.\n *\n * The compute mode determines whether a GPU can be used for compute operations and whether it can\n * be shared across contexts.\n *\n * This operation takes e...
Please provide a description of the function:def nvmlDeviceSetEccMode(handle, mode): r fn = _nvmlGetFunctionPointer("nvmlDeviceSetEccMode") ret = fn(handle, _nvmlEnableState_t(mode)) _nvmlCheckReturn(ret) return None
[ "\n /**\n * Set the ECC mode for the device.\n *\n * For Kepler &tm; or newer fully supported devices.\n * Only applicable to devices with ECC.\n * Requires \\a NVML_INFOROM_ECC version 1.0 or higher.\n * Requires root/admin permissions.\n *\n * The ECC mode determines whether the...
Please provide a description of the function:def nvmlDeviceClearEccErrorCounts(handle, counterType): r fn = _nvmlGetFunctionPointer("nvmlDeviceClearEccErrorCounts") ret = fn(handle, _nvmlEccCounterType_t(counterType)) _nvmlCheckReturn(ret) return None
[ "\n /**\n * Clear the ECC error and other memory error counts for the device.\n *\n * For Kepler &tm; or newer fully supported devices.\n * Only applicable to devices with ECC.\n * Requires \\a NVML_INFOROM_ECC version 2.0 or higher to clear aggregate location-based ECC counts.\n * Requir...
Please provide a description of the function:def nvmlDeviceSetDriverModel(handle, model): r fn = _nvmlGetFunctionPointer("nvmlDeviceSetDriverModel") ret = fn(handle, _nvmlDriverModel_t(model)) _nvmlCheckReturn(ret) return None
[ "\n /**\n * Set the driver model for the device.\n *\n * For Fermi &tm; or newer fully supported devices.\n * For windows only.\n * Requires root/admin permissions.\n *\n * On Windows platforms the device driver can run in either WDDM or WDM (TCC) mode. If a display is attached\n ...
Please provide a description of the function:def nvmlDeviceSetAutoBoostedClocksEnabled(handle, enabled): r fn = _nvmlGetFunctionPointer("nvmlDeviceSetAutoBoostedClocksEnabled") ret = fn(handle, _nvmlEnableState_t(enabled)) _nvmlCheckReturn(ret) return None
[ "\n /**\n * Try to set the current state of Auto Boosted clocks on a device.\n *\n * For Kepler &tm; or newer fully supported devices.\n *\n * Auto Boosted clocks are enabled by default on some hardware, allowing the GPU to run at higher clock rates\n * to maximize performance as thermal ...
Please provide a description of the function:def nvmlDeviceSetDefaultAutoBoostedClocksEnabled(handle, enabled, flags): r fn = _nvmlGetFunctionPointer("nvmlDeviceSetDefaultAutoBoostedClocksEnabled") ret = fn(handle, _nvmlEnableState_t(enabled), c_uint(flags)) _nvmlCheckReturn(ret) return None
[ "\n /**\n * Try to set the default state of Auto Boosted clocks on a device. This is the default state that Auto Boosted clocks will\n * return to when no compute running processes (e.g. CUDA application which have an active context) are running\n *\n * For Kepler &tm; or newer non-GeForce fully ...
Please provide a description of the function:def nvmlDeviceSetApplicationsClocks(handle, maxMemClockMHz, maxGraphicsClockMHz): r fn = _nvmlGetFunctionPointer("nvmlDeviceSetApplicationsClocks") ret = fn(handle, c_uint(maxMemClockMHz), c_uint(maxGraphicsClockMHz)) _nvmlCheckReturn(ret) return None
[ "\n /**\n * Set clocks that applications will lock to.\n *\n * Sets the clocks that compute and graphics applications will be running at.\n * e.g. CUDA driver requests these clocks during context creation which means this property\n * defines clocks at which CUDA applications will be running ...
Please provide a description of the function:def nvmlDeviceSetPowerManagementLimit(handle, limit): r fn = _nvmlGetFunctionPointer("nvmlDeviceSetPowerManagementLimit") ret = fn(handle, c_uint(limit)) _nvmlCheckReturn(ret) return None
[ "\n /**\n * Set new power limit of this device.\n *\n * For Kepler &tm; or newer fully supported devices.\n * Requires root/admin permissions.\n *\n * See \\ref nvmlDeviceGetPowerManagementLimitConstraints to check the allowed ranges of values.\n *\n * \\note Limit is not persiste...
Please provide a description of the function:def nvmlDeviceSetGpuOperationMode(handle, mode): r fn = _nvmlGetFunctionPointer("nvmlDeviceSetGpuOperationMode") ret = fn(handle, _nvmlGpuOperationMode_t(mode)) _nvmlCheckReturn(ret) return None
[ "\n /**\n * Sets new GOM. See \\a nvmlGpuOperationMode_t for details.\n *\n * For GK110 M-class and X-class Tesla &tm; products from the Kepler family.\n * Modes \\ref NVML_GOM_LOW_DP and \\ref NVML_GOM_ALL_ON are supported on fully supported GeForce products.\n * Not supported on Quadro &reg...
Please provide a description of the function:def nvmlEventSetCreate(): r fn = _nvmlGetFunctionPointer("nvmlEventSetCreate") eventSet = c_nvmlEventSet_t() ret = fn(byref(eventSet)) _nvmlCheckReturn(ret) return eventSet
[ "\n /**\n * Create an empty set of events.\n * Event set should be freed by \\ref nvmlEventSetFree\n *\n * For Fermi &tm; or newer fully supported devices.\n * @param set Reference in which to return the event handle\n *\n * @return\n * - \...
Please provide a description of the function:def nvmlDeviceRegisterEvents(handle, eventTypes, eventSet): r fn = _nvmlGetFunctionPointer("nvmlDeviceRegisterEvents") ret = fn(handle, c_ulonglong(eventTypes), eventSet) _nvmlCheckReturn(ret) return None
[ "\n /**\n * Starts recording of events on a specified devices and add the events to specified \\ref nvmlEventSet_t\n *\n * For Fermi &tm; or newer fully supported devices.\n * Ecc events are available only on ECC enabled devices (see \\ref nvmlDeviceGetTotalEccErrors)\n * Power capping events...
Please provide a description of the function:def nvmlDeviceGetSupportedEventTypes(handle): r c_eventTypes = c_ulonglong() fn = _nvmlGetFunctionPointer("nvmlDeviceGetSupportedEventTypes") ret = fn(handle, byref(c_eventTypes)) _nvmlCheckReturn(ret) return bytes_to_str(c_eventTypes.value)
[ "\n /**\n * Returns information about events supported on device\n *\n * For Fermi &tm; or newer fully supported devices.\n *\n * Events are not supported on Windows. So this function returns an empty mask in \\a eventTypes on Windows.\n *\n * @param device ...
Please provide a description of the function:def nvmlEventSetWait(eventSet, timeoutms): r fn = _nvmlGetFunctionPointer("nvmlEventSetWait") data = c_nvmlEventData_t() ret = fn(eventSet, byref(data), c_uint(timeoutms)) _nvmlCheckReturn(ret) return bytes_to_str(data)
[ "\n /**\n * Waits on events and delivers events\n *\n * For Fermi &tm; or newer fully supported devices.\n *\n * If some events are ready to be delivered at the time of the call, function returns immediately.\n * If there are no events ready to be delivered, function sleeps till event arr...
Please provide a description of the function:def nvmlDeviceOnSameBoard(handle1, handle2): r fn = _nvmlGetFunctionPointer("nvmlDeviceOnSameBoard") onSameBoard = c_int() ret = fn(handle1, handle2, byref(onSameBoard)) _nvmlCheckReturn(ret) return (onSameBoard.value != 0)
[ "\n /**\n * Check if the GPU devices are on the same physical board.\n *\n * For all fully supported products.\n *\n * @param device1 The first GPU device\n * @param device2 The second GPU device\n * @param onSameBoard ...
Please provide a description of the function:def nvmlDeviceGetCurrPcieLinkGeneration(handle): r fn = _nvmlGetFunctionPointer("nvmlDeviceGetCurrPcieLinkGeneration") gen = c_uint() ret = fn(handle, byref(gen)) _nvmlCheckReturn(ret) return bytes_to_str(gen.value)
[ "\n /**\n * Retrieves the current PCIe link generation\n *\n * For Fermi &tm; or newer fully supported devices.\n *\n * @param device The identifier of the target device\n * @param currLinkGen Reference in which to return the current ...
Please provide a description of the function:def nvmlDeviceGetCurrPcieLinkWidth(handle): r fn = _nvmlGetFunctionPointer("nvmlDeviceGetCurrPcieLinkWidth") width = c_uint() ret = fn(handle, byref(width)) _nvmlCheckReturn(ret) return bytes_to_str(width.value)
[ "\n /**\n * Retrieves the current PCIe link width\n *\n * For Fermi &tm; or newer fully supported devices.\n *\n * @param device The identifier of the target device\n * @param currLinkWidth Reference in which to return the current PCIe ...
Please provide a description of the function:def nvmlDeviceGetSupportedClocksThrottleReasons(handle): r c_reasons= c_ulonglong() fn = _nvmlGetFunctionPointer("nvmlDeviceGetSupportedClocksThrottleReasons") ret = fn(handle, byref(c_reasons)) _nvmlCheckReturn(ret) return bytes_to_str(c_reasons.valu...
[ "\n /**\n * Retrieves bitmask of supported clocks throttle reasons that can be returned by\n * \\ref nvmlDeviceGetCurrentClocksThrottleReasons\n *\n * For all fully supported products.\n *\n * This method is not supported in virtual machines running virtual GPU (vGPU).\n *\n * @pa...
Please provide a description of the function:def nvmlDeviceGetIndex(handle): r fn = _nvmlGetFunctionPointer("nvmlDeviceGetIndex") c_index = c_uint() ret = fn(handle, byref(c_index)) _nvmlCheckReturn(ret) return bytes_to_str(c_index.value)
[ "\n /**\n * Retrieves the NVML index of this device.\n *\n * For all products.\n *\n * Valid indices are derived from the \\a accessibleDevices count returned by\n * \\ref nvmlDeviceGetCount(). For example, if \\a accessibleDevices is 2 the valid indices\n * are 0 and 1, correspon...
Please provide a description of the function:def nvmlDeviceGetAccountingMode(handle): r c_mode = _nvmlEnableState_t() fn = _nvmlGetFunctionPointer("nvmlDeviceGetAccountingMode") ret = fn(handle, byref(c_mode)) _nvmlCheckReturn(ret) return bytes_to_str(c_mode.value)
[ "\n /**\n * Queries the state of per process accounting mode.\n *\n * For Kepler &tm; or newer fully supported devices.\n *\n * See \\ref nvmlDeviceGetAccountingStats for more details.\n * See \\ref nvmlDeviceSetAccountingMode\n *\n * @param device Th...
Please provide a description of the function:def nvmlDeviceSetAccountingMode(handle, mode): r fn = _nvmlGetFunctionPointer("nvmlDeviceSetAccountingMode") ret = fn(handle, _nvmlEnableState_t(mode)) _nvmlCheckReturn(ret) return None
[ "\n /**\n * Enables or disables per process accounting.\n *\n * For Kepler &tm; or newer fully supported devices.\n * Requires root/admin permissions.\n *\n * @note This setting is not persistent and will default to disabled after driver unloads.\n * Enable persistence mode to b...
Please provide a description of the function:def nvmlDeviceGetAccountingStats(handle, pid): r stats = c_nvmlAccountingStats_t() fn = _nvmlGetFunctionPointer("nvmlDeviceGetAccountingStats") ret = fn(handle, c_uint(pid), byref(stats)) _nvmlCheckReturn(ret) if (stats.maxMemoryUsage == NVML_VALUE_NO...
[ "\n /**\n * Queries process's accounting stats.\n *\n * For Kepler &tm; or newer fully supported devices.\n *\n * Accounting stats capture GPU utilization and other statistics across the lifetime of a process.\n * Accounting stats can be queried during life time of the process and after i...
Please provide a description of the function:def nvmlDeviceGetAccountingPids(handle): r count = c_uint(nvmlDeviceGetAccountingBufferSize(handle)) pids = (c_uint * count.value)() fn = _nvmlGetFunctionPointer("nvmlDeviceGetAccountingPids") ret = fn(handle, byref(count), pids) _nvmlCheckReturn(ret)...
[ "\n /**\n * Queries list of processes that can be queried for accounting stats. The list of processes returned\n * can be in running or terminated state.\n *\n * For Kepler &tm; or newer fully supported devices.\n *\n * To just query the number of processes ready to be queried, call this ...
Please provide a description of the function:def nvmlDeviceGetAccountingBufferSize(handle): r bufferSize = c_uint() fn = _nvmlGetFunctionPointer("nvmlDeviceGetAccountingBufferSize") ret = fn(handle, byref(bufferSize)) _nvmlCheckReturn(ret) return int(bufferSize.value)
[ "\n /**\n * Returns the number of processes that the circular buffer with accounting pids can hold.\n *\n * For Kepler &tm; or newer fully supported devices.\n *\n * This is the maximum number of processes that accounting information will be stored for before information\n * about oldest ...
Please provide a description of the function:def nvmlDeviceGetRetiredPages(device, sourceFilter): r c_source = _nvmlPageRetirementCause_t(sourceFilter) c_count = c_uint(0) fn = _nvmlGetFunctionPointer("nvmlDeviceGetRetiredPages") # First call will get the size ret = fn(device, c_source, byref(c...
[ "\n /**\n * Returns the list of retired pages by source, including pages that are pending retirement\n * The address information provided from this API is the hardware address of the page that was retired. Note\n * that this does not match the virtual address used in CUDA, but will match the address...
Please provide a description of the function:def nvmlDeviceGetRetiredPagesPendingStatus(device): r c_pending = _nvmlEnableState_t() fn = _nvmlGetFunctionPointer("nvmlDeviceGetRetiredPagesPendingStatus") ret = fn(device, byref(c_pending)) _nvmlCheckReturn(ret) return int(c_pending.value)
[ "\n /**\n * Check if any pages are pending retirement and need a reboot to fully retire.\n *\n * For Kepler &tm; or newer fully supported devices.\n *\n * @param device The identifier of the target device\n * @param isPending Reference in...
Please provide a description of the function:def nvmlDeviceGetAPIRestriction(device, apiType): r c_permission = _nvmlEnableState_t() fn = _nvmlGetFunctionPointer("nvmlDeviceGetAPIRestriction") ret = fn(device, _nvmlRestrictedAPI_t(apiType), byref(c_permission)) _nvmlCheckReturn(ret) return int(c...
[ "\n /**\n * Retrieves the root/admin permissions on the target API. See \\a nvmlRestrictedAPI_t for the list of supported APIs.\n * If an API is restricted only root users can call that API. See \\a nvmlDeviceSetAPIRestriction to change current permissions.\n *\n * For all fully supported product...
Please provide a description of the function:def nvmlDeviceSetAPIRestriction(handle, apiType, isRestricted): r fn = _nvmlGetFunctionPointer("nvmlDeviceSetAPIRestriction") ret = fn(handle, _nvmlRestrictedAPI_t(apiType), _nvmlEnableState_t(isRestricted)) _nvmlCheckReturn(ret) return None
[ "\n /**\n * Changes the root/admin restructions on certain APIs. See \\a nvmlRestrictedAPI_t for the list of supported APIs.\n * This method can be used by a root/admin user to give non-root/admin access to certain otherwise-restricted APIs.\n * The new setting lasts for the lifetime of the NVIDIA dr...
Please provide a description of the function:def nvmlDeviceGetBridgeChipInfo(handle): r bridgeHierarchy = c_nvmlBridgeChipHierarchy_t() fn = _nvmlGetFunctionPointer("nvmlDeviceGetBridgeChipInfo") ret = fn(handle, byref(bridgeHierarchy)) _nvmlCheckReturn(ret) return bytes_to_str(bridgeHierarchy)
[ "\n /**\n * Get Bridge Chip Information for all the bridge chips on the board.\n *\n * For all fully supported products.\n * Only applicable to multi-GPU products.\n *\n * @param device The identifier of the target device\n * @param bridgeHierarchy ...
Please provide a description of the function:def nvmlDeviceGetSamples(device, sampling_type, timeStamp): r c_sampling_type = _nvmlSamplingType_t(sampling_type) c_time_stamp = c_ulonglong(timeStamp) c_sample_count = c_uint(0) c_sample_value_type = _nvmlValueType_t() fn = _nvmlGetFunctionPointer("...
[ "\n /**\n * Gets recent samples for the GPU.\n *\n * For Kepler &tm; or newer fully supported devices.\n *\n * Based on type, this method can be used to fetch the power, utilization or clock samples maintained in the buffer by\n * the driver.\n *\n * Power, Utilization and Clock s...
Please provide a description of the function:def nvmlDeviceGetViolationStatus(device, perfPolicyType): r c_perfPolicy_type = _nvmlPerfPolicyType_t(perfPolicyType) c_violTime = c_nvmlViolationTime_t() fn = _nvmlGetFunctionPointer("nvmlDeviceGetViolationStatus") ## Invoke the method to get violation ...
[ "\n /**\n * Gets the duration of time during which the device was throttled (lower than requested clocks) due to power\n * or thermal constraints.\n *\n * The method is important to users who are tying to understand if their GPUs throttle at any point during their applications. The\n * differ...
Please provide a description of the function:def nvmlDeviceGetPcieThroughput(device, counter): r c_util = c_uint() fn = _nvmlGetFunctionPointer("nvmlDeviceGetPcieThroughput") ret = fn(device, _nvmlPcieUtilCounter_t(counter), byref(c_util)) _nvmlCheckReturn(ret) return bytes_to_str(c_util.value)
[ "\n /**\n * Retrieve PCIe utilization information.\n * This function is querying a byte counter over a 20ms interval and thus is the\n * PCIe throughput over that interval.\n *\n * For Maxwell &tm; or newer fully supported devices.\n *\n * This method is not supported in virtual mac...
Please provide a description of the function:def nvmlSystemGetTopologyGpuSet(cpuNumber): r c_count = c_uint(0) fn = _nvmlGetFunctionPointer("nvmlSystemGetTopologyGpuSet") # First call will get the size ret = fn(cpuNumber, byref(c_count), None) if ret != NVML_SUCCESS: raise NVMLError(re...
[ "\n /**\n * Retrieve the set of GPUs that have a CPU affinity with the given CPU number\n * For all products.\n * Supported on Linux only.\n *\n * @param cpuNumber The CPU number\n * @param count When zero, is set to the number of ...
Please provide a description of the function:def nvmlDeviceGetTopologyNearestGpus(device, level): r c_count = c_uint(0) fn = _nvmlGetFunctionPointer("nvmlDeviceGetTopologyNearestGpus") # First call will get the size ret = fn(device, level, byref(c_count), None) if ret != NVML_SUCCESS: ...
[ "\n /**\n * Retrieve the set of GPUs that are nearest to a given device at a specific interconnectivity level\n * For all products.\n * Supported on Linux only.\n *\n * @param device The identifier of the first device\n * @param level ...
Please provide a description of the function:def nvmlDeviceGetTopologyCommonAncestor(device1, device2): r c_level = _nvmlGpuTopologyLevel_t() fn = _nvmlGetFunctionPointer("nvmlDeviceGetTopologyCommonAncestor") ret = fn(device1, device2, byref(c_level)) _nvmlCheckReturn(ret) return bytes_to_str(c...
[ "\n /**\n * Retrieve the common ancestor for two devices\n * For all products.\n * Supported on Linux only.\n *\n * @param device1 The identifier of the first device\n * @param device2 The identifier of the second device\n * @p...
Please provide a description of the function:def encode_notifications(tokens, notifications): fmt = "!BH32sH%ds" structify = lambda t, p: struct.pack(fmt % len(p), 0, 32, t, len(p), p) binaryify = lambda t: t.decode('hex') if type(notifications) is dict and type(tokens) in (str, unicode): tokens, noti...
[ " Returns the encoded bytes of tokens and notifications\n \n tokens a list of tokens or a string of only one token\n notifications a list of notifications or a dictionary of only one\n " ]
Please provide a description of the function:def decode_feedback(binary_tuples): fmt = '!lh32s' size = struct.calcsize(fmt) with StringIO(binary_tuples) as f: return [(datetime.datetime.fromtimestamp(ts), binascii.hexlify(tok)) for ts, toklen, tok in (struct.unpack(fmt, tup) ...
[ " Returns a list of tuples in (datetime, token_str) format \n \n binary_tuples the binary-encoded feedback tuples\n " ]
Please provide a description of the function:def write(self, notifications): "Connect to the APNS service and send notifications" if not self.factory: log.msg('APNSService write (connecting)') server, port = ((APNS_SERVER_SANDBOX_HOSTNAME if self.environment == 'sandbox' ...
[]
Please provide a description of the function:def read(self): "Connect to the feedback service and read all data." log.msg('APNSService read (connecting)') try: server, port = ((FEEDBACK_SERVER_SANDBOX_HOSTNAME if self.environment == 'sandbox' else FEEDBACK_...
[]
Please provide a description of the function:def xmlrpc_provision(self, app_id, path_to_cert_or_cert, environment, timeout=15): if environment not in ('sandbox', 'production'): raise xmlrpc.Fault(401, 'Invalid environment provided `%s`. Valid ' 'environments are `sandbo...
[ " Starts an APNSService for the this app_id and keeps it running\n \n Arguments:\n app_id the app_id to provision for APNS\n path_to_cert_or_cert absolute path to the APNS SSL cert or a \n string containing the .pem file\n environm...
Please provide a description of the function:def xmlrpc_notify(self, app_id, token_or_token_list, aps_dict_or_list): d = self.apns_service(app_id).write( encode_notifications( [t.replace(' ', '') for t in token_or_token_list] if (type(token_or_token_list) is list) else token_...
[ " Sends push notifications to the Apple APNS server. Multiple \n notifications can be sent by sending pairing the token/notification\n arguments in lists [token1, token2], [notification1, notification2].\n \n Arguments:\n app_id provisioned app_id to send to\n token_or...
Please provide a description of the function:def xmlrpc_feedback(self, app_id): return self.apns_service(app_id).read().addCallback( lambda r: decode_feedback(r))
[ " Queries the Apple APNS feedback server for inactive app tokens. Returns\n a list of tuples as (datetime_went_dark, token_str).\n \n Arguments:\n app_id the app_id to query\n Returns:\n Feedback tuples like (datetime_expired, token_str)\n " ]
Please provide a description of the function:def reprovision_and_retry(func): @functools.wraps(func) def wrapper(*a, **kw): errback = kw.get('errback', None) if errback is None: def errback(e): raise e def errback_wrapper(e): if isinstance(e, UnknownAppID) and 'INITIAL' in OPTIONS...
[ "\n Wraps the `errback` callback of the API functions, automatically trying to\n re-provision if the app ID can not be found during the operation. If that's\n unsuccessful, it will raise the UnknownAppID error.\n " ]
Please provide a description of the function:def text_till(self, strings, keep_index=False): if isinstance(strings, str): strings = [strings] original_index = self.index text = "" matched_string = "" while self.more: test_against = self.charact...
[ "Returns all text till it encounters the given string (or one of the given strings)" ]
Please provide a description of the function:def text_after(self, start, match_on): text = "" index = start - 1 while index > 0: text = self.code[index:start] if text.startswith(match_on): return text.lstrip(match_on) index -= 1 ...
[ "Returns all text till it encounters the given string (or one of the given strings)" ]
Please provide a description of the function:def pop(self): char = self.code[self.index] self.index += 1 return char
[ "removes the current character then moves to the next one, returning the current character" ]
Please provide a description of the function:def characters(self, numberOfCharacters): return self.code[self.index:self.index + numberOfCharacters]
[ "Returns characters at index + number of characters" ]
Please provide a description of the function:def next_content(self, start, amount=1): while start < len(self.code) and self.code[start] in (' ', '\t', '\n'): start += 1 return self.code[start: start + amount]
[ "Returns the next non-whitespace characters" ]
Please provide a description of the function:def prev_content(self, start, amount=1): while start > 0 and self.code[start] in (' ', '\t', '\n'): start -= 1 return self.code[(start or amount) - amount: start]
[ "Returns the prev non-whitespace characters" ]
Please provide a description of the function:def parse_arguments( argv: Optional[Sequence[str]] = None) -> argparse.Namespace: parser = argparse.ArgumentParser( description='Git credential helper using pass as the data source.', formatter_class=argparse.ArgumentDefaultsHelpFormatter) ...
[ "\n Parse the command line arguments.\n\n Args:\n argv:\n If not ``None``, use the provided command line arguments for\n parsing. Otherwise, extract them automatically.\n\n Returns:\n The argparse object representing the parsed arguments.\n " ]