Skip to content

Commit b5b99bb

Browse files
committed
convert igcl bandwidth items to base magnitude
1 parent 38e61c5 commit b5b99bb

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

IntelPresentMon/ControlLib/IntelPowerTelemetryAdapter.cpp

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -483,21 +483,15 @@ namespace pwr::intel
483483
// bandwidth telemetry has 2 possible paths for aquisition
484484
if constexpr (std::same_as<T, ctl_power_telemetry2_t>) {
485485
using namespace pmon::util;
486-
// fake spoofing for test purposes
487-
ctl_oc_telemetry_item_t spoofItem{
488-
.bSupported = true,
489-
.units = ctl_units_t::CTL_UNITS_MEM_SPEED_GBPS,
490-
.type = ctl_data_type_t::CTL_DATA_TYPE_DOUBLE,
491-
.value{ .datadouble = ConvertMagnitudePrefix(44.777,
492-
MagnitudePrefix::Gibi, MagnitudePrefix::Base) },
493-
};
494-
// end fake spoof
495-
496486
if (useNewBandwidthTelemetry) {
497487
result = GetInstantaneousPowerTelemetryItem(
498-
spoofItem,
488+
currentSample.vramReadBandwidth,
499489
pm_gpu_power_telemetry_info.gpu_mem_read_bandwidth_bps,
500490
GpuTelemetryCapBits::gpu_mem_read_bandwidth);
491+
pm_gpu_power_telemetry_info.gpu_mem_read_bandwidth_bps = ConvertMagnitudePrefix(
492+
pm_gpu_power_telemetry_info.gpu_mem_read_bandwidth_bps,
493+
MagnitudePrefix::Gibi,
494+
MagnitudePrefix::Base);
501495
pmlog_verb(v::gpu)(std::format("VRAM read BW V1: bSupported [{}] type [{}] units [{}] data_64 [{}] data_double [{}] info []{}",
502496
currentSample.vramReadBandwidth.bSupported, (int)currentSample.vramReadBandwidth.type,
503497
(int)currentSample.vramReadBandwidth.units, currentSample.vramReadBandwidth.value.datau64,
@@ -511,9 +505,13 @@ namespace pwr::intel
511505
}
512506
if (useNewBandwidthTelemetry) {
513507
result = GetInstantaneousPowerTelemetryItem(
514-
spoofItem,
508+
currentSample.vramWriteBandwidth,
515509
pm_gpu_power_telemetry_info.gpu_mem_write_bandwidth_bps,
516510
GpuTelemetryCapBits::gpu_mem_write_bandwidth);
511+
pm_gpu_power_telemetry_info.gpu_mem_write_bandwidth_bps = ConvertMagnitudePrefix(
512+
pm_gpu_power_telemetry_info.gpu_mem_write_bandwidth_bps,
513+
MagnitudePrefix::Gibi,
514+
MagnitudePrefix::Base);
517515
pmlog_verb(v::gpu)(std::format("VRAM write BW V1: bSupported [{}] type [{}] units [{}] data_64 [{}] data_double [{}] info []{}",
518516
currentSample.vramWriteBandwidth.bSupported, (int)currentSample.vramWriteBandwidth.type,
519517
(int)currentSample.vramWriteBandwidth.units, currentSample.vramWriteBandwidth.value.datau64,

0 commit comments

Comments
 (0)