libmir / mir-glas

[Experimental] LLVM-accelerated Generic Linear Algebra Subprograms
Other
103 stars 10 forks source link

2 x slower with LLVM 4.X - 5.X #18

Open 9il opened 7 years ago

9il commented 7 years ago

LLVM 4.0, avx512f has the same issue as LLVM 4.0, broadwell.

LDC - the LLVM D compiler (1.1.1):
  based on DMD v2.071.2 and LLVM 4.0.0
  built with LDC - the LLVM D compiler (0.17.3)
  Default target: x86_64-apple-darwin16.4.0
  Host CPU: haswell
  http://dlang.org - http://wiki.dlang.org/LDC

vs

LDC - the LLVM D compiler (1.1.1):
  based on DMD v2.071.2 and LLVM 3.9.1
  built with LDC - the LLVM D compiler (1.1.1)
  Default target: x86_64-apple-darwin16.4.0
  Host CPU: haswell
  http://dlang.org - http://wiki.dlang.org/LDC
JohanEngelen commented 7 years ago

Could you spend some time on minimizing this? Thanks!

9il commented 7 years ago

Could you spend some time on minimizing this? Thanks!

Done, please see gists list in the issue.

dnadlinger commented 7 years ago

@9il: What would probably be most useful is to generate the LLVM IR for the kernel function (-output-ll) and post it at bugs.llvm.org together with the assembler listings, possibly CCing some of the people who have worked on x86 codegen before (if you happen to know someone). Am I correct in the assumption that simple is just a manually expanded version of generic?

9il commented 7 years ago

Am I correct in the assumption that simple is just a manually expanded version of generic?

Yes.

9il commented 7 years ago

I have requested account at bugs.llvm.org

dnadlinger commented 7 years ago

Okay, thanks. If there are any issues with the account, I can also make the report for you.

dnadlinger commented 7 years ago

Any update on this? And does LLVM 4.0 only decrease performance on your code or are there improvements as well? We'll have to decide on the compiler to use to ship the pre-built 1.2 binaries soon.

9il commented 7 years ago

Only LLVM 4.0 has no bad AVX512 support. Feel free to update compiler to the LLVM 4.0. GLAS is not completely implemented for BLAS API. I will fill the issue and send link to the LDC gitter

WebDrake commented 6 years ago

Any news on whether v4.0.1 or v5.0.0 fix this?

9il commented 6 years ago

I can not compile LDC with LLVM 5.0 on macos

dnadlinger commented 6 years ago

@9il: See Gitter – you might need to turn off detection of LLD headers explicitly with LLVM 5.0 until this is fixed.

9il commented 6 years ago

Any news on whether v4.0.1 or v5.0.0 fix this?

It is not fixed in v5.0