[Bug target/86393] GCC-8 appears to not detect AVX512 on iMac Pro 2018

2019-09-05 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86393

Iain Sandoe  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #13 from Iain Sandoe  ---
(In reply to Mikael Slevinsky from comment #12)
> It is fixed for all GCC versions I checked: all the up-to-date versions of
> 4.9, 5, 6, 7, 8, 9 from Homebrew.

Thanks,,, closing as fixed.

[Bug target/86393] GCC-8 appears to not detect AVX512 on iMac Pro 2018

2019-09-05 Thread mrslevinsky at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86393

--- Comment #12 from Mikael Slevinsky  ---
It is fixed for all GCC versions I checked: all the up-to-date versions of 4.9,
5, 6, 7, 8, 9 from Homebrew.

Also, I recently updated from High Sierra to Mojave, and the new clang is:

scima-mh421-20:FastTransforms mikael$ clang --version
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

(In reply to Iain Sandoe from comment #11)
> (In reply to Mikael Slevinsky from comment #10)
> > I can confirm this is fixed, thank you!
> 
> Great, for which GCC versions is it fixed?
> 
> > P.S. the exact processor type is a Xeon(R) W-2191B CPU @ 2.30GHz.
> 
> thanks

[Bug target/86393] GCC-8 appears to not detect AVX512 on iMac Pro 2018

2019-09-04 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86393

--- Comment #11 from Iain Sandoe  ---
(In reply to Mikael Slevinsky from comment #10)
> I can confirm this is fixed, thank you!

Great, for which GCC versions is it fixed?

> P.S. the exact processor type is a Xeon(R) W-2191B CPU @ 2.30GHz.

thanks

[Bug target/86393] GCC-8 appears to not detect AVX512 on iMac Pro 2018

2019-09-04 Thread mrslevinsky at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86393

--- Comment #10 from Mikael Slevinsky  ---
I can confirm this is fixed, thank you!

P.S. the exact processor type is a Xeon(R) W-2191B CPU @ 2.30GHz.

scima-mh421-20:Desktop mikael$ sysctl -a |grep cpu
hw.ncpu: 36
hw.activecpu: 36
hw.physicalcpu: 18
hw.physicalcpu_max: 18
hw.logicalcpu: 36
hw.logicalcpu_max: 36
hw.cputype: 7
hw.cpusubtype: 8
hw.cpu64bit_capable: 1
hw.cpufamily: 939270559
hw.cpufrequency: 23
hw.cpufrequency_min: 23
hw.cpufrequency_max: 23
hw.cputhreadtype: 1
machdep.cpu.max_basic: 22
machdep.cpu.max_ext: 2147483656
machdep.cpu.vendor: GenuineIntel
machdep.cpu.brand_string: Intel(R) Xeon(R) W-2191B CPU @ 2.30GHz
machdep.cpu.family: 6
machdep.cpu.model: 85
machdep.cpu.extmodel: 5
machdep.cpu.extfamily: 0
machdep.cpu.stepping: 4
machdep.cpu.feature_bits: 9223086162756500479
machdep.cpu.leaf7_feature_bits: 3550478331
machdep.cpu.extfeature_bits: 1241984796928
machdep.cpu.signature: 329300
machdep.cpu.brand: 0
machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA
CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ
DTES64 MON DSCPL VMX SMX EST TM2 SSSE3 FMA CX16 TPR PDCM SSE4.1 SSE4.2 x2APIC
MOVBE POPCNT AES PCID XSAVE OSXSAVE SEGLIM64 TSCTMR AVX1.0 RDRAND F16C
machdep.cpu.leaf7_features: SMEP ERMS RDWRFSGS TSC_THREAD_OFFSET BMI1 HLE AVX2
BMI2 INVPCID RTM SMAP RDSEED ADX IPT AVX512F AVX512CD AVX512DQ AVX512BW
AVX512VL PQM FPU_CSDS MPX PQE CLFSOPT
machdep.cpu.extfeatures: SYSCALL XD 1GBPAGE EM64T LAHF LZCNT PREFETCHW RDTSCP
TSCI
machdep.cpu.logical_per_package: 64
machdep.cpu.cores_per_package: 32
machdep.cpu.microcode_version: 33554526
machdep.cpu.processor_flag: 1
machdep.cpu.mwait.linesize_min: 64
machdep.cpu.mwait.linesize_max: 64
machdep.cpu.mwait.extensions: 3
machdep.cpu.mwait.sub_Cstates: 8224
machdep.cpu.thermal.sensor: 1
machdep.cpu.thermal.dynamic_acceleration: 1
machdep.cpu.thermal.invariant_APIC_timer: 1
machdep.cpu.thermal.thresholds: 2
machdep.cpu.thermal.ACNT_MCNT: 1
machdep.cpu.thermal.core_power_limits: 1
machdep.cpu.thermal.fine_grain_clock_mod: 1
machdep.cpu.thermal.package_thermal_intr: 1
machdep.cpu.thermal.hardware_feedback: 0
machdep.cpu.thermal.energy_policy: 1
machdep.cpu.xsave.extended_state: 255 2688 2688 0
machdep.cpu.xsave.extended_state1: 15 2432 256 0
machdep.cpu.arch_perf.version: 4
machdep.cpu.arch_perf.number: 4
machdep.cpu.arch_perf.width: 48
machdep.cpu.arch_perf.events_number: 7
machdep.cpu.arch_perf.events: 0
machdep.cpu.arch_perf.fixed_number: 3
machdep.cpu.arch_perf.fixed_width: 48
machdep.cpu.cache.linesize: 64
machdep.cpu.cache.L2_associativity: 16
machdep.cpu.cache.size: 256
machdep.cpu.tlb.inst.large: 8
machdep.cpu.tlb.data.small: 64
machdep.cpu.tlb.data.small_level1: 64
machdep.cpu.address_bits.physical: 46
machdep.cpu.address_bits.virtual: 48
machdep.cpu.core_count: 18
machdep.cpu.thread_count: 36
machdep.cpu.tsc_ccc.numerator: 192
machdep.cpu.tsc_ccc.denominator: 2
machdep.xcpm.cpu_thermal_level: 0

[Bug target/86393] GCC-8 appears to not detect AVX512 on iMac Pro 2018

2019-09-03 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86393

--- Comment #9 from Iain Sandoe  ---
does this problem still exist?

Please can you give me the exact processor type?

in terminal:
sysctl -a |grep cpu 

and find the actual intel part number.

===

It looks to me like there could be a misinterpretation of clang's output...
features can be removed (-) or added (+x).

[Bug target/86393] GCC-8 appears to not detect AVX512 on iMac Pro 2018

2018-12-06 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86393

Eric Gallager  changed:

   What|Removed |Added

 CC||iains at gcc dot gnu.org
   See Also||https://bugs.llvm.org/show_
   ||bug.cgi?id=36202

--- Comment #8 from Eric Gallager  ---
(In reply to MCCCS from comment #7)
> The problem was that the LLVM assembler required -mavx512f. I've researched
> it and found that this LLVM bug was fixed months and shipped with LLVM 7.
> Apple updates Xcode's LLVM with one year delay, and it should be fixed the
> next year with 10.15.
> 
> To sum up: this is llvm 6 bug
> 
> https://bugs.llvm.org/show_bug.cgi?id=36202
> https://llvm.org/viewvc/llvm-project?view=revision=324106

It still might be worth handling this on the GCC end in the meantime though.

[Bug target/86393] GCC-8 appears to not detect AVX512 on iMac Pro 2018

2018-12-06 Thread mcccs at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86393

--- Comment #7 from MCCCS  ---
The problem was that the LLVM assembler required -mavx512f. I've researched it
and found that this LLVM bug was fixed months and shipped with LLVM 7. Apple
updates Xcode's LLVM with one year delay, and it should be fixed the next year
with 10.15.

To sum up: this is llvm 6 bug

https://bugs.llvm.org/show_bug.cgi?id=36202
https://llvm.org/viewvc/llvm-project?view=revision=324106

[Bug target/86393] GCC-8 appears to not detect AVX512 on iMac Pro 2018

2018-12-05 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86393

Eric Gallager  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-12-05
 CC||egallager at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #6 from Eric Gallager  ---
(In reply to MCCCS from comment #5)
> *** Bug 88353 has been marked as a duplicate of this bug. ***

Taking the dup as confirmation.

[Bug target/86393] GCC-8 appears to not detect AVX512 on iMac Pro 2018

2018-12-05 Thread mcccs at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86393

MCCCS  changed:

   What|Removed |Added

 CC||mcccs at gmx dot com

--- Comment #5 from MCCCS  ---
*** Bug 88353 has been marked as a duplicate of this bug. ***

[Bug target/86393] GCC-8 appears to not detect AVX512 on iMac Pro 2018

2018-07-03 Thread mrslevinsky at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86393

--- Comment #4 from Mikael Slevinsky  ---
I'm not sure if this answers your question, but compiling the same program
(modifying 8 to 128 to tease the compiler into using zmm registers) with
clang-6 works fine.

[Bug target/86393] GCC-8 appears to not detect AVX512 on iMac Pro 2018

2018-07-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86393

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek  ---
(In reply to Mikael Slevinsky from comment #2)
> If I call it `testavx512.c`, then AVX512-like assembly is created, but it
> errors when trying to create an executable:
> 
> dhcp-10-45-0-78:FastTransforms mikael$ gcc-8 -S -O3 -mavx512f testavx512.c
> -o testavx512.s
> dhcp-10-45-0-78:FastTransforms mikael$ gcc-8 -O3 -mavx512f testavx512.c -o
> testavx512
> /var/folders/dy/wbvgp8656tg6kwtz8sx_9z_mgn/T//cchgQrNi.s:45:2: error:
> instruction requires: AVX-512 ISA
> vmovupd 0(%r13), %zmm0
> ^
> /var/folders/dy/wbvgp8656tg6kwtz8sx_9z_mgn/T//cchgQrNi.s:46:2: error:
> instruction requires: AVX-512 ISA
> vaddpd  (%r12), %zmm0, %zmm0
> ^
> /var/folders/dy/wbvgp8656tg6kwtz8sx_9z_mgn/T//cchgQrNi.s:47:2: error:
> instruction requires: AVX-512 ISA
> vmovupd %zmm0, (%rax)
> ^

Does your assembler support AVX512F at all?  And if it does, does it require
some magic options to be passed to the assembler so that it is supported?
Usually on x86_64 assemblers accept all ISAs by default without special magic
options, but perhaps the assembler on darwin violates this.

[Bug target/86393] GCC-8 appears to not detect AVX512 on iMac Pro 2018

2018-07-03 Thread mrslevinsky at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86393

--- Comment #2 from Mikael Slevinsky  ---
I'm not so sure. Consider the following minimal test file:

#include 
#include 

int main(void) {
double * X, * Y, * Z;
X = (double *) calloc(8, sizeof(double));
Y = (double *) calloc(8, sizeof(double));
Z = (double *) calloc(8, sizeof(double));

for (int i = 0; i < 8; i++) {
X[i] = (double) i;
Y[i] = ((double) i)*((double) 2*i+1);
}

for (int i = 0; i < 8; i++)
Z[i] = X[i] + Y[i];

printf("\n");
for (int i = 0; i < 8; i++) {
printf("%1.2e  ", Z[i]);
}
printf("\n");

return 0;
}


If I call it `testavx512.c`, then AVX512-like assembly is created, but it
errors when trying to create an executable:

dhcp-10-45-0-78:FastTransforms mikael$ gcc-8 -S -O3 -mavx512f testavx512.c -o
testavx512.s
dhcp-10-45-0-78:FastTransforms mikael$ gcc-8 -O3 -mavx512f testavx512.c -o
testavx512
/var/folders/dy/wbvgp8656tg6kwtz8sx_9z_mgn/T//cchgQrNi.s:45:2: error:
instruction requires: AVX-512 ISA
vmovupd 0(%r13), %zmm0
^
/var/folders/dy/wbvgp8656tg6kwtz8sx_9z_mgn/T//cchgQrNi.s:46:2: error:
instruction requires: AVX-512 ISA
vaddpd  (%r12), %zmm0, %zmm0
^
/var/folders/dy/wbvgp8656tg6kwtz8sx_9z_mgn/T//cchgQrNi.s:47:2: error:
instruction requires: AVX-512 ISA
vmovupd %zmm0, (%rax)
^

[Bug target/86393] GCC-8 appears to not detect AVX512 on iMac Pro 2018

2018-07-03 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86393

Jonathan Wakely  changed:

   What|Removed |Added

 Target||x86_64-*-*
  Component|c   |target

--- Comment #1 from Jonathan Wakely  ---
I think GCC correctly detects that your CPU supports AVX512 (see the -mtune
option it chooses) but those instructions don't always result in faster code,
so I think you need to enable them explicitly.