Skip to content

Avoiding scans by looping inside Ops? #1011

Discussion options

You must be logged in to vote

Regarding your basic question, yes, a custom Op will always work, but–as you've noticed–you'll need to implement your own gradients. While you're considering how to implement a gradient for an Op that represents a combination of existing Ops, try to notice when you're automatically applying simplifications to the resulting gradient based on the underlying expression. These simplifications are the essence of optimizing libraries like Aesara.

Making things work more generally (i.e. for many/most combinations of Ops), instead of implementing an endless number of overlapping Ops, is where a lot of the work in this project is focused, and arguably the reason it and projects like it exist. We c…

Replies: 3 comments 10 replies

Comment options

You must be logged in to vote
1 reply
@jessegrabowski
Comment options

Comment options

You must be logged in to vote
5 replies
@aseyboldt
Comment options

@jessegrabowski
Comment options

@aseyboldt
Comment options

@aseyboldt
Comment options

@jessegrabowski
Comment options

Comment options

You must be logged in to vote
4 replies
@jessegrabowski
Comment options

@brandonwillard
Comment options

@aseyboldt
Comment options

@brandonwillard
Comment options

Answer selected by jessegrabowski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested MWE needed This issue needs a minimum working example that demonstrates the issue request discussion Scan Involves the `Scan` `Op` performance concern
4 participants