Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
bitsandbytes
Commits
b373034e
Commit
b373034e
authored
Mar 29, 2023
by
Mitchell Wortsman
Browse files
test
parent
5f3d9ada
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
tests/triton_tests/attn_decomp.py
tests/triton_tests/attn_decomp.py
+1
-1
No files found.
tests/triton_tests/attn_decomp.py
View file @
b373034e
...
@@ -97,7 +97,7 @@ class Attention(torch.nn.Module):
...
@@ -97,7 +97,7 @@ class Attention(torch.nn.Module):
def
forward
(
self
,
x
,
attn_mask
=
None
):
def
forward
(
self
,
x
,
attn_mask
=
None
):
q
,
k
,
v
=
self
.
in_proj_linear
(
self
.
ln
(
x
)).
chunk
(
3
,
dim
=-
1
)
q
,
k
,
v
=
self
.
in_proj_linear
(
self
.
ln
(
x
)).
chunk
(
3
,
dim
=-
1
)
x
=
torch
.
compile
(
torch
.
nn
.
functional
.
scaled_dot_product_attention
(
q
,
k
,
v
,
attn_mask
)
)
x
=
torch
.
nn
.
functional
.
scaled_dot_product_attention
(
q
,
k
,
v
,
attn_mask
)
x
=
self
.
out_proj
(
x
)
x
=
self
.
out_proj
(
x
)
return
x
return
x
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment