Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions tests/v1/spec_decode/test_acceptance_length.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,14 @@ class Eagle3ModelConfig:


def get_available_attention_backends() -> list[str]:
if not hasattr(current_platform, "get_valid_backends"):
return ["FLASH_ATTN"]
# Check if get_valid_backends is actually defined in the platform class
# (not just returning None from __getattr__)
get_valid_backends = getattr(current_platform.__class__, "get_valid_backends", None)
if get_valid_backends is None:
if current_platform.is_rocm():
return ["TRITON_ATTN"]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain why TRITON_ATTN is used here with a code comment?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DarkLight1337 Triton is AMD's default attention backend, and we are not compatible with the flash attn backend that is used for the CUDA equivalent tests. Let us know if you'd like us to put a comment there still.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the purpose of the comment is to tell other developers who are not as familiar with ROCm about this

else:
return ["FLASH_ATTN"]

device_capability = current_platform.get_device_capability()
if device_capability is None:
Expand Down
Loading