Commit e382f9d
[DataType] Add is_integer and is_signed queries (#110)
These queries could be convenient for conditional checks in ONNX Script
pattern rewrite rules. A simple example would be rewriting subtraction
of a constant as addition of the negative (additive inverse) of the
constant which should be restricted to signed numbers (as unsigned
numbers do not have an additive inverse - at least within their data
type bounds). See #109
---------
Signed-off-by: Christoph Berganski <christoph.berganski@gmail.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com>1 parent 12047d2 commit e382f9d
1 file changed
+36
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 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 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
172 | 208 | | |
173 | 209 | | |
174 | 210 | | |
| |||
0 commit comments