Skip to content

Multiple active arguments? #508

Closed
Closed
@gdalle

Description

@gdalle

With v0.6, DI supports any number of context arguments (constants or caches), but only a single active argument x (which comes first).
The last step to full generality is support for any number of active arguments. This would improve performance e.g. with Enzyme, and also (apparently) avoid some differentiation errors.

The issue is that for multiple active arguments, every operator output must become a tuple instead of a single object. In addition to being another breaking change, that might slow down backends which do not support multiple arguments.

My workaround idea for now is:

  1. force the first argument to always be active
  2. if there are no other active arguments (easy to check by constraining the Vararg), return single objects
  3. otherwise, return tuples

Related past discussions:

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreRelated to the core utilities of the package

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions