SIMD evolution plan (n-Dimensional vectors)

First of all, thanks for all your work on SIMD types.

This is probably a question for @scanon. I'd like to understand the course-level evolution timeline — as you see it — for vector types. Particularly of interest is library support for n-Dimensional vectors.

I think one of the unfortunate facts of the last 20 years of computing, is the (powerful) vector units in everyone's cores are sitting relatively idle (& GPUs!). I chalk this up to the obscure APIs that have left vector operations in dusty corners where only the deep DSP guys go. The more we can bring vector types into the light, make it easy to work with standard (shaped?)arrays, and make those operations are natural to typical developers (e.g. element-wise operators on array types)... the more we'll all win.

I think your efforts to date are an awesome start. Love to hear more detail about your vision for the future.


We built a general ShapedArray type in the Swift for TensorFlow library and hope to standardize it (move it out of TensorFlow to a repo if there's a good path).


Exactly what I had in mind!

wow, is it similar as numpy shapes in python?

wow, is it similar as numpy shapes in python?

Yes, ShapedArray is an n-dimensional array abstraction, like numpy.ndarray.

ShapedArray has a shape (dimensions represented as [Int]) and scalar values (contiguous in memory for efficiency). ShapedArray currently defines indexing/slicing operations but no math; math operations are separately defined on the Tensor type in the Swift for TensorFlow library.