Author Topic: Hyperthreading  (Read 5005 times)

Siekmanski

  • Member
  • *****
  • Posts: 2359
Re: Hyperthreading
« Reply #15 on: August 31, 2018, 12:44:49 AM »
 :biggrin:
Creative coders use backward thinking techniques as a strategy.

aw27

  • Guest
Re: Hyperthreading
« Reply #16 on: August 31, 2018, 03:38:17 AM »
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.

Code: [Select]
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

  • Member
  • *****
  • Posts: 1367
  • At least we are not alone...
Re: Hyperthreading
« Reply #17 on: August 31, 2018, 04:47:55 AM »
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:
No remarkable words at all...

felipe

  • Member
  • *****
  • Posts: 1367
  • At least we are not alone...
Re: Hyperthreading
« Reply #18 on: August 31, 2018, 04:51:01 AM »
Btw, i think something like this should be in the workshop... :idea:

But it's just a suggestion  :redface:

No remarkable words at all...

aw27

  • Guest
Re: Hyperthreading
« Reply #19 on: August 31, 2018, 05:13:53 AM »
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

  • Member
  • *****
  • Posts: 1367
  • At least we are not alone...
Re: Hyperthreading
« Reply #20 on: August 31, 2018, 08:37:45 AM »
Ok, i had thought on that, but i wasn't sure. Thanks again.  :icon14:
No remarkable words at all...

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 8235
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Hyperthreading
« Reply #21 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.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

aw27

  • Guest
Re: Hyperthreading
« Reply #22 on: August 31, 2018, 04:33:14 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

  • Member
  • ****
  • Posts: 797
Re: Hyperthreading
« Reply #23 on: August 31, 2018, 06:49:00 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

  • Guest
Re: Hyperthreading
« Reply #24 on: September 01, 2018, 05:07:56 AM »
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

  • Member
  • *****
  • Posts: 2362
Re: Hyperthreading
« Reply #25 on: September 08, 2018, 12:02:02 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.

Code: [Select]
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.

Code: [Select]
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

  • Guest
Re: Hyperthreading
« Reply #26 on: September 08, 2018, 10:38:33 PM »
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

  • Member
  • *****
  • Posts: 2362
Re: Hyperthreading
« Reply #27 on: September 08, 2018, 11:15:55 PM »
Glad to help.
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org