I don't see any use of this import?
This is the same as
I couldn't find any thing in the style guide that says which one is preferable. But there are examples for the style I mentioned in the style guide and I couldn't find an example for the style used here.
Similar to the previous comment, these can be
from mlir.dialects import sparse_tensor as st
This comment is for the import grouping. I couldn't find anything from the google python guide, but I found something from https://www.python.org/dev/peps/pep-0008/#imports
Imports should be grouped in the following order:
Standard library imports.
from mlir.dialects.linalg.opdsl import lang
I though about that, but then
A=TensorDef(T, S.M, S.K), B=TensorDef(T, S.K, S.N), C=TensorDef(T, S.M, S.N, output=True)): C[D.m, D.n] += A[D.m, D.k] * B[D.k, D.n]
loses a lot of its charm, since T, S, etc. need prefix
I understand that you want to import the individual types to simplify the use syntax, but python style guide says this:
Use import statements for packages and modules only, not for individual classes or functions. Imports from the typing module, typing_extensions module, and the six.moves module are exempt from this rule.
There seems to be various style guides floating around, and they all say slightly different things.
I like the concise syntax as well. I am fine with what you have right now, or adding a comment to this import and use the concise syntax.
from mlir.dialects.linalg.opdsl.lang import *