Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add
static_argnames
option to qjit #1158Add
static_argnames
option to qjit #1158Changes from 7 commits
d83ec15
9e24d71
127df24
8d8919a
0ce2c9a
54c3972
002a08b
f3ea8a8
0aef4ab
34a418c
a662cdb
8467aa3
226f1a2
bf05ee6
7e80645
2c82559
9506021
574cc25
a3d6321
a34cca3
7e5faf4
522be57
daa12ce
bd4125d
a2e793f
7657985
771f2fb
cf5a031
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paul0403 have you tested that it works with different combinations of defining and calling functions? E.g.,
*
and/
in the signatureThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Through testing this I realized currently
static_argnums
do not support calls with default arguments (this is on main):Note that jax works:
I don't think this is an issue with
static_argname
. I propose we open a separate issue to fix it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks @paul0403! My intuition was that this is worth testing as edge cases/bugs like this might appear :)
If this affects
static_argnum
, and would be resolved here oncestatic_argnum
is fixed, I am okay opening a separate issue to fix it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I think none of the more complicated patterns work, but not because of
static_argname
, but because they never worked withstatic_argnum
to begin with.One particular case was handed out as an assessment: #1163 . In the issue I documented the failure. The apparent failure is in a verification, but I am not sure whether this means (a) the underlying mechanism is buggy and the verification failed as a by-product, or (b) the underlying mechanism is ok, but the verification itself is overly strict.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@josh146 I suggest we finish the simple base case of
static_argnames
for release, since the other failed cases were already there withstatic_argnums
as well.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that works for me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paul0403 if you haven't already, would you be able to open an issue detailing the more advanced cases that don't work with
static_argnums
? #1158 (comment)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already did, and actually we sent this out as an assessment! #1163
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(As far as I can tell, the default value issue seems like the root cause of all other patterns' failures.)