-
Notifications
You must be signed in to change notification settings - Fork 52
Closed
Labels
Description
Which proposal does this relate to?
0035 - linalg::Matrix
Describe the issue or outstanding question.
The current list of unary operations provided by ApplyUnaryFunction and binary operations provided by Matrix class operators are not sufficient for activation and reduction functions. Furthermore, a programmable method would be preferred over a set of built-in functions.
The possible solutions could be:
- Preferred A
map(func, Matrix)function which takes a function reference as an argument. The arguments of the mapped function would provide row and col information, or an element index that can be converted to row and col through an intrinsic function. - A
Matrix::Lengthfunction, which returns the number of elements per-thread, for iterating over, along with aMatrix::operator[]for accessing the elements using a per-thread index. - Extend the current
enum class UnaryOperationwith additional unary operations (e.g.,sqrt,ceil,reciprocal,relu,sigmoid,tanh, etc.) and add aApplyBinaryOperationfunction withenum class BinaryOperation(e.g.,max,pow,atan2,hypot, etc.).
Option 1 provides the most flexibility and also enables additional use cases. While Option 3 is the most limiting for developers and requires constant updates to the specification.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Triaged
Status
Done