intel / intel-graphics-compiler

Other
606 stars 158 forks source link

Compilation failure on 1.0.8173 with LLVM12 #191

Closed ArchangeGabriel closed 3 years ago

ArchangeGabriel commented 3 years ago

While I’ve been able to fix most issues w.r.t to compiling with LLVM12, there is one remaining:

/build/intel-graphics-compiler/src/intel-graphics-compiler-igc-1.0.8173/IGC/VectorCompiler/lib/GenXCodeGen/GenXThreadPrivateMemory.cpp: In member function ‘void {anonymous}::StackAnalysis::visitAllocaInst(llvm::AllocaInst&)’:
/build/intel-graphics-compiler/src/intel-graphics-compiler-igc-1.0.8173/IGC/VectorCompiler/lib/GenXCodeGen/GenXThreadPrivateMemory.cpp:143:61: error: conversion from ‘Optional<llvm::TypeSize>’ to non-scalar type ‘Optional<long unsigned int>’ requested                    
  143 |   Optional<uint64_t> AllocaSize = AI.getAllocationSizeInBits(m_DL);
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
ArchangeGabriel commented 3 years ago

(Reverting https://github.com/intel/intel-graphics-compiler/commit/c50d77f3c8a92fae6f43b47580e7d485f9ea5327 allows compilation though)

tjaalton commented 3 years ago

surely you had to revert 32944e60e97f634fe975b9407e1f1d6b6510f93b first?

this is getting ridiculous, I haven't been able to update i-g-c in Debian/Ubuntu since 1.0.5353.1 and we're about to move to LLVM 13 next month.. next step would be to drop the package (and compute runtime) as they're getting useless

ztuowen commented 3 years ago

I've finally got igc and compute-runtime to compile on ArchLinux w. LLVM 12.0.1 based on the PKGBUILD in testing.

I've used the following patches, in this order:

  1. llvm12-porting.patch from arch testing.
  2. 8e1a461d3e6
  3. 42963623ea53f4cd77fc3dc9ca4c099c5f10f456
  4. fd480731ad77213fbfcd9677d03e8243acbb306c

The compute-runtime compiles w. the instructions from the old PKGBUILD w. 21.31.20514. -DCMAKE_CXX_FLAGS="-Wno-error=maybe-uninitialized" is added to cmake configuration.

Not sure if everything is correct, but at least I'm able to run some of my code with it.

eero-t commented 3 years ago

this is getting ridiculous, I haven't been able to update i-g-c in Debian/Ubuntu since 1.0.5353.1 and we're about to move to LLVM 13 next month.. next step would be to drop the package (and compute runtime) as they're getting useless

Latest IGC & compute-runtime releases (from 1-2 week ago) build fine with latest Ubuntu (21.04) default LLVM v11 / opencl-clang etc, so at least they can be updated for 21.04, for better HW support.

Latest IGC release lists LLVM v12 fixes, so maybe it compiles now with that too (I have not tested that myself though)?

Looking at Debian build, it seems to disable VC, but my guess is that there's much less much testing for builds without it, so I think VC should probably be enabled for the new builds...

eero-t commented 3 years ago

Looking at Debian build, it seems to disable VC, but my guess is that there's much less much testing for builds without it, so I think VC should probably be enabled for the new builds...

According to LLVM version support status page: https://github.com/intel/intel-graphics-compiler/projects

VC enabled build fails with LLVM v12, for now they work only with LLVM v11.

tjaalton commented 3 years ago

yeah I didn't bother to package vc-intrinsics at the time, but uploaded it now.. will take some time to get through the NEW queue

pszymich commented 3 years ago

Hello,

We are aware of the problems with building IGC with LLVM >= 11. The LLVM 11 update in IGC has taken longer than expected mainly because we have always planned to provide a high quality build by means of thorough testing. We have just switched to LLVM 11 in the production environment.

With that being said we recognize our current methods are too slow for timely adoption of new LLVM versions. We have already assumed a different approach for LLVM 12 onward. We plan on introducing multiple LLVM versions support with a high quality production version to go along for which we guarantee a certain level of conformance & performance, and several with full build support minimum.

For specific LLVM versions support progress please refer to the newly created trackers here, as @eero-t mentioned: https://github.com/intel/intel-graphics-compiler/projects.

The original problem that @ArchangeGabriel reported has been fixed in commit https://github.com/intel/intel-graphics-compiler/commit/f5385b3899705929f2fdf32b6ba57763f6067f26, so I'm going to close this issue.

Thank you!