Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FlexAttention] Accuracy issues during running FlexDecoding UT #3631

Open
hoshibara opened this issue Mar 10, 2025 · 1 comment
Open

[FlexAttention] Accuracy issues during running FlexDecoding UT #3631

hoshibara opened this issue Mar 10, 2025 · 1 comment

Comments

@hoshibara
Copy link

hoshibara commented Mar 10, 2025

Describe the bug

python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod1_head_dims1_page_size_256

We captured this case's compiled results on both XPU and CUDA, unified their outputs, and found that running the Triton codes generated by UT will get different results.

triton-code.zip


While running the XPU FlexDecoding UT, we found some failure due to tensors mismatch.

AssertionError: False is not true : XXX Compiled error XXX is greater than ref error XXX by more than XXX.

  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_float16_score_mod1_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims0_score_mod1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims3_score_mod0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims3_score_mod1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims3_score_mod2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims3_score_mod5
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims3_score_mod8
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_max_autotune_with_captured
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_non_equal_head_dims_score_mod2_float16_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_non_equal_head_dims_score_mod4_float16_head_dims0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_non_equal_head_dims_score_mod7_float16_head_dims0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod0_BLOCK_SIZE2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod0_BLOCK_SIZE3
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod0_BLOCK_SIZE_128
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod0_BLOCK_SIZE_64
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod1_BLOCK_SIZE2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod1_BLOCK_SIZE3
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod1_BLOCK_SIZE_128
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod1_BLOCK_SIZE_64
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod2_BLOCK_SIZE2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod2_BLOCK_SIZE3
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod2_BLOCK_SIZE_128
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod2_BLOCK_SIZE_64
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod4_BLOCK_SIZE2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod4_BLOCK_SIZE3
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod4_BLOCK_SIZE_128
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod4_BLOCK_SIZE_64
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod5_BLOCK_SIZE2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod5_BLOCK_SIZE3
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod5_BLOCK_SIZE_128
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod5_BLOCK_SIZE_64
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod7_BLOCK_SIZE2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod7_BLOCK_SIZE3
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod7_BLOCK_SIZE_128
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod7_BLOCK_SIZE_64
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod8_BLOCK_SIZE2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod8_BLOCK_SIZE3
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod8_BLOCK_SIZE_128
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod8_BLOCK_SIZE_64
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_float16_score_mod0_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_float16_score_mod0_head_dims2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_float16_score_mod1_head_dims2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_float16_score_mod2_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_float16_score_mod2_head_dims2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_float16_score_mod4_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_float16_score_mod4_head_dims2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_float16_score_mod5_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_float16_score_mod5_head_dims2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_float16_score_mod7_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_float16_score_mod7_head_dims2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_float16_score_mod8_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_float16_score_mod8_head_dims2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_captured_buffers_all_dims_float16
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_captured_buffers_float16
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_captured_scale_float16
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_function_composition_float16
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims0_score_mod0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims0_score_mod2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims0_score_mod4
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims0_score_mod5
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims0_score_mod7
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims0_score_mod8
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims1_score_mod0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims1_score_mod1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims1_score_mod2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims1_score_mod4
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims1_score_mod5
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims1_score_mod7
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims1_score_mod8
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims2_score_mod0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims2_score_mod1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims2_score_mod2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims2_score_mod4
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims2_score_mod5
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims2_score_mod7
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims2_score_mod8
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims3_score_mod0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims3_score_mod1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims3_score_mod2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims3_score_mod4
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims3_score_mod5
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims3_score_mod7
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims3_score_mod8
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims0_score_mod0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims0_score_mod1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims0_score_mod2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims0_score_mod4
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims0_score_mod5
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims0_score_mod7
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims0_score_mod8
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims1_score_mod0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims1_score_mod1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims1_score_mod2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims1_score_mod4
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims1_score_mod5
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims1_score_mod7
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims1_score_mod8
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims2_score_mod0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims2_score_mod1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims2_score_mod2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims2_score_mod4
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims2_score_mod5
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims2_score_mod7
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims2_score_mod8
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims3_score_mod4
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims3_score_mod7
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_load_from_bias_head_seq_batch_float16
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_load_from_bias_seq_batch_float16
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_load_from_bias_seq_only_float16
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_max_autotune
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_non_divisible_multi_token_offset_mask
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_non_divisible_multi_token_offset_mask_with_captured_buffer
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_non_divisible_offset_mask
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_non_divisible_offset_mask_with_captured_buffer
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_non_equal_head_dims_score_mod0_float16_head_dims0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_non_equal_head_dims_score_mod0_float16_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_non_equal_head_dims_score_mod1_float16_head_dims0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_non_equal_head_dims_score_mod1_float16_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_non_equal_head_dims_score_mod2_float16_head_dims0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_non_equal_head_dims_score_mod4_float16_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_non_equal_head_dims_score_mod5_float16_head_dims0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_non_equal_head_dims_score_mod5_float16_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_non_equal_head_dims_score_mod7_float16_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_non_equal_head_dims_score_mod8_float16_head_dims0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_non_equal_head_dims_score_mod8_float16_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod0_head_dims1_page_size_64
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod0_head_dims2_page_size_128
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod0_head_dims2_page_size_256
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod0_head_dims2_page_size_64
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod1_head_dims1_page_size_64
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod1_head_dims2_page_size_128
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod1_head_dims2_page_size_256
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod1_head_dims2_page_size_64
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod2_head_dims1_page_size_64
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod2_head_dims2_page_size_128
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod2_head_dims2_page_size_256
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod2_head_dims2_page_size_64
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod4_head_dims1_page_size_64
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod4_head_dims2_page_size_128
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod4_head_dims2_page_size_256
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod4_head_dims2_page_size_64
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod5_head_dims1_page_size_64
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod5_head_dims2_page_size_128
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod5_head_dims2_page_size_256
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod5_head_dims2_page_size_64
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod7_head_dims1_page_size_64
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod7_head_dims2_page_size_128
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod7_head_dims2_page_size_256
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod7_head_dims2_page_size_64
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod8_head_dims1_page_size_64
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod8_head_dims2_page_size_128
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod8_head_dims2_page_size_256
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod8_head_dims2_page_size_64
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_recompile_changed_score_mod_float16
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_seq_masking_float16
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_silu_on_score_float16
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_skip_odd_keys_float16
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_windowed_full_mask_vs_sdpa
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_windowed_full_mask_vs_sdpa_paged_attention
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_windowed_no_mask_vs_sdpa_paged_attention
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_windowed_partial_block_vs_sdpa
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_windowed_partial_block_vs_sdpa_paged_attention

AssertionError: Tensor-likes are not close!

  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod3_BLOCK_SIZE2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod3_BLOCK_SIZE3
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod3_BLOCK_SIZE_128
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod3_BLOCK_SIZE_64
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod6_BLOCK_SIZE2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod6_BLOCK_SIZE3
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod6_BLOCK_SIZE_128
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_different_block_size_float16_score_mod6_BLOCK_SIZE_64
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_float16_score_mod3_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_float16_score_mod3_head_dims2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_float16_score_mod6_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_builtin_score_mods_float16_score_mod6_head_dims2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_do_not_trigger_dynamic_shapes_on_empty_block_mask
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims0_score_mod3
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims0_score_mod6
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims1_score_mod3
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims1_score_mod6
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims2_score_mod3
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims2_score_mod6
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims3_score_mod3
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims1_batch_dims3_score_mod6
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims0_score_mod3
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims0_score_mod6
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims1_score_mod3
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims1_score_mod6
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims2_score_mod3
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims2_score_mod6
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims3_score_mod3
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_kv_batch_broadcast_float16_head_dims2_batch_dims3_score_mod6
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_logsumexp_correctness_float16_score_mod0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_logsumexp_correctness_float16_score_mod1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_multiple_score_mod_calls
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_multiple_score_mod_calls_paged_attention
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_multiple_score_mod_calls_paged_attention2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_non_equal_head_dims_score_mod3_float16_head_dims0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_non_equal_head_dims_score_mod3_float16_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_non_equal_head_dims_score_mod6_float16_head_dims0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_non_equal_head_dims_score_mod6_float16_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_padded_dense_causal_float16
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod3_head_dims1_page_size_64
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod3_head_dims2_page_size_128
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod3_head_dims2_page_size_256
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod3_head_dims2_page_size_64
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod6_head_dims1_page_size_64
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod6_head_dims2_page_size_128
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod6_head_dims2_page_size_256
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod6_head_dims2_page_size_64
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s0_v_s0_head_dims0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s0_v_s0_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s0_v_s0_head_dims2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s0_v_s1_head_dims0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s0_v_s1_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s0_v_s1_head_dims2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s0_v_s2_head_dims0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s0_v_s2_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s0_v_s2_head_dims2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s0_v_s3_head_dims0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s0_v_s3_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s0_v_s3_head_dims2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s1_v_s0_head_dims0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s1_v_s0_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s1_v_s0_head_dims2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s1_v_s1_head_dims0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s1_v_s1_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s1_v_s1_head_dims2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s1_v_s2_head_dims0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s1_v_s2_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s1_v_s2_head_dims2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s1_v_s3_head_dims0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s1_v_s3_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s1_v_s3_head_dims2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s2_v_s0_head_dims0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s2_v_s0_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s2_v_s0_head_dims2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s2_v_s1_head_dims0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s2_v_s1_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s2_v_s1_head_dims2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s2_v_s2_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s2_v_s2_head_dims2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s2_v_s3_head_dims0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s2_v_s3_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s2_v_s3_head_dims2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s3_v_s0_head_dims0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s3_v_s0_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s3_v_s0_head_dims2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s3_v_s1_head_dims0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s3_v_s1_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s3_v_s1_head_dims2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s3_v_s2_head_dims0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s3_v_s2_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s3_v_s2_head_dims2
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s3_v_s3_head_dims0
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s3_v_s3_head_dims1
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_strided_inputs_float16_k_s3_v_s3_head_dims2

AssertionError: False is not true : Output/Grad with NaN

  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_njt_causal_float16
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod0_head_dims1_page_size_128
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod0_head_dims1_page_size_256
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod1_head_dims1_page_size_128
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod1_head_dims1_page_size_256
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod2_head_dims1_page_size_128
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod2_head_dims1_page_size_256
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod3_head_dims1_page_size_128
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod3_head_dims1_page_size_256
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod4_head_dims1_page_size_128
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod4_head_dims1_page_size_256
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod5_head_dims1_page_size_128
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod5_head_dims1_page_size_256
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod6_head_dims1_page_size_128
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod6_head_dims1_page_size_256
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod7_head_dims1_page_size_128
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod7_head_dims1_page_size_256
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod8_head_dims1_page_size_128
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod8_head_dims1_page_size_256
  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_windowed_no_mask_vs_sdpa

AssertionError: tensor(False, device='xpu:0') is not true

  • python test/inductor/test_flex_decoding.py TestFlexDecoding.test_multiple_score_mod_calls2

Environment details

You can setup test env according this issue:
#3518

Collecting environment information...
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.4 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect
CMake version: version 3.31.4
Libc version: glibc-2.35

Python version: 3.10.16 | packaged by conda-forge | (main, Dec  5 2024, 14:16:10) [GCC 13.3.0] (64-bit runtime)
Python platform: Linux-5.15.50-051550-generic-x86_64-with-glibc2.35
Is CUDA available: N/A
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A

CPU:
Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Address sizes:                   52 bits physical, 57 bits virtual
Byte Order:                      Little Endian
CPU(s):                          224
On-line CPU(s) list:             0-223
Vendor ID:                       GenuineIntel
Model name:                      Intel(R) Xeon(R) Platinum 8480+
CPU family:                      6
Model:                           143
Thread(s) per core:              2
Core(s) per socket:              56
Socket(s):                       2
Stepping:                        6
CPU max MHz:                     3800.0000
CPU min MHz:                     800.0000
BogoMIPS:                        4000.00
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 invpcid_single intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr avx512_fp16 flush_l1d arch_capabilities
Virtualization:                  VT-x
L1d cache:                       5.3 MiB (112 instances)
L1i cache:                       3.5 MiB (112 instances)
L2 cache:                        224 MiB (112 instances)
L3 cache:                        210 MiB (2 instances)
NUMA node(s):                    2
NUMA node0 CPU(s):               0-55,112-167
NUMA node1 CPU(s):               56-111,168-223
Vulnerability Itlb multihit:     Not affected
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Mmio stale data:   Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Enhanced IBRS, IBPB conditional, RSB filling
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected

Versions of relevant libraries:
[pip3] numpy==2.2.3
[pip3] optree==0.14.0
[pip3] torch==2.7.0a0+gite0be178
[pip3] torchaudio==2.6.0.dev20250213+xpu
[pip3] torchinfo==1.8.0
[pip3] torchvision==0.22.0.dev20250213+xpu
[pip3] triton==3.2.0+gitb3f9c6e5
[conda] numpy                     2.2.3                    pypi_0    pypi
[conda] optree                    0.14.0                   pypi_0    pypi
[conda] torch                     2.7.0a0+gite0be178           dev_0    <develop>
[conda] torchaudio                2.6.0.dev20250213+xpu          pypi_0    pypi
[conda] torchinfo                 1.8.0                    pypi_0    pypi
[conda] torchvision               0.22.0.dev20250213+xpu          pypi_0    pypi
[conda] triton                    3.2.0+gitb3f9c6e5           dev_0    <develop>
@chengjunlu
Copy link
Contributor

We find two issues related to Triton XPU: #3672, #3704
And two issues related to IGC.
With the quick work around for theses issues, we can pass all the test cases of FlexDecoding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants