Skip to content

Commit

Permalink
Faster Call for CompiledSDFG (spcl#1467)
Browse files Browse the repository at this point in the history
This PR adds a new possibility how a `CompiledSDFG` can be called.

Before `__call__()` performed a lot of operations, which can be
summarized as:
- Ensuring that the arguments are ordered correctly.
- Transforming them to the right type (`ndarray` to pointers).

Especially when benchmarking smaller SDFG this is a lot of overhead,
which actually dominates the execution.
Furthermore, the runtime heavily depends on the number of arguments.

To solve this, this PR introduces the `_fast_call()` function, which
expects that its arguments are already in the right order and casted to
the right type.
In addition it does some refactoring and splits `_construct_args()` into
multiple parts.

---------

Co-authored-by: Philip Mueller <[email protected]>
Co-authored-by: Tal Ben-Nun <[email protected]>
  • Loading branch information
3 people authored Jan 4, 2024
1 parent 1393cb0 commit bfe6923
Showing 1 changed file with 142 additions and 86 deletions.
Loading

0 comments on commit bfe6923

Please sign in to comment.