Commit e67eeef
authored
[torchlib] Simplify linalg_vector_norm to remove the redundant Abs (#2570)
This happens in some of the LORA models. When we use ReduceL1/ReduceL2
or when ord is an even number, we don't need to take Abs of the input
Signed-off-by: Justin Chu <[email protected]>
---------
Signed-off-by: Justin Chu <[email protected]>1 parent f54cf47 commit e67eeef
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
| 333 | + | |
334 | 334 | | |
| 335 | + | |
335 | 336 | | |
336 | 337 | | |
337 | 338 | | |
| |||
345 | 346 | | |
346 | 347 | | |
347 | 348 | | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
348 | 352 | | |
349 | 353 | | |
350 | 354 | | |
0 commit comments