No dot product attention backend is available for the provided inputs
Describe the bug
I'm training DeepSeekV3 with TE 2.3, but I'm encountering a no attention backend error.
File "/usr/local/lib/python3.10/dist-packages/transformer_engine/pytorch/attention/dot_product_attention/dot_product_attention.py", line 1010, in forward
raise ValueError(
ValueError: No dot product attention backend is available for the provided inputs. Please run with NVTE_DEBUG=1 NVTE_DEBUG_LEVEL=2 to find out the reasons for disabling all backends.
DEBUG:2025-05-24 03:30:22,799:Running with config={'transformer_engine_version': '2.3.0+5de3e14', 'compute_capability': 'sm80', 'flash_attn_version': '2.7.4.post1', 'flash_attn_3_version': 'not installed', 'cudnn_version': '9.8.0', 'qkv_type': <class 'torch.Tensor'>, 'qkv_dtype': torch.bfloat16, 'qkv_layout': 'thd_thd_thd', 'batch_size': 2, 'num_heads': 64, 'num_gqa_groups': 64, 'max_seqlen_q': 588, 'max_seqlen_kv': 588, 'head_dim_qk': 192, 'head_dim_v': 128, 'attn_mask_type': 'padding_causal', 'window_size': (-1, 0), 'alibi_slopes_shape': None, 'core_attention_bias_type': 'no_bias', 'core_attention_bias_shape': None, 'core_attention_bias_requires_grad': False, 'pad_between_seqs': False, 'attention_dropout': 0.0, 'context_parallel': False, 'deterministic': False, 'is_training': True, 'fp8': False, 'fp8_meta': {'fp8_checkpoint': False, 'fp8_group': None}, 'inference_params': None}
DEBUG:2025-05-24 03:30:22,799:Disabling FlashAttention 2 due to NVTE_FLASH_ATTN=0
DEBUG:2025-05-24 03:30:22,799:Disabling UnfusedDotProductAttention due to NVTE_UNFUSED_ATTN=0
DEBUG:2025-05-24 03:30:22,799:Disabling FusedAttention as no backend supports the provided input
DEBUG:2025-05-24 03:30:22,799:Available backends = {FlashAttention=False, FusedAttention=False, UnfusedDotProductAttention=False}
DEBUG:2025-05-24 03:30:22,799:Selected backend = NoBackend
Environment details
OS version: Debian 11 PyTorch version: 2.6.0 Python version: 3.10.12 Transformer Engine version: 2.3 CUDA version: 12.4 CUDNN version: 9.8.0 GPU: 8xNVIDIA A100-SXM4-40GB
Additional context
AttentionParams
qkv_type=<class 'torch.Tensor'>,
qkv_dtype=torch.bfloat16,
qkv_layout='thd_thd_thd',
batch_size=2,
num_heads=64,
num_gqa_groups=64,
max_seqlen_q=588,
max_seqlen_kv=588,
head_dim_qk=192,
head_dim_v=128,
attn_mask_type='padding_causal',
window_size=(-1, 0),
alibi_slopes_shape=None,
core_attention_bias_type='no_bias',
core_attention_bias_shape=None,
core_attention_bias_requires_grad=False,
pad_between_seqs=False,
attention_dropout=0.0,
context_parallel=False,
deterministic=False,
is_training=True,
fp8=False,
fp8_meta={'fp8_checkpoint': False, 'fp8_group': None},
inference_params=None
run_config
{
'transformer_engine_version': '2.3.0+5de3e14',
'compute_capability': 'sm80',
'flash_attn_version': '2.7.4.post1',
'flash_attn_3_version': 'not installed',
'cudnn_version': '9.8.0'
}
On A100 (sm_arch=80), the condition head_dim_qk ≤ 128 must be satisfied in order to use the fused_attention_backend.
On A100 (sm_arch=80), the condition head_dim_qk ≤ 128 must be satisfied in order to use the fused_attention_backend.
@jinqinn hi jinqinn, I met this error when training 30B-A3B-MoE model on B200 as well, could you help to locate the problem? Many thanks!
"/home/tiger/.local/lib/python3.11/site-packages/transformer_engine/pytorch/attention/dot_product_attention/dot_product_attention.py",
line 1018, in forward\n raise ValueError(\n', 'ValueError: No dot product attention backend is available for the provided inputs. Please run with NVTE_DEBUG=1 NVTE_DEBUG_LEVEL=2 to find out the reasons for disabling all backends.\n']
I do have flash-attn 2.8 installed but debug info shows "'flash_attn_version': 'not installed', 'flash_attn_3_version': 'not installed',", so what's the compatibel version of flash-attn for Transformer Engine version: 2.6.0?
DEBUG:DotProductAttention:Running with config={'transformer_engine_version': '2.6.0.post1', 'compute_capability': 'sm100', 'flash_attn_version': 'not installed', 'flash_attn_3_version': 'not installed', 'cudnn_version': '9.7.1', 'qkv_type': <class 'torch.Tensor'>, 'qkv_dtype': torch.bfloat16, 'qkv_layout': 'thd_thd_thd', 'batch_size': 1, 'num_heads': 32, 'num_gqa_groups': 4, 'max_seqlen_q': tensor(3389, device='cuda:6'), 'max_seqlen_kv': tensor(3389, device='cuda:6'), 'head_dim_qk': 128, 'head_dim_v': 128, 'attn_mask_type': 'padding_causal', 'window_size': (-1, 0), 'alibi_slopes_shape': None, 'core_attention_bias_type': 'no_bias', 'core_attention_bias_shape': None, 'core_attention_bias_requires_grad': False, 'pad_between_seqs': False, 'attention_dropout': 0.0, 'context_parallel': False, 'deterministic': False, 'is_training': True, 'fp8': False, 'fp8_meta': {'fp8_checkpoint': False, 'fp8_group': None}, 'inference_params': None} DEBUG:DotProductAttention:Disabling FusedAttention due to NVTE_FUSED_ATTN=0 DEBUG:DotProductAttention:Disabling UnfusedDotProductAttention due to NVTE_UNFUSED_ATTN=0 DEBUG:DotProductAttention:Available backends = {FlashAttention=False, FusedAttention=False, UnfusedDotProductAttention=False} DEBUG:DotProductAttention:Selected backend = NoBackend
Environment details PyTorch version: 2.7.1 Python version: 3.11.2 Transformer Engine version: 2.6.0 CUDA version: 12.8 CUDNN version: 9.7.1 GPU: 8xNVIDIA B200
transformer-engine-torch==2.6.0.post1 transformer_engine==2.6.0.post1 transformer_engine_cu12==2.6.0.post1 transformers==4.51.3 torch==2.7.1+cu128 torchaudio==2.7.1+cu128 torchlibrosa==0.1.0 torchsummary==1.5.1 torchvision==0.22.1+cu128
On A100 (sm_arch=80), the condition head_dim_qk ≤ 128 must be satisfied in order to use the fused_attention_backend.
@jinqinn hi jinqinn, I met this error when training 30B-A3B-MoE model on B200 as well, could you help to locate the problem? Many thanks!
"/home/tiger/.local/lib/python3.11/site-packages/transformer_engine/pytorch/attention/dot_product_attention/dot_product_attention.py",
line 1018, in forward\n raise ValueError(\n', 'ValueError: No dot product attention backend is available for the provided inputs. Please run with NVTE_DEBUG=1 NVTE_DEBUG_LEVEL=2 to find out the reasons for disabling all backends.\n']I do have flash-attn 2.8 installed but debug info shows "'flash_attn_version': 'not installed', 'flash_attn_3_version': 'not installed',", so what's the compatibel version of flash-attn for Transformer Engine version: 2.6.0?
DEBUG:DotProductAttention:Running with config={'transformer_engine_version': '2.6.0.post1', 'compute_capability': 'sm100', 'flash_attn_version': 'not installed', 'flash_attn_3_version': 'not installed', 'cudnn_version': '9.7.1', 'qkv_type': <class 'torch.Tensor'>, 'qkv_dtype': torch.bfloat16, 'qkv_layout': 'thd_thd_thd', 'batch_size': 1, 'num_heads': 32, 'num_gqa_groups': 4, 'max_seqlen_q': tensor(3389, device='cuda:6'), 'max_seqlen_kv': tensor(3389, device='cuda:6'), 'head_dim_qk': 128, 'head_dim_v': 128, 'attn_mask_type': 'padding_causal', 'window_size': (-1, 0), 'alibi_slopes_shape': None, 'core_attention_bias_type': 'no_bias', 'core_attention_bias_shape': None, 'core_attention_bias_requires_grad': False, 'pad_between_seqs': False, 'attention_dropout': 0.0, 'context_parallel': False, 'deterministic': False, 'is_training': True, 'fp8': False, 'fp8_meta': {'fp8_checkpoint': False, 'fp8_group': None}, 'inference_params': None} DEBUG:DotProductAttention:Disabling FusedAttention due to NVTE_FUSED_ATTN=0 DEBUG:DotProductAttention:Disabling UnfusedDotProductAttention due to NVTE_UNFUSED_ATTN=0 DEBUG:DotProductAttention:Available backends = {FlashAttention=False, FusedAttention=False, UnfusedDotProductAttention=False} DEBUG:DotProductAttention:Selected backend = NoBackend
Environment details PyTorch version: 2.7.1 Python version: 3.11.2 Transformer Engine version: 2.6.0 CUDA version: 12.8 CUDNN version: 9.7.1 GPU: 8xNVIDIA B200
transformer-engine-torch==2.6.0.post1 transformer_engine==2.6.0.post1 transformer_engine_cu12==2.6.0.post1 transformers==4.51.3 torch==2.7.1+cu128 torchaudio==2.7.1+cu128 torchlibrosa==0.1.0 torchsummary==1.5.1 torchvision==0.22.1+cu128
you should upgrade flashattention to 3.x.
On A100 (sm_arch=80), the condition head_dim_qk ≤ 128 must be satisfied in order to use the fused_attention_backend.
@jinqinn hi jinqinn, I met this error when training 30B-A3B-MoE model on B200 as well, could you help to locate the problem? Many thanks!
"/home/tiger/.local/lib/python3.11/site-packages/transformer_engine/pytorch/attention/dot_product_attention/dot_product_attention.py",
line 1018, in forward\n raise ValueError(\n', 'ValueError: No dot product attention backend is available for the provided inputs. Please run with NVTE_DEBUG=1 NVTE_DEBUG_LEVEL=2 to find out the reasons for disabling all backends.\n']I do have flash-attn 2.8 installed but debug info shows "'flash_attn_version': 'not installed', 'flash_attn_3_version': 'not installed',", so what's the compatibel version of flash-attn for Transformer Engine version: 2.6.0?
DEBUG:DotProductAttention:Running with config={'transformer_engine_version': '2.6.0.post1', 'compute_capability': 'sm100', 'flash_attn_version': 'not installed', 'flash_attn_3_version': 'not installed', 'cudnn_version': '9.7.1', 'qkv_type': <class 'torch.Tensor'>, 'qkv_dtype': torch.bfloat16, 'qkv_layout': 'thd_thd_thd', 'batch_size': 1, 'num_heads': 32, 'num_gqa_groups': 4, 'max_seqlen_q': tensor(3389, device='cuda:6'), 'max_seqlen_kv': tensor(3389, device='cuda:6'), 'head_dim_qk': 128, 'head_dim_v': 128, 'attn_mask_type': 'padding_causal', 'window_size': (-1, 0), 'alibi_slopes_shape': None, 'core_attention_bias_type': 'no_bias', 'core_attention_bias_shape': None, 'core_attention_bias_requires_grad': False, 'pad_between_seqs': False, 'attention_dropout': 0.0, 'context_parallel': False, 'deterministic': False, 'is_training': True, 'fp8': False, 'fp8_meta': {'fp8_checkpoint': False, 'fp8_group': None}, 'inference_params': None} DEBUG:DotProductAttention:Disabling FusedAttention due to NVTE_FUSED_ATTN=0 DEBUG:DotProductAttention:Disabling UnfusedDotProductAttention due to NVTE_UNFUSED_ATTN=0 DEBUG:DotProductAttention:Available backends = {FlashAttention=False, FusedAttention=False, UnfusedDotProductAttention=False} DEBUG:DotProductAttention:Selected backend = NoBackend
Environment details PyTorch version: 2.7.1 Python version: 3.11.2 Transformer Engine version: 2.6.0 CUDA version: 12.8 CUDNN version: 9.7.1 GPU: 8xNVIDIA B200 transformer-engine-torch==2.6.0.post1 transformer_engine==2.6.0.post1 transformer_engine_cu12==2.6.0.post1 transformers==4.51.3 torch==2.7.1+cu128 torchaudio==2.7.1+cu128 torchlibrosa==0.1.0 torchsummary==1.5.1 torchvision==0.22.1+cu128
you should upgrade flashattention to 3.x.
Thanks! somehow I degrade flash-attn to 2.7.4.post1 and it worked
So on the A100 architecture, should flash-attention be upgraded to version 3.0?
did anyone got it working on A100 ?
did anyone got it working on A100 ? for dsv2 model set qkv_format 为bshd 。It works