You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we're checking view datatypes in ufuncs using string comparison (e.g. here). The reasons are explained in Tyler's comment here. This can break quite easily later and is also not desirable for performance reasons.
Additionally, ufuncs with two operands only allow specific combinations of types (e.g. here), when they should be less restrictive in what combinations of types are allowed. As mentioned in Tyler's comment, we want to have a system for type promotion.
The text was updated successfully, but these errors were encountered:
There's a detailed discussion/proposal to standardize the approach to data type inspection in the next version of the array API standard here: data-apis/array-api#425
So, we may want to follow something similar to whatever they decide on there, if feasible.
* use a ufunc workunit dispatcher to improve
concision of the ufunc code for these ufuncs,
as an initial demonstration:
- `isfinite()` (`parallel_for`)
- `equal()` (`parallel_for`)
- `isinf()` (`parallel_for`)
- `matmul()` (`parallel_reduce`)
- `reciprocal()` (`parallel_for`)
* the reduction in LOC is around: 250
* the changes do not guarantee identical behavior
beyond the testsuite passing, so for example
error handling behavior may not be fully preserved
* our type system still needs a cleanup to make
things more consistent per kokkosgh-80
Currently we're checking view datatypes in ufuncs using string comparison (e.g. here). The reasons are explained in Tyler's comment here. This can break quite easily later and is also not desirable for performance reasons.
Additionally, ufuncs with two operands only allow specific combinations of types (e.g. here), when they should be less restrictive in what combinations of types are allowed. As mentioned in Tyler's comment, we want to have a system for type promotion.
The text was updated successfully, but these errors were encountered: