Closed JonathanSalwan closed 1 year ago
@cnheitman, I think there were a bug around cmake_args
on Linux. Commit 450a345fca636402a2c4b5149f78e8434a4e79fb fixes it (before that, cmake_args
already defined were not taken into account). However, with this patch there is another issue when calling copy_file
. The commit 404484112f6003ef7375b1d6287b431658424a17 fixes it but I do not know if it breaks something else. Is defining CMAKE_LIBRARY_OUTPUT_DIRECTORY
important?
Hey @JonathanSalwan o/
Nice!
Indeed, there was a bug there '^^. I just built the .whl
for both Ubuntu and Windows and it works fine. Replying to your question, no, CMAKE_LIBRARY_OUTPUT_DIRECTORY
does not seem necessary, so let's remove it.
An update on the Bitwuzla support. I tried building it on Windows and I ran into some issue (bitwuzla/bitwuzla/issues/30). To summarize, they are updating the Windows build (code and doc) and it'll be ready in a week or two. I'll work on it again once it's ready. (Btw, I have already built Bitwuzla statically on Linux I'll add it to the python.yml
when I have the Windows part working so we generate .whl
supporting the same libraries on both OSs.)
I've cleaned up CI files. There were duplicates of jobs over different files. Now there is only one linux.yml
file that supports wide-integer as a matrix and enables LLVM + Bitwuzla. Thus, I've removed the files: llvm.yml
, bitwuzla.yml
and wide-integer.yml
. I've also renamed cmake.yml
to vcpkg.yml
which is more explicit.
Linux and Windows artifacts for different Python versions have been generated with success.
Awesome @JonathanSalwan :D I'll add support for Bitwuzla in Linux later today.
\o/. I will try to add macOS tomorrow.
Artifacts for macOS are ok
LLVM static support for Linux and macOS is ok. For Windows we have to hack here and there.
m1 chip,macOS 12.4, python3.10.5 arm64 version,it can be compiled successfully, but the following error occurs when using it
Python 3.10.5 | packaged by conda-forge | (main, Jun 14 2022, 07:07:06) [Clang 13.0.1 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import triton
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
SystemError: initialization of triton did not return an extension module
How did you build it exactly? What interfaces did you turn on?
I think this might be some problems for the python installed in miniconda? I compiled and installed it successfully with the system's python, and I don't know why.
Here is the cmds:
git clone https://github.com/JonathanSalwan/Triton
cd Triton
mkdir build ; cd build
cmake .. -DCMAKE_INSTALL_PREFIX="$PREFIX" \
-DCMAKE_C_COMPILER=gcc-12 \
-DCMAKE_CXX_COMPILER=g++-12 \
-DBOOST_ROOT=$(brew --prefix boost) \
-DPYTHON_LIBRARY=/Users/$USER/mambaforge/lib/libpython3.10.dylib \
-DPYTHON_INCLUDE_DIR=/Users/$USER/mambaforge/include/python3.10
make -j8
cd ..
python -m build --wheel
cd dist
pip install triton_library-1.0.0rc1-cp310-cp310-macosx_12_0_arm64.whl --user
This command will have the above problem in python installed by conda, but works well in python with Xcode version
First, you don't need to run cmake
by your own for building the whl
package, python -m build --wheel
take care of that. So, you only need to type:
git clone https://github.com/JonathanSalwan/Triton
cd Triton
python -m build --wheel
cd dist
pip install triton_library-1.0.0rc1-cp310-cp310-macosx_12_0_arm64.whl --user
I think the problem might be related to the python library that is being linked to triton. Can you send me the output of python -m build --wheel
(at some point it runs cmake
which prints information about which python lib is using).
In fact, when I don't run CMake, I get a bunch of errors. Sorry, I uninstalled the miniconda environment, and now the python installed from brew runs very well, do you need the arm64 wheel? I uploaded it belo triton_library-1.0.0rc1-cp39-cp39-macosx_12_0_arm64.whl.zip w
Hey! An update on this issue.
whl
package all the libs it needs to run on its own. I haven't tested it yet but it should be working fine.whl
all the libs it needs to run on its own. There are two pending issues to solve. First, I have this script working locally. I haven't added it to the CI yet (building Bitwuzla is complex and adding it to the CI is not straightforward). Second, I'm still working on adding LLVM support. I have disabled the CI for Windows for now. I tested the package I have so far (Z3 + Bitwuzla) and it's working fine.Btw, I'll do a PR with these changes once the CI on my fork finish running.
Hey o/ Another update.
whl
package successfully. Now, the windows version of the package have support for Z3, Bitwuzla and LLVM. For now, I will build the package locally (that is, I will not add it to CI). The reason for this is: 1) Bitwuzla is complex to build on Windows, and 2) the only way to add LLVM support was to building it from scratch, which requires a lot of cpu time and disk. That being say, the package is already on PyPI and working for Python 3.8, 3.9 and 3.10 (same for the Linux one).You rockz @cnheitman !
Last update on this issue.
pip install triton-libray
.
This refers to #1144.
Pending tasks
Artifacts on Linux with all Python versionsArtifacts on Windows with all Python versionsArtifacts on macOS with all Python versionsSupporting Triton's InterfacesAny help on the following will be much appreciated! :
Building the
.whl
by defaultBuilding the
.whl
with a specific interfaceBy default, interfaces are defined as:
On
Off
Off
Off
Installing the package with pip