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
gaoqiong
MIGraphX
Commits
bb3a3e53
Commit
bb3a3e53
authored
Aug 04, 2022
by
turneram
Browse files
Edit attention test to run in ort
parent
8bfea5f7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
test/onnx/attention_test.onnx
test/onnx/attention_test.onnx
+4
-4
test/onnx/gen_onnx.py
test/onnx/gen_onnx.py
+2
-1
No files found.
test/onnx/attention_test.onnx
View file @
bb3a3e53
attention_test:
ö
T
attention_test:
…
c
input
weights
bias
mask_indexresultAttention_0" Attention*
num_heads attention_testZ
num_heads
: com.microsoft
attention_testZ
input
...
...
@@ -21,7 +21,7 @@ mask_indexresultAttention_0" Attention*
€Z
mask_index
€b
result
...
...
test/onnx/gen_onnx.py
View file @
bb3a3e53
...
...
@@ -217,7 +217,7 @@ def attention_test():
weights
=
helper
.
make_tensor_value_info
(
'weights'
,
TensorProto
.
FLOAT
,
[
768
,
2304
])
bias
=
helper
.
make_tensor_value_info
(
'bias'
,
TensorProto
.
FLOAT
,
[
2304
])
mask_index
=
helper
.
make_tensor_value_info
(
'mask_index'
,
TensorProto
.
INT
64
,
mask_index
=
helper
.
make_tensor_value_info
(
'mask_index'
,
TensorProto
.
INT
32
,
[
2
,
384
])
result
=
helper
.
make_tensor_value_info
(
'result'
,
TensorProto
.
FLOAT
,
[
2
,
384
,
768
])
...
...
@@ -227,6 +227,7 @@ def attention_test():
outputs
=
[
'result'
],
num_heads
=
12
,
name
=
"Attention_0"
)
node
.
domain
=
"com.microsoft"
return
([
node
],
[
input
,
weights
,
bias
,
mask_index
],
[
result
])
...
...
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