News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Hyperthreading

Started by Magnum, August 29, 2018, 11:44:45 AM

Previous topic - Next topic

Siekmanski

Creative coders use backward thinking techniques as a strategy.

aw27

Quote from: Raistlin on August 30, 2018, 03:26:38 PM
From the AMD manuals :
HTT: hyper-threading technology. Indicates either that there is more than one thread per core or more than one core per processor.
Exactly! So, these days virtually all CPUs have the HT bit set and we can't rely on that to tell whether Hyperthreading is being used or not because almost all processors are multi-core and many are both multi-core and have Hyperthreading.

I attach code to detect Hyperthreading (the real one), Logical Cores and Physical Cores Information. I have no AMDs, so please anyone with AMD let me know if it tells the truth or not.


Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
Hyperthreading 1 Logical Cores 12 Physical Cores 6


Note: There is another way to find the information which digs deeper than this one. May be I will handle it sometime soon.


felipe

That's great aw, thanks for sharing your work.  :icon14: All seems to be correct here, all the information provided in this program is the same provided from microsoft windows and other program too.  :icon14:

But what's supposed to be the hyperthreading number?   :idea: I get a 1 there. In the other programs i don't get any info about hyperthreading. But in the machine is enabled the hyperthreading technology in the bios setup.  And there it say something like:
Quote"when disabled only 1 thread will be enabled from each enabled core."
.  :idea:

felipe

Btw, i think something like this should be in the workshop... :idea:

But it's just a suggestion  :redface:


aw27

hi felipe,
Thank you for your comments.
hyperthreading can only be TRUE or FALSE. To make a long story shorter I decided  :biggrin: to make TRUE=1 and FALSE=0.

felipe

Ok, i had thought on that, but i wasn't sure. Thanks again.  :icon14:

hutch--

If you have to find out if the processor is either AMD or Intel, the ID string should do that for you.

aw27

Quote from: hutch-- on August 31, 2018, 03:20:24 PM
If you have to find out if the processor is either AMD or Intel, the ID string should do that for you.

Yes, but someone whispered into my ears that this cores detection procedure may not work with some AMD models (Ryzen?).

LiaoMi

Quote from: AW on August 31, 2018, 04:33:14 PM
Quote from: hutch-- on August 31, 2018, 03:20:24 PM
If you have to find out if the processor is either AMD or Intel, the ID string should do that for you.

Yes, but someone whispered into my ears that this cores detection procedure may not work with some AMD models (Ryzen?).

Hi AW,

I cant test anymore, I bought a gift Asus Rog Ryzen 7 1700 for my parents, now that they left home, there is no laptop for the test anymore  :biggrin: :(

aw27

Quote from: LiaoMi on August 31, 2018, 06:49:00 PM
Hi AW,
I cant test anymore, I bought a gift Asus Rog Ryzen 7 1700 for my parents, now that they left home, there is no laptop for the test anymore  :biggrin: :(

Hi LiaiMi,
Too bad  :(, may be you can save the program in a memory card and test when you visit your parents  :idea: .

Just kidding  :biggrin: . Never mind, I am trying someone else to test on a ThreadRipper. Intimately, I believe the software works correctly on all existing AMD as well (may be not on future AMDs). 

Magnum

Quote from: AW on August 31, 2018, 03:38:17 AM
Quote from: Raistlin on August 30, 2018, 03:26:38 PM
From the AMD manuals :
HTT: hyper-threading technology. Indicates either that there is more than one thread per core or more than one core per processor.
Exactly! So, these days virtually all CPUs have the HT bit set and we can't rely on that to tell whether Hyperthreading is being used or not because almost all processors are multi-core and many are both multi-core and have Hyperthreading.

I attach code to detect Hyperthreading (the real one), Logical Cores and Physical Cores Information. I have no AMDs, so please anyone with AMD let me know if it tells the truth or not.


Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
Hyperthreading 1 Logical Cores 12 Physical Cores 6


Note: There is another way to find the information which digs deeper than this one. May be I will handle it sometime soon.

I have an AMD. Your code works perfectly.

AMD A8-7600 Radeon R7, 10 Compute Cores 4C+6G 
Hyperthreading 0 Logical Cores 4 Physical Cores 4

Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

aw27

Quote
I have an AMD. Your code works perfectly.

Thank you for letting me know.  :t
However, it does not report as expected for the family 17 (Ryzen processors). I will experiment with the other approach ASAP.

Magnum

Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org