Software > Firmware
Messing with WOF Tables
cy384:
I wouldn't use any of the other ones, but modifying the matching one would be easy enough. Ultimately, they're just spreadsheets with a bunch of values.
I'm probably dropping mine back down to the defaults anyway. The extra heat and power usage doesn't seem worth it, especially since the blackbird is so limited on memory bandwidth.
lepidotos:
Interesting, and that seems fair enough. Would you say there's a noticeable performance difference before and after, even if it's not enough to make it worthwhile? My case does have a bit more cooling capacity and internal volume so I have a little more headroom on heat, I'll still see how far undervolting gets me.
And yeah, the halved memory bandwidth does kind of hurt, but it seems like it's still on par with 7800X3D and such, so silver linings?
bobpaul:
--- Quote from: ejfluhr on October 07, 2022, 05:58:39 pm ---I copied that table CSV from GIT and filtered it to generate plots of frequency versus "CORE_CEFF" for a couple of different "VRATIO" values.
This link declares: https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.54.905&rep=rep1&type=pdf
Power ~= VDD2 x Fclk x Ceff
where the effective switched capacitance, Ceff, is commonly expressed as the product of the physical capacitance CL, and the activity weighting factor α, each averaged over the N nodes.
--- End quote ---
That link doesn't seem to work, do you happen to still know how to navigate to it or know the name of the paper. I tried looking on doi.org using the number in the link, but I don't think that's a complete DOI number.
Trying to follow along and I'm not certain what most of the abbreviations mean, so the column titles are a bit nonsense. Fratio ... Frequency ratio? But ratio of what to what? And
But I did reproduce the graph in python, which should make it a bit easier to iteratively view a bunch of plots:
--- Code: ---import pandas as pd
import matplotlib.pyplot as plt
wof = pd.read_csv('WOF_V7_4_2_SFORZA_16_160_2500_TM.csv')
print("Unique Vratio indexes are: ", wof['VRATIO_INDEX'].unique())
# filter the table down to a plotable slice
def plotme(wf, vratio_index, nest_ceff=0.25, active_quads=6, fratio=1, plotit=True):
vratio = wf['VRATIO_START'][0] + vratio_index * wf['VRATIO_STEP'][0]
wf=wf[
(wf['FRATIO'] == fratio) &
(wf['ACTIVE_QUADS']==active_quads) &
(wf['NEST_CEFF']==nest_ceff) &
(wf['VRATIO_INDEX']==vratio_index) &
(wf['VRATIO']==vratio)
]
wf[['WOF_FREQ','CORE_CEFF']].plot(x='CORE_CEFF',
title=f'Fratio={fratio}, Vratio={vratio}, ACTIVE_QUADS={active_quads}, NEST_CEFF={nest_ceff}')
# plt.show() blocks the thread. If you don't call it, you can render several plots in the background and plt.show() them at once all later
if plotit:
plt.show()
plotme(wof, 12)
--- End code ---
this works well pasted into an ipython prompt. I see most values for Vratio_index just plot a flat line, 12 and a couple of values near 12 make a nice graph. But why 12? And somewhat surprisingly changing the number of active quads doesn't seem to have any effect. Also what defines a quad as active? Simply that it's not powergated and completely off or does "active" mean high load?
And I think the number 1 question is "how does one know which CSV gets selected for a given CPU"?
Edit
Plotting all Vratio values as a 3d surface plot is interesting:
--- Code: ---import pandas as pd
import matplotlib.pyplot as plt
from matplotlib import cm
from mpl_toolkits.mplot3d import Axes3D
def plotsurf(wf, file="", nest_ceff=0.25, active_quads=6, fratio=1, showplot=True, use_index=False):
# the VRATIO_START column is always the same value, as far as I've noticed
wf=wf[
(wf['FRATIO'] == fratio) &
(wf['ACTIVE_QUADS']==active_quads) &
(wf['NEST_CEFF']==nest_ceff)
]
vratio = wf['VRATIO_INDEX'] if use_index else wf['VRATIO']
ax = plt.figure().add_subplot(projection='3d')
ax.plot_trisurf(wf['CORE_CEFF'], vratio, wf['WOF_FREQ'], cmap=cm.jet, linewidth=0.2)
ax.set_title(f'{file}\nFratio={fratio}, ACTIVE_QUADS={active_quads}, NEST_CEFF={nest_ceff}')
ax.set_xlabel('Core_Ceff')
ax.set_ylabel('Vratio')
ax.set_zlabel('WOF_Hz')
ax.view_init(15, 60, 0)
if showplot:
plt.show()
return ax
--- End code ---
(EDIT: graphs should show vratio from 0-1. I fixed a bug in the above code which caused the values greater than 1 shown, but I didn't take new screenshots...
and I see from the file in hostboot where the error is generated that
--- Code: --- 4.98699| UserData1 Number of cores : 0x00100002000000a0
4.98700| UserData2 WOF Power Mode (1=Nominal, 2=Turbo) : 0x000009c400000012
--- End code ---
means 12core, "mode=2" (turbo?) 160w, 2500MHz, with header().size=12. Looking at the SFORZA list, that's a 1800-2500MHz part with 3.8GHz turbo. Intuitively it' makes sense that table matches that CPU. But, also looking at the SFORZA list, every CPU on the list supports turbo mode to at least 3.8GHz, sometimes 4.1GHz.
So why are so many of the tables suffixed with _NM.csv? There's a WOF_V7_4_2_SFORZA_16_140_2200_NM.csv, but I don't see any 140w 16core SFORZAs on the list. And plotting it the same as the other, it still goes to 3.8GHz despite the "2200MHz normal mode" file label. ???
ejfluhr:
>That link doesn't seem to work, do you happen to still know how to navigate to it or know the name of the paper.
Sorry, I don't. As I recall, it was an educational presentation/paper on how processor power is modeled. It is pretty well known material, maybe you can find other references.
Nominal mode is just a lower power TDP. Turbo mode is a higher power TDP. WOF should be able to boost from both, the proc will just start and get to higher frequencies sooner with the TM table.
It's been a long time, but I believe VRATIO just means the number of ON cores (a.k.a. active) relative to the maximum available. As the # of active cores goes down, the power from those cores is applied to the remaining cores, allowing them to boost to higher frequencies. Depending on the system & power limit, the proc could pretty quickly apply so much power credit from offline cores that it flat-lines at the maximum possible frequency, i.e. it becomes technology limited not power limited. It sounds like, for that table, the processor is only power-limited when >= 12 cores ON. Technically VRATIO is "voltage ratio" intended to handle quads using the internal voltage regulator at some % below the input voltage, but it ended up not getting supported and devolved to tracking # of cores. A core in a stopped state with the power headers off has voltage of 0v hance VRATIO=0 for that core, and you add up the # of ON vs OFF cores to get he VRATIO.
FRATIO, or "frequency ratio" was intended to handle some cores operating at lower frequencies than processor-level frequency target, since each quad has it's own clock generation. I don't believe Linux ever implemented support for different quad frequencies so they all just run at the same frequency? If true, WOF only uses FRATIO=1.0 indices.
>And I think the number 1 question is "how does one know which CSV gets selected for a given CPU"?
WOF has a bunch of cross-checks between the data table and the module VPD data....I'm not exactly sure which, but possibly core count, nominal/turbo/max frequencies, & the sort power target? E.g. each table is designed to manage to a certain power target, and the processor code is trying to find a table appropriate for that processor
Cool 3D plot! For reference, CORE_CEFF is the ratio of the workload switching power relative to TDP, where TDP=1.0. So 0.5 means the workload has half the switching power of TDP. If the workload is using less power, the WOF table should attempt to raise frequency, up to the maximum allowed, where it flatlines. Similarly, if there are fewer cores active, the frequency will go up, and if both are true, the frequency will go up more. So that explains the shape of that plot.
bobpaul:
--- Quote from: ejfluhr on March 14, 2025, 12:05:51 am --->That link doesn't seem to work, do you happen to still know how to navigate to it or know the name of the paper.
Sorry, I don't. As I recall, it was an educational presentation/paper on how processor power is modeled. It is pretty well known material, maybe you can find other references.
--- End quote ---
hmm, ok. I thought it might be more specific to these processors.
--- Quote from: ejfluhr on March 14, 2025, 12:05:51 am ---It's been a long time, but I believe VRATIO just means the number of ON cores (a.k.a. active) relative to the maximum available. As the # of active cores goes down, the power from those cores is applied to the remaining cores, allowing them to boost to higher frequencies. Depending on the system & power limit, the proc could pretty quickly apply so much power credit from offline cores that it flat-lines at the maximum possible frequency, i.e. it becomes technology limited not power limited. It sounds like, for that table, the processor is only power-limited when >= 12 cores ON. Technically VRATIO is "voltage ratio" intended to handle quads using the internal voltage regulator at some % below the input voltage, but it ended up not getting supported and devolved to tracking # of cores. A core in a stopped state with the power headers off has voltage of 0v hance VRATIO=0 for that core, and you add up the # of ON vs OFF cores to get he VRATIO.
--- End quote ---
Ah-ha. So that's why VRATIO_INDEX is always 0-23 and VRATIO_STEP is always exactly 1/24 to 3 figures. VRATIO_STEP is always 0.0409 to account for rounding in VRATIO_STEP to ensure that 23*VRATIO_STEP + VRATIO_START == 1. So really, VRATIO_INDEX is the easier to follow number since it's just the number of active cores. And for a 16 core CPU, one should be able to ignore any VRATIO_INDEX > 15, as 0-15 cover 1-16 active cores, right?
--- Quote from: ejfluhr on March 14, 2025, 12:05:51 am ---I don't believe Linux ever implemented support for different quad frequencies so they all just run at the same frequency? If true, WOF only uses FRATIO=1.0 indices.
--- End quote ---
Certainly in Linux I see different frequencies on a per-core basis, but I understood that to be simply what the kernel was requesting rather than what it's actually running at. I had thought it was the case where if 2 active cores in a quad had requested frequencies of 2200 and 1800 then the quad (and thus both cores) would run at 2200MHz. Linux knows that 4 threads are the same core, so those always show the same frequency, but I understood Linux didn't actually know about the quads and rather I thought it was the PNOR that was really in control of the quad frequencies. But I don't know of any way of checking what frequency a core (or quad) is actually running at.
All of the tables have FRATIO_STEP of 0.1, FRATIO_START of 1, and FRATIO of 0.6, 0.7, 0.8, 0.9, or 1.0. But... yeah, holding vratio constant and looking at fratio, it does not look like the fratio value has an impact, at least for this csv:
--- Quote from: ejfluhr on March 14, 2025, 12:05:51 am ---For reference, CORE_CEFF is the ratio of the workload switching power relative to TDP, where TDP=1.0. So 0.5 means the workload has half the switching power of TDP. If the workload is using less power, the WOF table should attempt to raise frequency, up to the maximum allowed, where it flatlines. Similarly, if there are fewer cores active, the frequency will go up, and if both are true, the frequency will go up more. So that explains the shape of that plot.
--- End quote ---
OK, I don't understand the name, but that makes more sense than my assumption that it was a physical property related to the switching capacitance.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version