This revision sketches how Linalg ops can be defined declaratively using a language like Tensor Comprehensions.
For now this does not invest more in the infrastructure than the bare minimum to demonstrate end-to-end op generation with Tablegen. At the moment the language is left unspecified and we only do basic string matching to a predefined C++ implementation.
In the longer term, a large fraction of ops can be written declaratively as custom ops with a single mathematical source of truth that resembles:
"C(i,j) +=! A(i,k) * B(k,j)"