Skip to content

Commit e4a9acb

Browse files
committed
spoofed gather
1 parent bdcbecd commit e4a9acb

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

IntelPresentMon/ControlLib/IntelPowerTelemetryAdapter.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,9 +481,18 @@ namespace pwr::intel
481481

482482
// bandwidth telemetry has 2 possible paths for aquisition
483483
if constexpr (std::same_as<T, ctl_power_telemetry2_t>) {
484+
// fake spoofing for test purposes
485+
ctl_oc_telemetry_item_t spoofItem{
486+
.bSupported = true,
487+
.units = ctl_units_t::CTL_UNITS_MEM_SPEED_GBPS,
488+
.type = ctl_data_type_t::CTL_DATA_TYPE_DOUBLE,
489+
.value{ .datadouble = 44.777 },
490+
};
491+
// end fake spoof
492+
484493
if (useNewBandwidthTelemetry) {
485494
result = GetInstantaneousPowerTelemetryItem(
486-
currentSample.vramReadBandwidth,
495+
spoofItem,
487496
pm_gpu_power_telemetry_info.gpu_mem_read_bandwidth_bps,
488497
GpuTelemetryCapBits::gpu_mem_read_bandwidth);
489498
pmlog_verb(v::gpu)(std::format("VRAM read BW V1: bSupported [{}] type [{}] units [{}] data_64 [{}] data_double [{}] info []{}",
@@ -499,7 +508,7 @@ namespace pwr::intel
499508
}
500509
if (useNewBandwidthTelemetry) {
501510
result = GetInstantaneousPowerTelemetryItem(
502-
currentSample.vramWriteBandwidth,
511+
spoofItem,
503512
pm_gpu_power_telemetry_info.gpu_mem_write_bandwidth_bps,
504513
GpuTelemetryCapBits::gpu_mem_write_bandwidth);
505514
pmlog_verb(v::gpu)(std::format("VRAM write BW V1: bSupported [{}] type [{}] units [{}] data_64 [{}] data_double [{}] info []{}",

0 commit comments

Comments
 (0)