Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Frontend] Support
static_argnums
(#476)
**Context:** Supporting ``static_argnums`` to identify which arguments are static. I **Description of the Change:** Introduce the ``static_argnums`` parameter to ``@qjit`` and add a mechanism to determine if the function needs to be recompiled when the static arguments are changed. **Benefits:** Users can pass custom objects to a function with ``@qjit``. The ``QJIT`` object also stores all previously compiled functions for different arguments. If the arguments are seen before, there is no need for re-compilation. **Possible Drawbacks:** The ``QJIT`` object will store all the previously compiled functions and require more space. The mechanism for recompilation is based on checking hash values, so there might be a possibility of collision. It also creates a new ``catalyst.utils.filesystem.WorkspaceManager`` for every new function. If we do not create a new ``WorkspaceManager``, the new function will not be properly compiled. I am not sure if I should modify anything related to it. **Related GitHub Issues:** closes #461 --------- Co-authored-by: Tzung-Han Juang <tzung-han.juang@mail.mcgill.ca> Co-authored-by: David Ittah <dime10@users.noreply.github.com>
- Loading branch information