News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Test Results for feature detection required

Started by Gunther, February 01, 2021, 11:04:34 PM

Previous topic - Next topic

Gunther

The archive cpu.zip contains 3 files:

cpu.asm (assembly language source), cpu.exe (the running 64 bit console application) and build_cpu.bat (builds the application).

The output of the program depends on the machine it is running on. It outputs a few information about the processor. This is the result on my Windows 10 computer:

CPU strings:
------------

Processor Vendor String: GenuineIntel
Processor Brand String:  Intel(R)Core(TM)i7-7820XCPU@3.60GHz

Features by Processor and Operating System:
-------------------------------------------

Supported Instruction Sets: MMX  SSE  SSE2  SSE3  SSSE3  SSE4.1  SSE4.2  AVX  AVX2  AVX-512 F

It's safe to use the following AVX-512 extensions with this machine:
--------------------------------------------------------------------

AVX-512 DQ         : Vector Double Word and Quad Word
AVX-512 CD         : Efficient conflict detection to allow more loops to be vectorized.
AVX-512 BW         : Extends AVX-512 to cover 8-bit and 16-bit integer operations.
AVX-512 VL         : Extends most AVX-512 operations to also operate on XMM and YMM registers.

Any processor that implements any portion of the AVX-512 extensions MUST implement AVX-512 F.
Not every architecture has all the instruction sets built in. We've for example:

Knights Landing    : CD ER PF
Knights Mill       : CD ER PF 4FMAPS 4VNNIW VPOPCNTDQ
Skylake            : CD VL DQ BW
Cannon Lake        : CD VL DQ BW IFMA VBMI
Cascade Lake       : CD VL DQ BW VNNI
Ice Lake           : CD VL DQ BW IFMA VBMI VBMI2 VPOPCNTDQ BITALG VNNI VPCLMULQDQ GFNI VAES
Tiger Lake         : CD VL DQ BW IFMA VBMI VBMI2 VPOPCNTDQ BITALG VNNI VPCLMULQDQ GFNI VAES VP2INTERSECT

Your CPU supports the following additional instructions and features:
---------------------------------------------------------------------

RDRAND             : Returning random numbers from an on-chip hardware random number generator.
AESNI              : Advanced Encryption Standard Instruction Set
VMX                : Virtual Machine Extensions
FPU                : Floating Point Unit on chip
VME                : Virtual 8086 Mode Enhancements
DE                 : Debugging Extensions. Support for I/O breakpoints.
PSE                : Page Size Extension
TSC                : Time Stamp Counter. The RDTSC instruction is supported.
MSR                : Model Specific Registers RDMSR and WRMSR Instructions.
PAE                : Physical Address Extension
CX8                : CMPXCHG8B instruction (compare-and-exchange 8 bytes) is supported.
APIC               : The processor contains an Advanced Programmable Interrupt Controller (APIC) on board.

The program is started normally with cpu or cpu.exe from the command line. Since quite a lot may be displayed, you have to scroll a bit to be able to read everything. Alternatively, you can launch the application in full-screen mode.
The third variant is to use a pipe, something like this:

cpu.exe>cpu.txt

With other processors, a different output will naturally result. I don't want to be nosy, but results from other forum members would be helpful. Thanks in advance.

Gunther
You have to know the facts before you can distort them.

hutch--

This is my result. The only difference from the result is that I have the 5820k clocked at 4 gig.

CPU strings:
------------

Processor Vendor String: GenuineIntel
Processor Brand String:  Intel(R)Core(TM)i7-5820KCPU@3.30GHz

Features by Processor and Operating System:
-------------------------------------------

Supported Instruction Sets: MMX  SSE  SSE2  SSE3  SSSE3  SSE4.1  SSE4.2  AVX  AVX2

Your CPU supports the following additional instructions and features:
---------------------------------------------------------------------

RDRAND             : Returning random numbers from an on-chip hardware random number generator.
AESNI              : Advanced Encryption Standard Instruction Set
VMX                : Virtual Machine Extensions
FPU                : Floating Point Unit on chip
VME                : Virtual 8086 Mode Enhancements
DE                 : Debugging Extensions. Support for I/O breakpoints.
PSE                : Page Size Extension
TSC                : Time Stamp Counter. The RDTSC instruction is supported.
MSR                : Model Specific Registers RDMSR and WRMSR Instructions.
PAE                : Physical Address Extension
CX8                : CMPXCHG8B instruction (compare-and-exchange 8 bytes) is supported.
APIC               : The processor contains an Advanced Programmable Interrupt Controller (APIC) on board.

FORTRANS

Hi,

   Two laptops.

CPU strings:
------------

Processor Vendor String: GenuineIntel
Processor Brand String:  Intel(R)Core(TM)i3-4005UCPU@1.70GHz

Features by Processor and Operating System:
-------------------------------------------

Supported Instruction Sets: MMX  SSE  SSE2  SSE3  SSSE3  SSE4.1  SSE4.2  AVX  AVX2

Your CPU supports the following additional instructions and features:
---------------------------------------------------------------------

RDRAND             : Returning random numbers from an on-chip hardware random number generator.
AESNI              : Advanced Encryption Standard Instruction Set
VMX                : Virtual Machine Extensions
FPU                : Floating Point Unit on chip
VME                : Virtual 8086 Mode Enhancements
DE                 : Debugging Extensions. Support for I/O breakpoints.
PSE                : Page Size Extension
TSC                : Time Stamp Counter. The RDTSC instruction is supported.
MSR                : Model Specific Registers RDMSR and WRMSR Instructions.
PAE                : Physical Address Extension
CX8                : CMPXCHG8B instruction (compare-and-exchange 8 bytes) is supported.
APIC               : The processor contains an Advanced Programmable Interrupt Controller (APIC) on board.



CPU strings:
------------

Processor Vendor String: GenuineIntel
Processor Brand String:  Intel(R)Core(TM)i3-10110UCPU@2.10GHz

Features by Processor and Operating System:
-------------------------------------------

Supported Instruction Sets: MMX  SSE  SSE2  SSE3  SSSE3  SSE4.1  SSE4.2  AVX  AVX2

Your CPU supports the following additional instructions and features:
---------------------------------------------------------------------

RDRAND             : Returning random numbers from an on-chip hardware random number generator.
AESNI              : Advanced Encryption Standard Instruction Set
VMX                : Virtual Machine Extensions
FPU                : Floating Point Unit on chip
VME                : Virtual 8086 Mode Enhancements
DE                 : Debugging Extensions. Support for I/O breakpoints.
PSE                : Page Size Extension
TSC                : Time Stamp Counter. The RDTSC instruction is supported.
MSR                : Model Specific Registers RDMSR and WRMSR Instructions.
PAE                : Physical Address Extension
CX8                : CMPXCHG8B instruction (compare-and-exchange 8 bytes) is supported.
APIC               : The processor contains an Advanced Programmable Interrupt Controller (APIC) on board.


Regards,

Steve N.

mineiro

wine cpu.exe

CPU strings:
------------

Processor Vendor String: GenuineIntel
Processor Brand String:  Intel(R)Core(TM)i7-6700CPU@3.40GHz

Features by Processor and Operating System:
-------------------------------------------

Supported Instruction Sets: MMX  SSE  SSE2  SSE3  SSSE3  SSE4.1  SSE4.2  AVX  AVX2

Your CPU supports the following additional instructions and features:
---------------------------------------------------------------------

RDRAND             : Returning random numbers from an on-chip hardware random number generator.
AESNI              : Advanced Encryption Standard Instruction Set
VMX                : Virtual Machine Extensions
SMX                : Safer Mode Extensions
FPU                : Floating Point Unit on chip
VME                : Virtual 8086 Mode Enhancements
DE                 : Debugging Extensions. Support for I/O breakpoints.
PSE                : Page Size Extension
TSC                : Time Stamp Counter. The RDTSC instruction is supported.
MSR                : Model Specific Registers RDMSR and WRMSR Instructions.
PAE                : Physical Address Extension
CX8                : CMPXCHG8B instruction (compare-and-exchange 8 bytes) is supported.
APIC               : The processor contains an Advanced Programmable Interrupt Controller (APIC) on board.

I'd rather be this ambulant metamorphosis than to have that old opinion about everything

six_L

QuoteCPU strings:
------------

Processor Vendor String: GenuineIntel
Processor Brand String:  Intel(R)Core(TM)i5-9400HCPU@2.50GHz

Features by Processor and Operating System:
-------------------------------------------

Supported Instruction Sets: MMX  SSE  SSE2  SSE3  SSSE3  SSE4.1  SSE4.2  AVX  AVX2

Your CPU supports the following additional instructions and features:
---------------------------------------------------------------------

RDRAND             : Returning random numbers from an on-chip hardware random number generator.
AESNI              : Advanced Encryption Standard Instruction Set
VMX                : Virtual Machine Extensions
SMX                : Safer Mode Extensions
FPU                : Floating Point Unit on chip
VME                : Virtual 8086 Mode Enhancements
DE                 : Debugging Extensions. Support for I/O breakpoints.
PSE                : Page Size Extension
TSC                : Time Stamp Counter. The RDTSC instruction is supported.
MSR                : Model Specific Registers RDMSR and WRMSR Instructions.
PAE                : Physical Address Extension
CX8                : CMPXCHG8B instruction (compare-and-exchange 8 bytes) is supported.
APIC               : The processor contains an Advanced Programmable Interrupt Controller (APIC) on board.
Say you, Say me, Say the codes together for ever.

Gunther

Thanks for using this small application going to: Steve (aka Hutch), Steve N. (aka FORTRANS), mineiro, six_L.  :thumbsup:

The program will hopefully be helpful for some other programmers. I am now working on structuring it better, testing the rest and also recognizing the new instructions announced by Intel.
I mean in particular AMX (Advanced Matrix Extensions). 

Gunther
You have to know the facts before you can distort them.

felipe


CPU strings:
------------

Processor Vendor String: GenuineIntel
Processor Brand String:  Intel(R)Core(TM)i5CPU650@3.20GHz

Features by Processor and Operating System:
-------------------------------------------

Supported Instruction Sets: MMX  SSE  SSE2  SSE3  SSSE3  SSE4.1  SSE4.2

Your CPU supports the following additional instructions and features:
---------------------------------------------------------------------

AESNI              : Advanced Encryption Standard Instruction Set
VMX                : Virtual Machine Extensions
SMX                : Safer Mode Extensions
FPU                : Floating Point Unit on chip
VME                : Virtual 8086 Mode Enhancements
DE                 : Debugging Extensions. Support for I/O breakpoints.
PSE                : Page Size Extension
TSC                : Time Stamp Counter. The RDTSC instruction is supported.
MSR                : Model Specific Registers RDMSR and WRMSR Instructions.
PAE                : Physical Address Extension
CX8                : CMPXCHG8B instruction (compare-and-exchange 8 bytes) is sup
ported.
APIC               : The processor contains an Advanced Programmable Interrupt Controller (APIC) on board.


Nice program, thanks Gunther for sharing it  :thup:. It's nice to have you back.  :mrgreen:

jj2007

CPU strings:
------------

Processor Vendor String: GenuineIntel
Processor Brand String:  Intel(R)Core(TM)i5-2450MCPU@2.50GHz

Features by Processor and Operating System:
-------------------------------------------

Supported Instruction Sets: MMX  SSE  SSE2  SSE3  SSSE3  SSE4.1  SSE4.2  AVX

Your CPU supports the following additional instructions and features:
---------------------------------------------------------------------

AESNI              : Advanced Encryption Standard Instruction Set
VMX                : Virtual Machine Extensions
FPU                : Floating Point Unit on chip
VME                : Virtual 8086 Mode Enhancements
DE                 : Debugging Extensions. Support for I/O breakpoints.
PSE                : Page Size Extension
TSC                : Time Stamp Counter. The RDTSC instruction is supported.
MSR                : Model Specific Registers RDMSR and WRMSR Instructions.
PAE                : Physical Address Extension
CX8                : CMPXCHG8B instruction (compare-and-exchange 8 bytes) is supported.
APIC               : The processor contains an Advanced Programmable Interrupt Controller (APIC) on board.


Very nice, Gunther :thumbsup:

For comparison, PrintCpu yields a simpler
Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz (MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX)

Gunther

Thanks to Felipe and Jochen. :thumbsup:

Quote from: felipe on February 03, 2021, 09:47:07 AM
Nice program, thanks Gunther for sharing it  :thup:. It's nice to have you back.  :mrgreen:

I think it could be better. Especially the procedure Iset is too overloaded. I have already fixed this in the new version. In addition, not all AVX-512 extensions are currently queried properly. I'm in the process of fixing that right now.

We need this routine for the fractal compression at CERN. At the moment, it still runs with FPU code. But we have now set up different code paths in the new version. So I have now written everything to be callable from C or C++.
This should always be kept in mind when judging the source. As a pure assembly language application, I would solve some things differently. Of course, all these variables and flags are only needed at runtime to select the
correct code path. I only do the output for the version here in the forum. Maybe this helps the one or the other programmer?

It's pretty intricate. The PC farm at CERN, with over 20 000 computers and more than 30 000 cores, is very heterogeneous. There are historical reasons for this, which I will not go into here.

Quote from: jj2007 on February 03, 2021, 12:21:27 PM
Very nice, Gunther :thumbsup:

For comparison, PrintCpu yields a simpler
Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz (MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX)

As already said above: It still has weaknesses and could be better.

Please wait for the next version.

Gunther
You have to know the facts before you can distort them.

LiaoMi

Hi Gunther,

my results  :thumbsup:

CPU strings:
------------

Processor Vendor String: GenuineIntel
Processor Brand String:  Intel(R)Core(TM)i7-4810MQCPU@2.80GHz

Features by Processor and Operating System:
-------------------------------------------

Supported Instruction Sets: MMX  SSE  SSE2  SSE3  SSSE3  SSE4.1  SSE4.2  AVX  AVX2

Your CPU supports the following additional instructions and features:
---------------------------------------------------------------------

RDRAND             : Returning random numbers from an on-chip hardware random number generator.
AESNI              : Advanced Encryption Standard Instruction Set
VMX                : Virtual Machine Extensions
SMX                : Safer Mode Extensions
FPU                : Floating Point Unit on chip
VME                : Virtual 8086 Mode Enhancements
DE                 : Debugging Extensions. Support for I/O breakpoints.
PSE                : Page Size Extension
TSC                : Time Stamp Counter. The RDTSC instruction is supported.
MSR                : Model Specific Registers RDMSR and WRMSR Instructions.
PAE                : Physical Address Extension
CX8                : CMPXCHG8B instruction (compare-and-exchange 8 bytes) is supported.
APIC               : The processor contains an Advanced Programmable Interrupt Controller (APIC) on board.


TimoVJL

CPU strings:
------------

Processor Vendor String: AuthenticAMD
Processor Brand String:  AMDRyzen53400GwithRadeonVegaGraphics

Features by Processor and Operating System:
-------------------------------------------

Supported Instruction Sets: MMX  SSE  SSE2  SSE3  SSSE3  SSE4.1  SSE4.2  AVX  AVX2

Your CPU supports the following additional instructions and features:
---------------------------------------------------------------------

RDRAND             : Returning random numbers from an on-chip hardware random number generator.
AESNI              : Advanced Encryption Standard Instruction Set
FPU                : Floating Point Unit on chip
VME                : Virtual 8086 Mode Enhancements
DE                 : Debugging Extensions. Support for I/O breakpoints.
PSE                : Page Size Extension
TSC                : Time Stamp Counter. The RDTSC instruction is supported.
MSR                : Model Specific Registers RDMSR and WRMSR Instructions.
PAE                : Physical Address Extension
CX8                : CMPXCHG8B instruction (compare-and-exchange 8 bytes) is supported.
APIC               : The processor contains an Advanced Programmable Interrupt Controller (APIC) on board.
May the source be with you

Gunther

Thanks to LiaoMi and TimoVJL for testing. :thumbsup: It seems to work with AMD processors, too. That's good news.

Gunther
You have to know the facts before you can distort them.

jj2007

Quote from: Gunther on February 03, 2021, 02:13:03 PMThe PC farm at CERN, with over 20 000 computers and more than 30 000 cores, is very heterogeneous. There are historical reasons for this, which I will not go into here.

Quote from: jj2007 on February 03, 2021, 12:21:27 PM
Very nice, Gunther :thumbsup:

For comparison, PrintCpu yields a simpler
Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz (MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX)

As already said above: It still has weaknesses and could be better.

It's working fine :thumbsup:

For testing if an application can run on one of your 20,000 machines, you could write a macro (or a proc for C) like WillRunFine(bitmask) that returns true or false.

Gunther

Jochen,

Quote from: jj2007 on February 03, 2021, 08:56:16 PM
It's working fine :thumbsup:

For testing if an application can run on one of your 20,000 machines, you could write a macro (or a proc for C) like WillRunFine(bitmask) that returns true or false.

probably a function, which can check the needed variables to select the corresponding code path. Another possibility would be Intel's CPU dispatch. But one would need the Intel compiler and the question is: What will the Intel compiler do on an AMD processor?

Gunther
You have to know the facts before you can distort them.

mikeburr

bit late ...but
CPU strings:
------------

Processor Vendor String: GenuineIntel
Processor Brand String:  Intel(R)Xeon(R)CPUX5670@2.93GHz

Features by Processor and Operating System:
-------------------------------------------

Supported Instruction Sets: MMX  SSE  SSE2  SSE3  SSSE3  SSE4.1  SSE4.2

Your CPU supports the following additional instructions and features:
---------------------------------------------------------------------

AESNI              : Advanced Encryption Standard Instruction Set
VMX                : Virtual Machine Extensions
SMX                : Safer Mode Extensions
FPU                : Floating Point Unit on chip
VME                : Virtual 8086 Mode Enhancements
DE                 : Debugging Extensions. Support for I/O breakpoints.
PSE                : Page Size Extension
TSC                : Time Stamp Counter. The RDTSC instruction is supported.
MSR                : Model Specific Registers RDMSR and WRMSR Instructions.
PAE                : Physical Address Extension
CX8                : CMPXCHG8B instruction (compare-and-exchange 8 bytes) is supported.
APIC               : The processor contains an Advanced Programmable Interrupt Controller (APIC) on board.

regards mike