forked from NVIDIA/TensorRT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCustomQKVToContextPluginDynamic_PluginConfig.yaml
200 lines (199 loc) · 4.04 KB
/
CustomQKVToContextPluginDynamic_PluginConfig.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
---
name: CustomQKVToContextPluginDynamic
interface: "IPluginV2DynamicExt"
versions:
"1":
inputs:
- input
outputs:
- output
input_dims:
input: 5
output_dims:
output: "input_0, input_1, hidden_size_0, 1, 1"
attributes:
- type_id
- hidden_size
- num_heads
- has_mask
- dq_probs
attribute_types:
type_id: int32
hidden_size: int32
num_heads: int32
has_mask: int32
dq_probs: float32
attribute_length:
type_id: 1
hidden_size: 1
num_heads: 1
has_mask: 1
dq_probs: 1
attribute_options:
type_id:
- 0
- 1
- 2
hidden_size:
min: "0"
max: "=pinf"
num_heads:
min: "0"
max: "=pinf"
has_mask:
- 0
- 1
dq_probs:
min: "0"
max: "=pinf"
attribute_constraints:
- "num_heads * k == hidden_size"
attributes_required:
- type_id
- hidden_size
- num_heads
- has_mask
golden_io_path: "plugin/bertQKVToContextPlugin/CustomQKVToContextPluginDynamic_PluginGoldenIO.json"
abs_tol: 1e-5
rel_tol: 1e-5
fp16_atol: 1e-2
fp16_rtol: 1e-2
configs:
config1:
input_types:
input: float16
attribute_options:
type_id:
value: 1
shape: "1"
hidden_size:
value: 768
shape: "1"
num_heads:
value: 12
shape: "1"
has_mask:
value: 0
shape: "1"
output_types:
output: float16
config2:
input_types:
input: float16
attribute_options:
type_id:
value: 1
shape: "1"
hidden_size:
value: 1024
shape: "1"
num_heads:
value: 16
shape: "1"
has_mask:
value: 0
shape: "1"
output_types:
output: float16
config5:
input_types:
input: float16
attribute_options:
type_id:
value: 1
shape: "1"
hidden_size:
value: 384
shape: "1"
num_heads:
value: 12
shape: "1"
has_mask:
value: 0
shape: "1"
output_types:
output: float16
has_mask:
input_types:
input: float32
input_mask: int32
attribute_options:
type_id:
value: 0
shape: "1"
hidden_size:
value: 3
shape: "1"
num_heads:
value: 3
shape: "1"
has_mask:
value: 1
shape: "1"
output_types:
output: float32
"2":
inputs:
- input
- input_mask
outputs:
- output
input_dims:
input: 5
input_mask: 1
output_dims:
output: "input_0, input_mask_0, hidden_size_0, 1, 1"
attributes:
- type_id
- hidden_size
- num_heads
- has_mask
- dq_probs
- var_seqlen
- use_int8_scale_max
attribute_types:
type_id: int32
hidden_size: int32
num_heads: int32
has_mask: int32
dq_probs: float32
var_seqlen: int32
use_int8_scale_max: int32
attribute_length:
type_id: 1
hidden_size: 1
num_heads: 1
has_mask: 1
dq_probs: 1
var_seqlen: 1
use_int8_scale_max: 1
attribute_options:
type_id:
- 0
- 1
- 2
hidden_size:
min: "0"
max: "=pinf"
num_heads:
min: "0"
max: "=pinf"
has_mask:
- 0
- 1
dq_probs:
min: "0"
max: "=pinf"
use_int8_scale_max:
- 0
- 1
var_seqlen:
- 0
# - 1 Disabled since SM specific tests are not supported yet
attributes_required:
- type_id
- hidden_size
- num_heads
- has_mask
# "3": #version3 - Not supported yet
...