Commit 28c9548
Add CastInt64ToInt32Pass (#5842)
Summary:
Integer placeholders, for example in this examples x = torch.Tensor([1.]) + 1
Are by default lowered as int64 tensors.
As int64 is not a valid TOSA dtype, we cast these
tensors to int32.
Reference:
https://www.mlplatform.org/tosa/tosa_spec.html#_supported_number_formats
Change-Id: Ice59625b7fd68ff3a544ee4648fe05f69b9333e6
Pull Request resolved: #5842
Reviewed By: mergennachin
Differential Revision: D64047286
Pulled By: digantdesai
fbshipit-source-id: 66cce1c5e360082cbe168d45ef2ba9ee492e87871 parent e540bcb commit 28c9548
2 files changed
+37
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
0 commit comments