Commit 36f6381
authored
Assign operation (#5)
* Add basic `assign` operation
Note that it doesn't properly support updates, so only unmasked accumulations work correctly
* Add vector_compare and matrix_compare test utility
* Create select_by_indices and rename apply_mask->select_by_mask
select_by_indices is needed to properly implement assignment without accumulation
* Improve `update` to work with `assign`
`assign` has indices that function similar to a mask, so providing a mask during update
causes a double mask challenge of figuring out what to keep, etc.
Add tests to cover all the cases.
Also allow scalar value in `build` to make an iso-valued tensor.
* Add support for assign with scalar input
Allow BinaryOps to specify 0 or 1 to indicate the output
matches the dtype of input arg 0 or 11 parent df7e629 commit 36f6381
File tree
9 files changed
+894
-288
lines changed- mlir_graphblas
- tests
9 files changed
+894
-288
lines changedLarge diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
| |||
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
73 | | - | |
| 75 | + | |
| 76 | + | |
74 | 77 | | |
75 | 78 | | |
76 | 79 | | |
| |||
94 | 97 | | |
95 | 98 | | |
96 | 99 | | |
97 | | - | |
| 100 | + | |
98 | 101 | | |
99 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
100 | 113 | | |
101 | 114 | | |
102 | 115 | | |
| |||
132 | 145 | | |
133 | 146 | | |
134 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
135 | 155 | | |
136 | 156 | | |
137 | 157 | | |
| |||
417 | 437 | | |
418 | 438 | | |
419 | 439 | | |
420 | | - | |
| 440 | + | |
421 | 441 | | |
422 | 442 | | |
423 | 443 | | |
424 | 444 | | |
425 | | - | |
| 445 | + | |
426 | 446 | | |
427 | 447 | | |
428 | 448 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | | - | |
250 | | - | |
| 249 | + | |
| 250 | + | |
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| 274 | + | |
274 | 275 | | |
275 | 276 | | |
276 | 277 | | |
| |||
287 | 288 | | |
288 | 289 | | |
289 | 290 | | |
290 | | - | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
291 | 302 | | |
292 | 303 | | |
293 | 304 | | |
| |||
329 | 340 | | |
330 | 341 | | |
331 | 342 | | |
332 | | - | |
333 | | - | |
| 343 | + | |
| 344 | + | |
334 | 345 | | |
335 | 346 | | |
336 | 347 | | |
| |||
356 | 367 | | |
357 | 368 | | |
358 | 369 | | |
359 | | - | |
| 370 | + | |
| 371 | + | |
360 | 372 | | |
361 | 373 | | |
362 | 374 | | |
363 | 375 | | |
364 | 376 | | |
365 | 377 | | |
| 378 | + | |
366 | 379 | | |
367 | 380 | | |
368 | 381 | | |
| |||
383 | 396 | | |
384 | 397 | | |
385 | 398 | | |
386 | | - | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
387 | 410 | | |
388 | 411 | | |
389 | 412 | | |
| |||
0 commit comments