Skip to content

vramEnergyCounter and totalCardEnergyCounter are broken on Arc B580 and always return 0 #138

Description

@ProjectPhysX

vramEnergyCounter and totalCardEnergyCounter are broken on Arc B580 and always return 0. Only gpuEnergyCounter works but this gives only GPU chip power draw.

Code sample I use:

ctl_power_telemetry_t power_telemetry = { 0 };
power_telemetry.Size = sizeof(ctl_power_telemetry_t);
double current_power_limit_milliwatts = 0.0;
ctl_pci_properties_t pci_properties = { 0 };
pci_properties.Size = sizeof(ctl_pci_properties_t);
ctl_pci_state_t pci_state = { 0 };
pci_state.Size = sizeof(ctl_pci_state_t);
ctlPowerTelemetryGet(igcl_devices[i], &power_telemetry);
ctlOverclockPowerLimitGet(igcl_devices[i], &current_power_limit_milliwatts);
ctlPciGetProperties(igcl_devices[i], &pci_properties);
ctlPciGetState(igcl_devices[i], &pci_state);
gpus[i].temperature = to_uint(power_telemetry.gpuCurrentTemperature.value.datadouble);
gpus[i].fan = to_uint(power_telemetry.fanSpeed[0].value.datadouble);
gpus[i].clock_core = to_uint(power_telemetry.gpuCurrentClockFrequency.value.datadouble);
gpus[i].clock_memory = to_uint(power_telemetry.vramCurrentClockFrequency.value.datadouble);
gpus[i].clock_memory_max = max(gpus[i].clock_memory_max, gpus[i].clock_memory);
const double igcl_current_energy = fmax(power_telemetry.gpuEnergyCounter.value.datadouble+power_telemetry.vramEnergyCounter.value.datadouble, power_telemetry.totalCardEnergyCounter.value.datadouble);
const double igcl_current_energy_timestamp = power_telemetry.timeStamp.value.datadouble;
gpus[i].power_used = to_uint((igcl_current_energy-igcl_last_energy[i])/(igcl_current_energy_timestamp-igcl_last_energy_timestamp[i]));
gpus[i].power_max = to_uint(current_power_limit_milliwatts*0.001);
gpus[i].power = 100u*gpus[i].power_used/max(gpus[i].power_max, 1u);
gpus[i].pcie_bandwidth_max = (uint)(pci_properties.maxSpeed.maxBandwidth/1000000ull);
gpus[i].pcie_bandwidth_used = (uint)(pci_state.speed.maxBandwidth/1000000ull);
gpus[i].pcie_bandwidth_usage = to_uint(100.0f*(float)pci_state.speed.maxBandwidth/(float)pci_properties.maxSpeed.maxBandwidth);
igcl_last_energy[i] = igcl_current_energy;
igcl_last_energy_timestamp[i] = igcl_current_energy_timestamp;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions