Commit 9afb742
authored
* Resolves gh-1456
Tree reductions now populate destination with the identity when reducing over
zero-size axes. As a result, logic was removed for handling zero-size axes.
``argmax``, ``argmin``, ``max``, and ``min`` still raise an error for
zero-size axes.
Reductions now return a copy when provided an empty axis tuple.
Adds additional supported dtype combinations to ``prod`` and ``sum``, specifically for input integers and inexact output type
* Implements mean, var, and std
* Adds more tests for statistical functions
* Adds docstrings for statistical functions
* Adds more supported types to arithmetic reductions
Permits `float` accumulation type with 64 bit integer and unsigned integer inouts
to prevent unnecessary copies on devices that don't support double precision
* Changes mean reduction to use output data type as sum accumulation type
Mean in-place division now uses the real type for the denominator
1 parent f2af753 commit 9afb742
File tree
6 files changed
+797
-28
lines changed- dpctl
- tensor
- libtensor
- include/kernels
- source/reductions
- tests
6 files changed
+797
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| |||
336 | 337 | | |
337 | 338 | | |
338 | 339 | | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
339 | 343 | | |
340 | 344 | | |
341 | 345 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | 86 | | |
88 | 87 | | |
89 | 88 | | |
| |||
106 | 105 | | |
107 | 106 | | |
108 | 107 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | 108 | | |
125 | | - | |
| 109 | + | |
126 | 110 | | |
127 | 111 | | |
128 | 112 | | |
| |||
251 | 235 | | |
252 | 236 | | |
253 | 237 | | |
254 | | - | |
255 | 238 | | |
256 | 239 | | |
257 | 240 | | |
| |||
312 | 295 | | |
313 | 296 | | |
314 | 297 | | |
315 | | - | |
316 | 298 | | |
317 | 299 | | |
318 | 300 | | |
| |||
368 | 350 | | |
369 | 351 | | |
370 | 352 | | |
371 | | - | |
372 | 353 | | |
373 | 354 | | |
374 | 355 | | |
| |||
424 | 405 | | |
425 | 406 | | |
426 | 407 | | |
427 | | - | |
428 | 408 | | |
429 | 409 | | |
430 | 410 | | |
| |||
446 | 426 | | |
447 | 427 | | |
448 | 428 | | |
449 | | - | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
450 | 440 | | |
451 | | - | |
| 441 | + | |
452 | 442 | | |
453 | 443 | | |
454 | 444 | | |
| |||
549 | 539 | | |
550 | 540 | | |
551 | 541 | | |
552 | | - | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
553 | 553 | | |
554 | 554 | | |
555 | 555 | | |
| |||
0 commit comments