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 experimental code for custom attention op #81

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Add newline
  • Loading branch information
NatashaKnk committed Jun 6, 2024
commit 15492b2d3e87598f1439dba29ce0393e2e4702ee
6 changes: 3 additions & 3 deletions experimental/attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from jaxlib.hlo_helpers import custom_call



#########################################
# Created Primitives for IREE attention #
#########################################
Expand Down Expand Up @@ -67,7 +66,7 @@ def iree_attention_lowering(

mlir.register_lowering(
iree_attention_p, iree_attention_lowering, platform='iree_cpu'
) # Should this be iree?
)

#######################
# Abstract evaluation #
Expand All @@ -90,4 +89,5 @@ def iree_attention(
value,
scale,
) -> Array:
return _iree_attention(query, key, value, scale)
return _iree_attention(query, key, value, scale)

Loading