LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bug with CPU Information

Not sure if this has been reported, cannot find anything with a quick look, but inspired by this thread to look at my CPU information, there is a bug with the CPU Information VI in 2024Q3. I assume it extends back to previous versions. This CPU Information VI can report erroneous information when you have a mixture of P & E cores. 

 

The P cores in my CPU support 2 threads whereas the E cores support 1 thread. (I have 6 P cores and 8 E cores for 20 "logical processors") The number of logical processors is correctly recorded, but the number of cores cannot be correctly stated because of the thread difference of the CPUs. Version 2019 attached.

 

The System Configuration VIs gives the correct value.

 

mcduff_0-1736184825529.png

 

0 Kudos
Message 1 of 15
(395 Views)

Interesting, but not surprising. Differing threads/core is a quite new phenomenon, so it'd assume it only asks for Locical CPUs and Threads/core for the 1st core and divides, instead of looping through all to save performance. 

Though, can you use all 20 at once? Isn't performance mode 14 and energy saving 6 threads?

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 2 of 15
(330 Views)

Hi Yamaeda,

 


@Yamaeda wrote:

Though, can you use all 20 at once? Isn't performance mode 14 and energy saving 6 threads?


You can use 20 cores at once.

There are 6 P cores, that allow for hyperthreading, so you get 12 threads.

And 8 E cores without hyperthreading. In total you have 20 threads available…

 

I see a similar behaviour in LV2021 for my 2P+8E system: 12 logical cores, in 6*2 arrangement (instead of 2*2 + 8*1)…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 15
(325 Views)

(How) can you control which thread goes where?

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 15
(315 Views)

@Yamaeda wrote:

(How) can you control which thread goes where?


You can use Timed While loop, where you have CPU Input, but I didn't test it on such CPU, because haven't yet in my hands.

 

Screenshot 2025-01-07 14.07.42.png

0 Kudos
Message 5 of 15
(309 Views)

@Yamaeda wrote:

Though, can you use all 20 at once? 


It is nice to know the count if manually setting parallel loops. Lastly, I have a System Information Window in a program, it gives the CPU information which I want to be accurate. However, the system configuration vi's are much slower than the CPU Information vi. 

0 Kudos
Message 6 of 15
(285 Views)

@mcduff wrote:
. However, the system configuration vi's are much slower than the CPU Information vi. 

Speed is irrelevant here because the information cannot change at runtime. You can just wrap it into a non-reentrant subVIs that caches it on first run and just returns the cached value later. (I am sure CPU info does the same internally!)

 

 

altenbach_0-1736266784973.png

 

 

When maintaining my benchmarks page, I have struggled for a long time to update the table because I cannot rely on the LabVIEW information output (there are more inconsistencies beyond what you mentioned). I have to manually look up each new CPU from the AMD or Intel sites. It is hard to tell how the workload is really split between P and E cores, but the overall performance is still reasonable. I am sure windows itself is aware of the core blend and contributes some magic.

 

For example while a 32 core Ryzen 9 has a close to 32x parallel advantage, a 24 core (P&E mix) I9 is actually only 16x faster, (i.e. not 24x)!

 

Message 7 of 15
(280 Views)

@altenbach wrote:

 

When maintaining my benchmarks page, I have struggled for a long time to update the table because I cannot rely on the LabVIEW information output (there are more inconsistencies beyond what you mentioned). I have to manually look up each new CPU from the AMD or Intel sites. It is hard to tell how the workload is really split between P and E cores, but the overall performance is still reasonable. I am sure windows itself is aware of the core blend and contributes some magic.


The mixing of Efficiency and Performance cores was announced in 2021, with their first commercial release in 2022. So why hasn't NI updated LabVIEW's CPU Information primitive in the last 3-4 years to support getting this information correctly?  You maintaining a table of information is the most accurate way to get the this information today, which sounds tedious. 

0 Kudos
Message 8 of 15
(240 Views)

@Hooovahh wrote:
The mixing of Efficiency and Performance cores was announced in 2021, with their first commercial release in 2022. So why hasn't NI updated LabVIEW's CPU Information primitive in the last 3-4 years to support getting this information correctly? 

The problem is that it would require changing the connector pane (more parameters!) and it is sort of a moving target. Maybe all outputs should be arrays.

 

I am not really sure how useful the CPU information is, because there are so many other factors, such as thermal throttling if all cores are active. The number of virtual cores is reasonable to guide the number of parallel instance by default.

 

I have not played with it, but how is it with the timed loop if we assign it to a processor? Do we even know what kind of core we get?

0 Kudos
Message 9 of 15
(208 Views)

@altenbach wrote:

 

The problem is that it would require changing the connector pane (more parameters!) and it is sort of a moving target. Maybe all outputs should be arrays.

CPU architecture doesn't change all that frequently, and NI adapting a primitive (or creating a new one) seems like a fairly easy thing to do.  I suspect the underlining technology they use, which might be home grown, is the bigger challenge.  If NI made their own set of tools for detecting CPU information, and the developer responsible for that left NI a long time ago, then bugs in this primitive could take a long time to understand and fix.  Still NI is a big company, and a function like CPU Information, seems like the kind of thing they should make sure works with CPUs from the last 3-4 years.

0 Kudos
Message 10 of 15
(202 Views)