Skip to content

Best practices when implementing custom rules #25732

Answered by dfm
ASKabalan asked this question in Q&A
Discussion options

You must be logged in to vote

Good question! The dream is (was?) to generally support mixing and matching these decorators, but (as you've probably worked out!) there are some rough edges with the current APIs, and such customization hasn't been widely exercised. For now, you're probably on the right track, but hopefully this will be easier in the future!

As for your specific question about custom_vmap. You typically want custom_vmap on the inside when it is combined with custom_vjp (see the new custom_vmap docstring for an example), which is the most common use case. I expect that you'll want something similar in your case.

Replies: 2 comments 1 reply

Comment options

dfm
Jan 6, 2025
Collaborator

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

Answer selected by ASKabalan
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants