Skip to content

Mixing tensor & function tracing #14

Description

@mavenlin

There are operators that lead to hybrid jaxpr graphs made of both function nodes and jax.ShapedArray nodes. Examples are:

  1. operators.partial, this operator takes a GeneralArray and several args which are jax.ShapedArray, and create a partial function.
  2. operators.integrate, this operator takes a GeneralArray, when all the args are being integrated, the returning value is a scalar of jax.ShapedArray type.

There are some difficulties in supporting both in the same graph, because in the vjp graph, we may need to convert between GeneralArray and ShapedArray. In the partial case, the vjp needs to integrate the cotangent for all the args that are not bound, and evaluate the resulting function at the bound args. We may need to introduce special functions / operators like the delta function.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions