Skip to content

Transforms are incompatible with functorch #80

@thelostscout

Description

@thelostscout

When using the GlobalInternalCoordinateTransform together with functorch (more specifically jacrev), I encountered a lot of incompatibilities.
Some things I found that are incompatible:

  1. calling requires_grad_(True) on tensors that already require gradients (haven't tried it for tensors without). E.g. in init_ics2xyz in ic_helper.py
  2. calling torch.any, e.g. in dist_deriv in ic_helper.py
  3. inplace arithmetics, e.g. in _rotmat3x3 in ic_helper.py

It seems like mainly ic_helper.py being the issue.

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