Because people answered all the dialects they use, just looking at the cloud of dialects isn’t super helpful. Because some people answered for their groups while other for themselves, we have duplicated data. So, I wrote a small python script that uses https://networkx.org/ and looked at how connected the dialects really are.
Here’s the list of dialects in order of connectivity. This is how many people answered that they use these dialects together (edge weight), then summed up all edged from each dialect.
Most connected dialects:
[
(799, 'scf'), (706, 'arith'), (689, 'math'), (687, 'llvm'), (656, 'memref'),
(621, 'linalg'), (604, 'tensor'), (598, 'vector'), (544, 'cf'), (505, 'affine'),
(428, 'index'), (408, 'gpu'), (376, 'transform'), (371, 'buffer'), (248, 'omp'),
(171, 'amdgpu'), (137, 'nvvm'), (134, 'TOSA'), (131, 'emitc'), (125, 'shape'),
(121, 'pdl'), (101, 'nvgpu'), (97, 'ptr'), (95, 'complex'), (89, 'rocdl'),
(71, 'dlti'), (66, 'pdl_interp'), (58, 'ml_program'), (45, 'async'), (36, 'ub'),
(31, 'xegpu'), (28, 'mesh'), (21, 'sparse'), (15, 'mpi'), (10, 'x86vector'),
(3, 'poly'), (1, 'irdl'), (0, 'vcix')]
Of the top 10, the only one that isn’t a generic dialect (used by multiple different use-cases) is linalg
.
This is how each of those are connected to other dialects, sorted by weight:
Top 10 connectivity:
* 'scf': func llvm memref math tensor cf vector linalg affine gpu index buffer transform omp TOSA SPIR-V shape pdl rocdl ptr dlti pdl_interp async xegpu quant ArmSME x86vector arm_neon acc poly
* 'arith': scf llvm memref math cf tensor vector linalg gpu index transform omp TOSA SPIR-V pdl shape complex ptr dlti pdl_interp async xegpu mesh ArmSME arm_neon acc poly
* 'math': scf arith func llvm memref vector cf linalg affine gpu buffer index transform omp TOSA complex nvvm ptr nvgpu ml_program pdl_interp dlti async quant ArmSME sparse arm_neon acc poly
* 'llvm': scf arith memref math vector cf tensor affine linalg gpu index transform buffer omp nvvm nvgpu pdl TOSA ptr dlti async ArmSME sparse arm_neon x86vector acc amx
* 'memref': scf arith func llvm tensor math linalg vector cf gpu index transform omp SPIR-V pdl nvgpu nvvm ptr dlti xegpu quant mpi ArmSME arm_neon poly
* 'linalg': memref scf arith tensor func math llvm vector affine gpu buffer cf transform index TOSA omp pdl nvgpu nvvm ml_program dlti ptr xegpu ArmSME quant arm_neon ub poly
* 'tensor': scf arith memref func math vector linalg cf gpu transform index omp SPIR-V TOSA shape pdl nvvm complex ptr async xegpu quant sparse ArmSME mpi arm_neon amx
* 'vector': scf arith llvm func memref tensor cf linalg affine index buffer transform omp SPIR-V complex pdl nvvm ptr pdl_interp async xegpu quant sparse ArmSME mpi arm_neon amx
* 'cf': func scf llvm math memref vector affine linalg index buffer gpu transform omp complex pdl nvvm ptr pdl_interp dlti async ub quant ArmSME arm_neon acc poly
* 'affine': scf func memref llvm math tensor vector linalg gpu buffer transform index omp amdgpu pdl nvvm pdl_interp complex ptr quant ArmSME ub arm_neon acc
The linalg weights are:
Stats for dialect 'linalg':
[
(46, ('linalg', 'memref')), (45, ('linalg', 'scf')),
(44, ('arith', 'linalg')), (42, ('linalg', 'tensor')),
(41, ('func', 'linalg')), (39, ('linalg', 'math')),
(38, ('linalg', 'llvm')), (35, ('linalg', 'vector')),
(33, ('affine', 'linalg')), (32, ('gpu', 'linalg')),
(31, ('buffer', 'linalg')), (30, ('cf', 'linalg')),
(29, ('linalg', 'transform')), (25, ('linalg', 'index')),
(18, ('linalg', 'TOSA')), (15, ('linalg', 'omp')),
(12, ('linalg', 'pdl')), (11, ('linalg', 'nvgpu')),
(10, ('linalg', 'nvvm')), (9, ('linalg', 'ml_program')),
(8, ('linalg', 'dlti')), (7, ('linalg', 'ptr')),
(6, ('linalg', 'xegpu')), (5, ('linalg', 'ArmSME')),
(4, ('linalg', 'quant')), (3, ('linalg', 'arm_neon')),
(2, ('linalg', 'ub')), (1, ('linalg', 'poly'))]
Note: the order of the dialect in the tuple is an artifact of its alphabetical order in the list I ran on.
There’s an bulge there around the transform
dialect onwards. I’d call this the “linalg bundle”.
Some of those dialects we can decorrelate, because they’re obviously related in other forms. For example, linalg
uses func
, scf
, math
, arith
, cf
, gpu
and llvm
for lowering and payload. It also uses affine
for maps, mostly. Other usages (ex. front-ends) do too, for similar reasons.
This basically leaves: memref
, tensor
, vector
, bufferization
, transform
as strong correlation. index
, omp
, pdl
are weaker. Still in the same area, but also used elsewhere. The rest is specific to individual uses, it seems.
This is basically what we have been arguing to be the “Tensor Compiler” sub-group for a strong charter to design tensor compilers.
I am anonymizing the data I used to produce those results and will attach to this thread soon. But other correlations are needed for kernel codegen (Triton et al) and Front-ends (CIL, FIR) which are the other two largest sub-communities.