New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intel Kaby Lake (7th Gen)? #29

Closed
hexvalid opened this Issue Jan 21, 2018 · 13 comments

Comments

Projects
None yet
3 participants
@hexvalid

hexvalid commented Jan 21, 2018

Which march param should I use?

My CPU:

Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  2
Core(s) per socket:  2
Socket(s):           1
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               142
Model name:          Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
Stepping:            9
CPU MHz:             800.011
CPU max MHz:         3500.0000
CPU min MHz:         400.0000
BogoMIPS:            5810.00
Virtualization:      VT-x
L1d cache:           32K
L1i cache:           32K
L2 cache:            256K
L3 cache:            4096K
NUMA node0 CPU(s):   0-3
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp
@graysky2

This comment has been minimized.

Show comment
Hide comment
@graysky2

graysky2 Jan 21, 2018

Owner

Ask gcc:

gcc -c -Q -march=native --help=target | grep march

Dunno if they have a subarch for KL yet. You can also just run with the native option but again, you're relying on the compiler to have KL support.

Owner

graysky2 commented Jan 21, 2018

Ask gcc:

gcc -c -Q -march=native --help=target | grep march

Dunno if they have a subarch for KL yet. You can also just run with the native option but again, you're relying on the compiler to have KL support.

@hexvalid

This comment has been minimized.

Show comment
Hide comment
@hexvalid

hexvalid Jan 21, 2018

I'am using lastest GCC (7.2.1 20171224).
And, GCC says:

gcc -c -Q -march=native --help=target | grep march
  -march=                     		broadwell

Is my cpu 'broadwell'? There must be mistake here.

hexvalid commented Jan 21, 2018

I'am using lastest GCC (7.2.1 20171224).
And, GCC says:

gcc -c -Q -march=native --help=target | grep march
  -march=                     		broadwell

Is my cpu 'broadwell'? There must be mistake here.

@graysky2

This comment has been minimized.

Show comment
Hide comment
@graysky2

graysky2 Jan 21, 2018

Owner

Yes, I have seen this in the past where the subarch is newer than the support in the compiler. To my knowledge, 7th gen-specific support is not yet in gcc. Perhaps with the 8.0 release? Best advice is to try generic and to try broadwell and see via benchmarking.

Owner

graysky2 commented Jan 21, 2018

Yes, I have seen this in the past where the subarch is newer than the support in the compiler. To my knowledge, 7th gen-specific support is not yet in gcc. Perhaps with the 8.0 release? Best advice is to try generic and to try broadwell and see via benchmarking.

@hexvalid

This comment has been minimized.

Show comment
Hide comment
@hexvalid

hexvalid Jan 21, 2018

Hmm
Which benchmark method would you prefer to compare march optimization?

hexvalid commented Jan 21, 2018

Hmm
Which benchmark method would you prefer to compare march optimization?

@graysky2

This comment has been minimized.

Show comment
Hide comment
@graysky2

graysky2 Jan 21, 2018

Owner

I do a lot of compiling so I tend to use that.
https://github.com/graysky2/bin/blob/master/bench

Owner

graysky2 commented Jan 21, 2018

I do a lot of compiling so I tend to use that.
https://github.com/graysky2/bin/blob/master/bench

@hexvalid

This comment has been minimized.

Show comment
Hide comment
@hexvalid

hexvalid Jan 21, 2018

Thank you for your help. I will try benchmark

hexvalid commented Jan 21, 2018

Thank you for your help. I will try benchmark

@mbartosi

This comment has been minimized.

Show comment
Hide comment
@mbartosi

mbartosi Jan 23, 2018

Kaby Lake is essentialy the same as Skylake:
Kaby Lake will use the same basic execution pipeline as Skylake before it, and the guts of its Gen9 integrated graphics processor are also basically identical to what arrived with Skylake (https://techreport.com/review/30587/intel-kaby-lake-cpus-revealed)

mbartosi commented Jan 23, 2018

Kaby Lake is essentialy the same as Skylake:
Kaby Lake will use the same basic execution pipeline as Skylake before it, and the guts of its Gen9 integrated graphics processor are also basically identical to what arrived with Skylake (https://techreport.com/review/30587/intel-kaby-lake-cpus-revealed)

@graysky2

This comment has been minimized.

Show comment
Hide comment
@graysky2

graysky2 Jan 23, 2018

Owner

@mbartosi - If that is true why is gcc returning broadwell? Unrelated?

Owner

graysky2 commented Jan 23, 2018

@mbartosi - If that is true why is gcc returning broadwell? Unrelated?

@mbartosi

This comment has been minimized.

Show comment
Hide comment
@mbartosi

mbartosi Jan 24, 2018

There are patches for gcc that fix this problem:
https://patchwork.ozlabs.org/patch/777208/

"Currently -march=native selects -march=broadwell on Kaby Lake systems, since its model numbers are missing from the switch statement. It falls back to the default case and chooses -march=broadwell because of the presence of the ADX instruction set."

mbartosi commented Jan 24, 2018

There are patches for gcc that fix this problem:
https://patchwork.ozlabs.org/patch/777208/

"Currently -march=native selects -march=broadwell on Kaby Lake systems, since its model numbers are missing from the switch statement. It falls back to the default case and chooses -march=broadwell because of the presence of the ADX instruction set."

@hexvalid

This comment has been minimized.

Show comment
Hide comment
@hexvalid

hexvalid Jan 24, 2018

So its GCC's bug. I hope that this patch will be merged soon....

hexvalid commented Jan 24, 2018

So its GCC's bug. I hope that this patch will be merged soon....

@graysky2

This comment has been minimized.

Show comment
Hide comment
@graysky2

graysky2 Jan 24, 2018

Owner

Thanks for the link @mbartosi.
@hexvalid - Try the skylake option. Closing.

Owner

graysky2 commented Jan 24, 2018

Thanks for the link @mbartosi.
@hexvalid - Try the skylake option. Closing.

@graysky2 graysky2 closed this Jan 24, 2018

@hexvalid

This comment has been minimized.

Show comment
Hide comment
@hexvalid

hexvalid May 21, 2018

Guys, gcc patch is merged and fixed.
Now, on GCC 8.1.0:

gcc -c -Q -march=native --help=target | grep march
  -march=                               skylake

💃

hexvalid commented May 21, 2018

Guys, gcc patch is merged and fixed.
Now, on GCC 8.1.0:

gcc -c -Q -march=native --help=target | grep march
  -march=                               skylake

💃

@graysky2

This comment has been minimized.

Show comment
Hide comment
@graysky2

graysky2 May 21, 2018

Owner

@hexvalid - Not sure why you're posting. Are you just confirming that gcc 8.1.0 gets it right? There isn't a march specific option for the 7th gen chips as far as I see in the docs.

Owner

graysky2 commented May 21, 2018

@hexvalid - Not sure why you're posting. Are you just confirming that gcc 8.1.0 gets it right? There isn't a march specific option for the 7th gen chips as far as I see in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment