Skip to content
Discussion options

You must be logged in to vote

The issue is: you cannot pass a dynamic argument to a function which expects a static argument.

In your first example, jit(wrapper)(x, 1) results in start being treated as a dynamic variable, and so it cannot be passed to a function that requires a static input. There is no way for the inner jit to communicate to the outer jit which arguments should be static and which should not, and in my opinion it would not be desirable for the API to support that kind of "action at a distance". As they say, explicit is better than implicit, and so you must explicitly specify which arguments are static for each function you wrap in jit.

Does that make sense?

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by dfdx
Comment options

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

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