add xformers to prebuilts

This commit is contained in:
Mathieu Broillet 2024-10-05 12:11:19 +02:00
parent 6450001541
commit e79bd5f9a7
Signed by: mathieu
GPG Key ID: A08E484FE95074C1
2 changed files with 23 additions and 2 deletions

View File

@ -59,6 +59,12 @@ jobs:
mkdir -p /tmp/llama-cpp-python/ mkdir -p /tmp/llama-cpp-python/
docker cp prebuilt-container:/tmp/llama-cpp-python/dist/ /tmp/llama-cpp-python/ docker cp prebuilt-container:/tmp/llama-cpp-python/dist/ /tmp/llama-cpp-python/
# Step 6: Copy xformers wheel artifact to host
- name: Copy xformers wheel to host
run: |
mkdir -p /tmp/xformers/
docker cp prebuilt-container:/tmp/xformers/dist/ /tmp/xformers/
# Step 7: Upload bitsandbytes wheel artifact # Step 7: Upload bitsandbytes wheel artifact
- name: Upload bitsandbytes wheel - name: Upload bitsandbytes wheel
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
@ -73,7 +79,14 @@ jobs:
name: llama-cpp-python-wheels name: llama-cpp-python-wheels
path: /tmp/llama-cpp-python/dist/*.whl path: /tmp/llama-cpp-python/dist/*.whl
# Step 9: Cleanup Docker container # Step 9: Upload xformers wheel artifact
- name: Upload xformers wheel
uses: actions/upload-artifact@v4
with:
name: xformers-wheels
path: /tmp/xformers/dist/*.whl
# Step 10: Cleanup Docker container
- name: Cleanup - name: Cleanup
run: | run: |
docker rm prebuilt-container docker rm prebuilt-container

View File

@ -16,3 +16,11 @@ python3.10 setup.py bdist_wheel --universal
git clone --recurse-submodules https://github.com/abetlen/llama-cpp-python.git /tmp/llama-cpp-python git clone --recurse-submodules https://github.com/abetlen/llama-cpp-python.git /tmp/llama-cpp-python
cd /tmp/llama-cpp-python cd /tmp/llama-cpp-python
CMAKE_ARGS="-D GGML_HIPBLAS=on -D AMDGPU_TARGETS=${GPU_TARGETS}" FORCE_CMAKE=1 python3.10 -m build --wheel CMAKE_ARGS="-D GGML_HIPBLAS=on -D AMDGPU_TARGETS=${GPU_TARGETS}" FORCE_CMAKE=1 python3.10 -m build --wheel
# ROCM xformers
## Clone repo and install python requirements
pip3 install ninja
git clone --depth 1 https://github.com/facebookresearch/xformers.git /tmp/xformers
cd /tmp/xformers
python3.10 setup.py bdist_wheel --universal