Skip to content

Commit

Permalink
python-3.10.10-1: install triton from source
Browse files Browse the repository at this point in the history
add patch for cmake
fix #234
  • Loading branch information
david committed May 2, 2023
1 parent 66ba217 commit ae84bce
Showing 1 changed file with 44 additions and 2 deletions.
46 changes: 44 additions & 2 deletions python-3.10.10-1.build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -439,12 +439,27 @@ for PKG in $PACKAGES; do
install $PKG
done

install pyopengl # Tk binding creates an error, so remove it (Expects Tk Togl installation...)
rm -rf ${PREFIX}/lib/python$PYTHONVER/site-packages/OpenGL/Tk
(
TRITON_VERSION=2.0.0
#triton 2.0.0 hat cmake als install dep, ist in 2.1.0 gefixt

# orig: https://github.com/openai/triton/archive/refs/tags/v2.0.0.tar.gz
BEEHIVE=https://beehive.molgen.mpg.de/56b46016609039fac839f8297c88454c/triton-2.0.0.tar.gz
test -e triton-${TRITON_VERSION}.tar.gz || wget -nv $BEEHIVE
test -d triton-${TRITON_VERSION} || tar -xf triton-${TRITON_VERSION}.tar.gz
cd triton-${TRITON_VERSION}/python
sed -ne '/^#Epatch:triton/ s/^#Epatch:\S* // p' $ME | patch -p1 --verbose
pip install . --prefix=$PREFIX

piplist; track triton==2.0.0
)

# torch bundled with a recent CUDA-Toolkit
install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu118

install pyopengl # Tk binding creates an error, so remove it (Expects Tk Togl installation...)
rm -rf ${PREFIX}/lib/python$PYTHONVER/site-packages/OpenGL/Tk

# install helen after our torch, otherwise we might catch the default torch from pip ...
install helen # HD, a dependency from a request by helene

Expand Down Expand Up @@ -763,4 +778,31 @@ exit
#Epatch:gyp2 # variables dict (making |variables| a varaibles sub-dict of a
#Epatch:gyp2 # variables dict), use the_dict's definition.

#Epatch:triton diff --git a/setup.py b/setup.py
#Epatch:triton index 2ac3accd2..e7357be58 100644
#Epatch:triton --- a/setup.py
#Epatch:triton +++ b/setup.py
#Epatch:triton @@ -211,10 +211,8 @@ setup(
#Epatch:triton long_description="",
#Epatch:triton packages=["triton", "triton/_C", "triton/language", "triton/tools", "triton/impl", "triton/ops", "triton/runtime", "triton/ops/blocksparse"],
#Epatch:triton install_requires=[
#Epatch:triton - "cmake",
#Epatch:triton "filelock",
#Epatch:triton "torch",
#Epatch:triton - "lit",
#Epatch:triton ],
#Epatch:triton package_data={"triton": ["third_party/**/*"]},
#Epatch:triton include_package_data=True,
#Epatch:triton @@ -233,6 +231,10 @@ setup(
#Epatch:triton ],
#Epatch:triton test_suite="tests",
#Epatch:triton extras_require={
#Epatch:triton + "build": [
#Epatch:triton + "cmake>=3.18",
#Epatch:triton + "lit",
#Epatch:triton + ],
#Epatch:triton "tests": [
#Epatch:triton "autopep8",
#Epatch:triton "flake8",

# -------------------------------------------------------- This is the end.

0 comments on commit ae84bce

Please sign in to comment.