[Docs] Clearer error message for bwd d > 64, bump to v1.0.4
This commit is contained in:
parent
fbbb107848
commit
ad113948a6
@ -413,8 +413,8 @@ mha_bwd(const at::Tensor &dout, // total_q x num_heads, x head_size
|
||||
const int total_k = k.size(TOTAL_DIM);
|
||||
TORCH_CHECK(batch_size > 0);
|
||||
TORCH_CHECK((head_size % 8 == 0) && (head_size <= 128));
|
||||
if (head_size > 64) { // TODO: eventually we should support SM86 and SM70 with d=128 as well
|
||||
TORCH_CHECK(is_sm80 || is_sm90);
|
||||
if (head_size > 64) {
|
||||
TORCH_CHECK(is_sm80 || is_sm90, "FlashAttention backward for head dim > 64 requires A100 or H100 GPUs as the implementation needs a large amount of shared memory.");
|
||||
}
|
||||
|
||||
CHECK_SHAPE(q, total_q, num_heads, head_size);
|
||||
|
||||
2
setup.py
2
setup.py
@ -162,7 +162,7 @@ ext_modules.append(
|
||||
|
||||
setup(
|
||||
name="flash_attn",
|
||||
version="1.0.3.post0",
|
||||
version="1.0.4",
|
||||
packages=find_packages(
|
||||
exclude=("build", "csrc", "include", "tests", "dist", "docs", "benchmarks", "flash_attn.egg-info",)
|
||||
),
|
||||
|
||||
@ -85,11 +85,11 @@ RUN pip install transformers==4.25.1 datasets==2.8.0 pytorch-lightning==1.8.6 tr
|
||||
RUN pip install git+https://github.com/mlcommons/logging.git@2.1.0
|
||||
|
||||
# Install FlashAttention
|
||||
RUN pip install flash-attn==1.0.3.post0
|
||||
RUN pip install flash-attn==1.0.4
|
||||
|
||||
# Install CUDA extensions for cross-entropy, fused dense, layer norm
|
||||
RUN git clone https://github.com/HazyResearch/flash-attention \
|
||||
&& cd flash-attention && git checkout v1.0.3.post0 \
|
||||
&& cd flash-attention && git checkout v1.0.4 \
|
||||
&& cd csrc/fused_softmax && pip install . && cd ../../ \
|
||||
&& cd csrc/rotary && pip install . && cd ../../ \
|
||||
&& cd csrc/xentropy && pip install . && cd ../../ \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user