Skip to content

Generalize MaxAndArgmax to all Commutative Operations and Datatypes and all Destination Tensor Sizes#334

Open
obilaniu wants to merge 34 commits into
Theano:masterfrom
obilaniu:smallredux
Open

Generalize MaxAndArgmax to all Commutative Operations and Datatypes and all Destination Tensor Sizes#334
obilaniu wants to merge 34 commits into
Theano:masterfrom
obilaniu:smallredux

Conversation

@obilaniu

@obilaniu obilaniu commented Jan 25, 2017

Copy link
Copy Markdown
Contributor

Added multiple new reduction ops, enumerated in enum ga_reduce_op, and also heavily refactored internally in preparation to add a generator for "small code model" kernels, which will be used for reductions with a small destination.

typedef enum _ga_reduce_op {
	GA_REDUCE_SUM,             /*        +        */
	GA_REDUCE_PROD,            /*        *        */
	GA_REDUCE_PRODNZ,          /*        * (!=0)  */
	GA_REDUCE_MIN,             /*      min()      */
	GA_REDUCE_MAX,             /*      max()      */
	GA_REDUCE_ARGMIN,          /*     argmin()    */
	GA_REDUCE_ARGMAX,          /*     argmax()    */
	GA_REDUCE_MINANDARGMIN,    /* min(), argmin() */
	GA_REDUCE_MAXANDARGMAX,    /* max(), argmax() */
	GA_REDUCE_AND,             /*        &        */
	GA_REDUCE_OR,              /*        |        */
	GA_REDUCE_XOR,             /*        ^        */
	GA_REDUCE_ALL,             /*     &&/all()    */
	GA_REDUCE_ANY,             /*     ||/any()    */
} ga_reduce_op;

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants