Skip to content

Commit

Permalink
Completely drop ukernel path
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Li <me@alanli.org>
  • Loading branch information
lialan committed Jun 10, 2024
1 parent d205f16 commit 5d2e553
Showing 1 changed file with 0 additions and 92 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,98 +114,6 @@ enumerateMatmulTileArm64(TypeRange elementTypes, ExecutableTargetAttr target) {
}
}

if (hasUkernel(target) && lhs.isSignlessInteger(8) &&
rhs.isSignlessInteger(8) && out.isSignlessInteger(32)) {
if (hasFeature(target, "+i8mm")) {
return {
TileMxNxK{8, 8, 8}, // Aim to use SMMLA.
TileMxNxK{4, 8, 8}, // Truncation of the above.
TileMxNxK{2, 8, 8}, // Truncation of the above.
TileMxNxK{1, 8, 8}, // Truncation of the above.
};
}
if (hasFeature(target, "+dotprod")) {
return {
TileMxNxK{8, 8, 4}, // Aim to use SDOT.
TileMxNxK{4, 8, 4}, // Truncation of the above.
TileMxNxK{2, 8, 4}, // Truncation of the above.
TileMxNxK{1, 8, 4}, // Truncation of the above.
};
}
}

if (hasUkernel(target) && lhs.isSignlessInteger(8) &&
rhs.isSignlessInteger(4) && out.isSignlessInteger(32)) {
if (hasFeature(target, "+i8mm")) {
return {
TileMxNxK{4, 8, 16},
TileMxNxK{2, 8, 16},
TileMxNxK{1, 8, 16},
};
}
if (hasFeature(target, "+dotprod")) {
return {
TileMxNxK{8, 8, 8},
TileMxNxK{4, 8, 8},
TileMxNxK{2, 8, 8},
TileMxNxK{1, 8, 8},
};
}
return {
TileMxNxK{4, 16, 2},
TileMxNxK{2, 16, 2},
TileMxNxK{1, 16, 2},
};
}

if (!hasUkernel(target)) {
if (lhs.isSignlessInteger(8) && rhs.isSignlessInteger(8) &&
(out.isSignlessInteger(32) || out.isF32())) {
if (out.isSignlessInteger(32) && hasFeature(target, "+i8mm")) {
return {
TileMxNxK{8, 8, 8}, // Aim to use SMMLA.
TileMxNxK{4, 8, 8}, // Truncation of the above.
TileMxNxK{2, 8, 8}, // Truncation of the above.
TileMxNxK{1, 8, 8}, // Truncation of the above.
};
}

// Default.
return {
TileMxNxK{8, 8, 1}, // Aim to use SMLAL.
TileMxNxK{4, 8, 1}, // Truncation of the above.
TileMxNxK{2, 8, 1}, // Truncation of the above.
TileMxNxK{1, 8, 1}, // Truncation of the above.
};
}
if (lhs.isSignlessInteger(8) && rhs.isSignlessInteger(4) &&
(out.isSignlessInteger(32) || out.isF32())) {
if (out.isSignlessInteger(32) && hasFeature(target, "+i8mm")) {
return {
TileMxNxK{4, 8, 16}, // SMMLA
TileMxNxK{2, 8, 16}, // Truncations
TileMxNxK{1, 8, 16}, // Truncations
};
}

if (out.isSignlessInteger(32) && hasFeature(target, "+dotprod")) {
return {
TileMxNxK{8, 8, 8}, // SDOT
TileMxNxK{4, 8, 8}, // Truncations
TileMxNxK{2, 8, 8}, // Truncations
TileMxNxK{1, 8, 8}, // Truncations
};
}

// Default.
return {
TileMxNxK{4, 16, 2}, // Aim to use SMLAL.
TileMxNxK{2, 16, 2}, // Truncation of the above.
TileMxNxK{1, 16, 2}, // Truncation of the above.
};
}
}

// Fallback - no architecture-optimized tile size for this case.
return {};
}
Expand Down

0 comments on commit 5d2e553

Please sign in to comment.