If shape and device errors in your tensor code are causing you problems, check this out …
spidr, in alpha, is a tensor library that catches all shape errors before you run your code. For example, the compiler will reject this
prepend : Tensor [1, m] F64 -> Tensor [m, n] F64 -> Tensor [m, n + 1] F64
prepend x y = concat 1 x y
but accept this
prepend : Tensor [m, 1] F64 -> Tensor [m, n] F64 -> Tensor [m, 1 + n] F64
prepend x y = concat 1 x y
spidr’s not just special at compile time. It uses OpenXLA for serious speed, running on CPU, GPU and potentially more.
We have started work on vectorization and autodiff, and have long term plans for distributed computing, including compile-time checks that your tensors are on the devices you think they are.