microsoft / knossos-ksc

Compiler with automatic differentiation
Other
45 stars 10 forks source link

Test benchmark examples, fix 1x1 tensors #936

Closed awf closed 3 years ago

awf commented 3 years ago

We were failing equality checks in the benchmark because knossos returns scalars as scalars, and Python converts float32 to double. This fix wraps all scalars as 1x1 tensors, which is consistent with PyTorch.

New test fails before, and now passes.