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

Add Attention Test Suite #37

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

erman-gurses
Copy link
Contributor

Progress on this #2
This PR refactors, adds, and migrates Attention e2e tests from the PR here: iree-org/iree#18320

Signed-off-by: erman-gurses <[email protected]>
linalg_ops/attention/generate_test_mlir_files.sh Outdated Show resolved Hide resolved
Comment on lines +41 to +44
# query_type;key_type;value_type;scale_type
type_and_layout_combinations=(
"f16;f16;f16;f16"
)
Copy link
Member

Choose a reason for hiding this comment

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

Want to test other combinations? What could we test?

Generally, the test suite can and should include tests that don't currently pass.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The current test suite has not supported yet the other combinations. It will support; however, it needs some discussions - that is one of my upcoming tasks.

Comment on lines +175 to +178
# Generates a test function in the generated MLIR code.
# The generated function will take the same arguments as iree_linalg_ext.attention variants
# and will just call iree_linalg_ext.attention variants with them, returning its result.
def generate_function(
Copy link
Member

Choose a reason for hiding this comment

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

Bringing back some discussion from iree-org/iree#17751 (comment), could this generator produce operations other than iree_linalg_ext.attention? Fine to start with only that one, but what about iree_linalg_ext.online_attention or even torch.nn.functional.scaled_dot_product_attention?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Better to ask this Kunwar @Groverkss.

linalg_ops/attention/generate_e2e_attention_tests.py Outdated Show resolved Hide resolved
linalg_ops/iree-e2e-attention-test.cc Outdated Show resolved Hide resolved
linalg_ops/iree-e2e-attention-test.cc Outdated Show resolved Hide resolved
linalg_ops/attention/generate_e2e_attention_tests.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants