Skip to content

Commit

Permalink
SWDEV-500382 fix energy consumed
Browse files Browse the repository at this point in the history
Change-Id: I3f180f34abed763db1287bf01581753534f32828
  • Loading branch information
adam360x authored and dmitrii-galantsev committed Jan 22, 2025
1 parent 290b90d commit e8057b1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rdc_libs/rdc/src/RdcCacheManagerImpl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ rdc_status_t RdcCacheManagerImpl::rdc_update_job_stats(uint32_t gpu_index,
uint64_t time_elapsed = value.ts - gpu_iter->second.energy_last_time;
// Stored in cache as microseconds and microwats
gpu_iter->second.energy_consumed += (time_elapsed * value.value.l_int) / (1000.0 * 1000000);
gpu_iter->second.energy_last_time = value.ts;
}
fsummary->second.max_value =
std::max(fsummary->second.max_value, static_cast<int64_t>(value.value.l_int));
Expand Down

0 comments on commit e8057b1

Please sign in to comment.