Add `static_argnames` option to qjit
Context:
Adding a static_argnames option to qjit for users to configure static arguments by name.
Description of the Change:
Under the hood, this just maps the static_argnames to their argument indices and add to static_argnums.
Benefits: Users can specify static arguments to jitted functions by name.
Possible Drawbacks: Even more keyword arguments to qjit...
[sc-41335]
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 97.96%. Comparing base (
d7c7e39) to head (cf5a031). Report is 201 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #1158 +/- ##
=======================================
Coverage 97.96% 97.96%
=======================================
Files 77 77
Lines 11244 11263 +19
Branches 967 972 +5
=======================================
+ Hits 11015 11034 +19
Misses 180 180
Partials 49 49
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I would replace the tests with lit tests that don't execute the function. They are quicker.
I would replace the tests with lit tests that don't execute the function. They are quicker.
34a418c9b233c993ac5330261f70c4a3f2872d37
Another integration test we might want to consider is with decorators (like vmap, qnode, grad, etc), since this functionality inspects the function signature, there is a chance decorators might not propagate this info properly.
Another integration test we might want to consider is with decorators (like vmap, qnode, grad, etc), since this functionality inspects the function signature, there is a chance decorators might not propagate this info properly.
Really conveniently, inspect module has a inspect.signature(), which can take in any callable, not just plain functions.
https://github.com/PennyLaneAI/catalyst/pull/1158/commits/7e80645356ea314c4374d9e48f95f6581f76a7e6