Skip to content

Commit

Permalink
Flops measurement for PT fMHA operators (facebookresearch#1127)
Browse files Browse the repository at this point in the history
  • Loading branch information
danthe3rd authored Jun 7, 2024
1 parent 7d111fd commit c4e8cc0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions xformers/profiler/profile_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,12 @@ def _replace_if_needed(
(torch.ops.aten, "scaled_dot_product_attention", False),
(torch.ops.xformers_flash, "flash_fwd", False),
(torch.ops.xformers, "efficient_attention_forward_cutlass", False),
(torch.ops.aten, "_efficient_attention_forward", False),
(torch.ops.aten, "_scaled_dot_product_flash_attention_backward", True),
(torch.ops.aten, "_scaled_dot_product_efficient_attention_backward", True),
(torch.ops.xformers_flash, "flash_bwd", True),
(torch.ops.xformers, "efficient_attention_backward_cutlass", True),
(torch.ops.aten, "_efficient_attention_backward", True),
]
if hasattr(lib, op)
}
Expand Down

0 comments on commit c4e8cc0

Please sign in to comment.