Hotfixing `make install`. (#2008)
# What does this PR do? Fixes initial and subsequent installs (protection for folder creation should only be for git commit, checking out correct commit should be on both. <!-- Congratulations! You've made it this far! You're not quite done yet though. Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution. Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change. Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost. --> <!-- Remove if not applicable --> Fixes # (issue) ## Before submitting - [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests), Pull Request section? - [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [ ] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [ ] Did you write any new necessary tests? ## Who can review? Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR. <!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @ @OlivierDehaene OR @Narsil -->
This commit is contained in:
parent
8390e251d9
commit
824edf28d7
|
@ -3,12 +3,10 @@ flash_att_commit := 3a9bfd076f98746c73362328958dbc68d145fbec
|
||||||
build-flash-attention:
|
build-flash-attention:
|
||||||
if [ ! -d 'flash-attention' ]; then \
|
if [ ! -d 'flash-attention' ]; then \
|
||||||
pip install -U packaging ninja --no-cache-dir && \
|
pip install -U packaging ninja --no-cache-dir && \
|
||||||
git clone https://github.com/HazyResearch/flash-attention.git && \
|
git clone https://github.com/HazyResearch/flash-attention.git; \
|
||||||
cd flash-attention && git fetch && git checkout $(flash_att_commit) && \
|
|
||||||
MAX_JOBS=8 python setup.py build && cd csrc/layer_norm && python setup.py build && cd ../rotary && python setup.py build; \
|
|
||||||
fi
|
fi
|
||||||
|
cd flash-attention && git fetch && git checkout $(flash_att_commit) && \
|
||||||
|
MAX_JOBS=8 python setup.py build && cd csrc/layer_norm && python setup.py build && cd ../rotary && python setup.py build
|
||||||
|
|
||||||
install-flash-attention: build-flash-attention
|
install-flash-attention: build-flash-attention
|
||||||
if [ ! -d 'flash-attention' ]; then \
|
cd flash-attention && git checkout $(flash_att_commit) && MAX_JOBS=8 python setup.py install && cd csrc/layer_norm && python setup.py install && cd ../rotary && python setup.py install
|
||||||
cd flash-attntion && python setup.py install && cd csrc/layer_norm && python setup.py install && cd ../rotary && python setup.py install; \
|
|
||||||
fi
|
|
||||||
|
|
|
@ -5,9 +5,8 @@ build-flash-attention-v2-cuda:
|
||||||
pip install -U packaging wheel
|
pip install -U packaging wheel
|
||||||
pip install flash-attn==$(flash_att_v2_commit_cuda)
|
pip install flash-attn==$(flash_att_v2_commit_cuda)
|
||||||
|
|
||||||
install-flash-attention-v2-cuda:
|
install-flash-attention-v2-cuda: build-flash-attention-v2-cuda
|
||||||
pip install -U packaging wheel
|
echo "Flash v2 installed"
|
||||||
pip install flash-attn==$(flash_att_v2_commit_cuda)
|
|
||||||
|
|
||||||
build-flash-attention-v2-rocm:
|
build-flash-attention-v2-rocm:
|
||||||
if [ ! -d 'flash-attention-v2' ]; then \
|
if [ ! -d 'flash-attention-v2' ]; then \
|
||||||
|
@ -18,7 +17,5 @@ build-flash-attention-v2-rocm:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
install-flash-attention-v2-rocm: build-flash-attention-v2-rocm
|
install-flash-attention-v2-rocm: build-flash-attention-v2-rocm
|
||||||
if [ ! -d 'flash-attention-v2' ]; then \
|
cd flash-attention-v2 && \
|
||||||
cd flash-attention-v2 && \
|
GPU_ARCHS="gfx90a;gfx942" PYTORCH_ROCM_ARCH="gfx90a;gfx942" python setup.py install
|
||||||
GPU_ARCHS="gfx90a;gfx942" PYTORCH_ROCM_ARCH="gfx90a;gfx942" python setup.py install; \
|
|
||||||
fi
|
|
||||||
|
|
|
@ -1,26 +1,23 @@
|
||||||
|
commit_cuda := b5dfc61db88a81069e45b44f7cc99bd9e62a60fa
|
||||||
|
commit_rocm := ca6913b3c2ffacdcb7d15e914dc34adbc6c89479
|
||||||
build-vllm-cuda:
|
build-vllm-cuda:
|
||||||
if [ ! -d 'vllm' ]; then \
|
if [ ! -d 'vllm' ]; then \
|
||||||
pip install -U ninja packaging --no-cache-dir && \
|
pip install -U ninja packaging --no-cache-dir && \
|
||||||
git clone https://github.com/Narsil/vllm.git vllm &&\
|
git clone https://github.com/Narsil/vllm.git vllm; \
|
||||||
cd vllm && \
|
|
||||||
git fetch && git checkout b5dfc61db88a81069e45b44f7cc99bd9e62a60fa &&\
|
|
||||||
python setup.py build; \
|
|
||||||
fi
|
fi
|
||||||
|
cd vllm && git fetch && git checkout $(commit_cuda) && python setup.py build
|
||||||
|
|
||||||
install-vllm-cuda: build-vllm-cuda
|
install-vllm-cuda: build-vllm-cuda
|
||||||
if [ ! -d 'vllm' ]; then \
|
cd vllm && git fetch && git checkout $(commit_cuda) && pip install -e .
|
||||||
cd vllm && pip install -e .; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
build-vllm-rocm:
|
build-vllm-rocm:
|
||||||
if [ ! -d 'vllm' ]; then \
|
if [ ! -d 'vllm' ]; then \
|
||||||
pip install -U ninja packaging --no-cache-dir && \
|
pip install -U ninja packaging --no-cache-dir && \
|
||||||
git clone https://github.com/fxmarty/rocm-vllm.git vllm && \
|
git clone https://github.com/fxmarty/rocm-vllm.git vllm; \
|
||||||
cd vllm && git fetch && git checkout ca6913b3c2ffacdcb7d15e914dc34adbc6c89479 && \
|
|
||||||
PYTORCH_ROCM_ARCH="gfx90a;gfx942" python setup.py build; \
|
|
||||||
fi
|
fi
|
||||||
|
cd vllm && git fetch && git checkout $(commit_rocm) && \
|
||||||
|
PYTORCH_ROCM_ARCH="gfx90a;gfx942" python setup.py build
|
||||||
|
|
||||||
install-vllm-rocm: build-vllm-rocm
|
install-vllm-rocm: build-vllm-rocm
|
||||||
if [ ! -d 'vllm' ]; then \
|
cd vllm && git fetch && git checkout $(commit_rocm) && \
|
||||||
cd vllm && \
|
PYTORCH_ROCM_ARCH="gfx90a;gfx942" pip install -e .
|
||||||
PYTORCH_ROCM_ARCH="gfx90a;gfx942" pip install -e .; \
|
|
||||||
fi
|
|
||||||
|
|
Loading…
Reference in New Issue