Giter Site home page Giter Site logo

Comments (8)

linnaea avatar linnaea commented on July 22, 2024

I myself can build it under openSUSE Tumbleweed so my hunch is that it's some LLVM weirdness.

I can reproduce this on Leap 15.1 with any LLVM version higher than what the base image offers. Not a clue on where the problem lies.

The current situation with LLVM10 is that beignet can compile and link against it, but would miscompile almost everything thrown at it. That includes the benchmark program used by clpeak.

However given that:

  • Beignet only targets Gen7-9
  • Intel's NEO runtime supports Gen8+ and is a lot better than this mess now (not the case 2 years ago)
  • Gen7 and 7.5 (Ivy Bridge and Haswell) is just trash (there's some design choice and chip errata that require software emulation for basic operations, stuff like Saturated Math Instructions not doing saturation properly, jumps being limited to +/-128KiB, no hardware int64 support of any kind)

I'm increasingly leaning towards just giving up supporting newer LLVM and link this mess statically with LLVM 4 or 3.9 or 3.8 and call it a day.

from beignet.

 avatar commented on July 22, 2024

I am on Braswell (Gen8LP) so I have no choice but to use the deprecated Beignet runtime. Because of the issue with LLVM 8+ (and my Linux distribution uses LLVM/Clang 10), I need to have LLVM and Clang 7 installed to /opt to make Beignet usable.

I have opened a request in intel/compute-runtime in the hope that they will eventually add support for Gen8LP in NEO.

from beignet.

linnaea avatar linnaea commented on July 22, 2024

Should be fixed in ff59e2d, still not usable though.

from beignet.

 avatar commented on July 22, 2024

With this patch, your code seems usable on LLVM 10.
john --format=rar-opencl --test does not crash and hashcatproduces correct result.

from beignet.

linnaea avatar linnaea commented on July 22, 2024

Miscompilation seems to only affect pre-Gen8 devices. Closing for now.

That patch shouldn't be necessary as this branch has implemented emulations for funnel shift intrinsics in 5242a6b.

from beignet.

 avatar commented on July 22, 2024

Is there any plan to support LLVM 11?

FAILED: backend/src/CMakeFiles/gbe.dir/llvm/llvm_sampler_fix.cpp.o 
/usr/bin/c++ -DENABLE_FP64 -DENABLE_OPENCL_20 -DGEN7_SAMPLER_CLAMP_BORDER_WORKAROUND -DLLVM_110 -Dgbe_EXPORTS -I. -I/usr/src/packages/BUILD/beignet/src/beignet -I/usr/src/packages/BUILD/beignet/src/beignet/include -I/usr/include/libdrm -Ibackend -I/usr/src/packages/BUILD/beignet/src/beignet/backend/src/. -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt  -funroll-loops -fstrict-aliasing -msse2 -msse3 -mssse3 -msse4.1 -fPIC -Wall -mfpmath=sse -Wcast-align -Wl,-E -Wno-invalid-offsetof -I/usr/include -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DGBE_DEBUG_MEMORY=0  -DGBE_COMPILER_AVAILABLE=1 -fvisibility=hidden -O2 -DNDEBUG -DGBE_DEBUG=0 -fPIC -std=gnu++14 -MD -MT backend/src/CMakeFiles/gbe.dir/llvm/llvm_sampler_fix.cpp.o -MF backend/src/CMakeFiles/gbe.dir/llvm/llvm_sampler_fix.cpp.o.d -o backend/src/CMakeFiles/gbe.dir/llvm/llvm_sampler_fix.cpp.o -c /usr/src/packages/BUILD/beignet/src/beignet/backend/src/llvm/llvm_sampler_fix.cpp
In file included from /usr/src/packages/BUILD/beignet/src/beignet/backend/src/llvm/llvm_sampler_fix.cpp:24:
/usr/src/packages/BUILD/beignet/src/beignet/backend/src/llvm/llvm_includes.hpp:105:10: fatal error: llvm/IR/CallSite.h: No such file or directory
  105 | #include "llvm/IR/CallSite.h"
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.

from beignet.

linnaea avatar linnaea commented on July 22, 2024

Is there any plan to support LLVM 11?

FAILED: backend/src/CMakeFiles/gbe.dir/llvm/llvm_sampler_fix.cpp.o 
/usr/bin/c++ -DENABLE_FP64 -DENABLE_OPENCL_20 -DGEN7_SAMPLER_CLAMP_BORDER_WORKAROUND -DLLVM_110 -Dgbe_EXPORTS -I. -I/usr/src/packages/BUILD/beignet/src/beignet -I/usr/src/packages/BUILD/beignet/src/beignet/include -I/usr/include/libdrm -Ibackend -I/usr/src/packages/BUILD/beignet/src/beignet/backend/src/. -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt  -funroll-loops -fstrict-aliasing -msse2 -msse3 -mssse3 -msse4.1 -fPIC -Wall -mfpmath=sse -Wcast-align -Wl,-E -Wno-invalid-offsetof -I/usr/include -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DGBE_DEBUG_MEMORY=0  -DGBE_COMPILER_AVAILABLE=1 -fvisibility=hidden -O2 -DNDEBUG -DGBE_DEBUG=0 -fPIC -std=gnu++14 -MD -MT backend/src/CMakeFiles/gbe.dir/llvm/llvm_sampler_fix.cpp.o -MF backend/src/CMakeFiles/gbe.dir/llvm/llvm_sampler_fix.cpp.o.d -o backend/src/CMakeFiles/gbe.dir/llvm/llvm_sampler_fix.cpp.o -c /usr/src/packages/BUILD/beignet/src/beignet/backend/src/llvm/llvm_sampler_fix.cpp
In file included from /usr/src/packages/BUILD/beignet/src/beignet/backend/src/llvm/llvm_sampler_fix.cpp:24:
/usr/src/packages/BUILD/beignet/src/beignet/backend/src/llvm/llvm_includes.hpp:105:10: fatal error: llvm/IR/CallSite.h: No such file or directory
  105 | #include "llvm/IR/CallSite.h"
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.

Stick to LLVM 9 (or even better, 4) if you can, it produces bad code with LLVM 10.

I have since got rid of my Gen7 hardware (went team red) so the most I can do now is to make it compile with LLVM11, but it would probably still produce bad code.

from beignet.

 avatar commented on July 22, 2024

the most I can do now is to make it compile with LLVM11

Yes, please do it if you can. I would like to see if it produces bad code on my Gen8LP hardware.

Intel developers decided that they will not support Gen8LP in NEO, so I am still using your repository for OpenCL.

from beignet.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.