cutcutcodec.core.compilation.sympy_to_torch

The folowing optimisations are performed.

  • Compute in place as possible.

  • Compatible with gpu input tensor.

  • Conserve the type: float32, float64 or complex.

  • Factorisation of redondant patern for minimizing operations.

  • Cached the constants paterns.

  • Prealocate the internal tensors taken in account the broadcasting of shapes.

Modules

dynamic

Torch dynamic evaluation of atomic sympy expression.

lambdify

Convert a sympy expression into a torch function.

preprocess

Prepare the work for the Printer, decompose and analyse.

printer

Static C compilation of atomic sympy expression.