Commit aa93917
authored
feat(atenlib): op(trunc) (#515)
aten::trunc
```
<
domain: "onnxscript.atenlib",
opset_import: ["" : 18]
>
aten_trunc (self) => (return_val)
{
tmp = Abs (self)
integer_parts = Floor (tmp)
tmp_0 = Constant <value = float tmp_0 {0}> ()
tmp_0_cast = CastLike (tmp_0, self)
is_negative = Less (self, tmp_0_cast)
tmp_1 = Neg (integer_parts)
return_val = Where (is_negative, tmp_1, integer_parts)
}
```1 parent 510db96 commit aa93917
File tree
2 files changed
+7
-2
lines changed- onnxscript
- function_libs/torch_aten/ops
- tests/function_libs/torch_aten
2 files changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5573 | 5573 | | |
5574 | 5574 | | |
5575 | 5575 | | |
5576 | | - | |
| 5576 | + | |
| 5577 | + | |
5577 | 5578 | | |
5578 | 5579 | | |
5579 | | - | |
| 5580 | + | |
| 5581 | + | |
| 5582 | + | |
| 5583 | + | |
5580 | 5584 | | |
5581 | 5585 | | |
5582 | 5586 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
| 392 | + | |
392 | 393 | | |
393 | 394 | | |
394 | 395 | | |
| |||
0 commit comments