Giter Club home page Giter Club logo

Comments (5)

ptillet avatar ptillet commented on June 23, 2024

Yep, Triton will compile LLVM 11.0 from scratch and link against it. I've been meaning to embed pre-compiled static libraries instead, but ran into some issues. I've compiled Triton successfully on all my linux machines, with GCC 7.5+.

Alternatively, you can also just install the latest wheel. pip install -U --pre triton

from triton.

python152 avatar python152 commented on June 23, 2024

I appreciate the reply. I am having a bit trouble to compile 11.0 from scratch, but I do have binary distribution of 11.0 available. Is there a way I can bypass the download and recompile, and use the existing compiler distribution? Thanks

from triton.

ptillet avatar ptillet commented on June 23, 2024

Replacing llvm-src by pre-compiled static libraries is actually something I've been meaning to do for a while. My current plan is to do it in ~2 weeks. The only solution I can think of would be to hack the CMakeLists.txt so that it links against LLVM without compiling it. As long as the the include_dir is there and the proper libraries are linked against triton, then it should be good

from triton.

python152 avatar python152 commented on June 23, 2024

I made some progress: I was able to compile successfully C++ interface with python module ON, with downloaded llvm 11, the last few snippet is:

[ 96%] Built target LLVMLibDriver
[ 97%] Built target LLVMXRay
[100%] Built target triton
[100%] Built target LLVMHello_exports
[100%] Built target LLVMHello

and I have libtriton.so in triton/build directory. Then, I went to triton/python directory, and hope to build out the python module: python setup.py build, but I ran into bunch of errors, see below:

...
-- Targeting NVPTX
-- Adding Python module
--
-- Configuring done
-- Generating done
...
 71%] Linking CXX static library ../../libLLVMInstrumentation.a
[ 71%] Built target LLVMInstrumentation
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
gmake[2]: *** [/tmp/llvm-release/llvm-build/lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/RewriteStatepointsForGC.cpp.o] Error 4
gmake[2]: *** Waiting for unfinished jobs....
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
gmake[2]: *** [/tmp/llvm-release/llvm-build/lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/StructurizeCFG.cpp.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
gmake[2]: *** [/tmp/llvm-release/llvm-build/lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/SROA.cpp.o] Error 4
c++: internal compiler error: Killed (program cc1plus)

It seems this step (appearing to be building llvm again?) failed at various places, I am not sure how the build process works - if I have C++ interface with python enabled, I imagine it should be relatively straightforward process to get a python extension built, any suggestions? thanks!

Oliver

from triton.

python152 avatar python152 commented on June 23, 2024

Actually, I think I got the errors due to high cpu count and setup.py is trying to use them all, causing severe resource contentions. Once I dial down the count, I am able to have a python build. Thanks again for your help.

from triton.

Related Issues (20)

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.