Commit 3cab972
authored
Update LayerNorm2D to use TRT normalization API (#650)
Naive performance test results indicate the new implementation is about
50% faster
```
LayerNorm2d_TP1 (Direct Implementation) took 0.0059s for 100 iterations
LayerNorm2d_TP2 (LayerNorm-based) took 0.0038s for 100 iterations
Accuracy (predicted mask scores) for SamV2 demo remains the same
```1 parent 3ae73ea commit 3cab972
File tree
1 file changed
+5
-17
lines changed- tripy/examples/segment-anything-model-v2/sam2/modeling
1 file changed
+5
-17
lines changedLines changed: 5 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
184 | 184 | | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
| 185 | + | |
191 | 186 | | |
192 | 187 | | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
203 | 191 | | |
204 | 192 | | |
205 | 193 | | |
| |||
0 commit comments