Skip to content

Commit

Permalink
remove code comment and format the code
Browse files Browse the repository at this point in the history
Signed-off-by: Bangtian Liu <[email protected]>
  • Loading branch information
bangtianliu committed Jan 3, 2025
1 parent 20d858b commit f679b93
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ emitLinkedTuningSpec(ModuleOp module, ArrayRef<NamedSequenceOp> specsToLink) {
0, hasConsumedSequences ? kArgConsumedAttrName : kArgReadOnlyAttrName,
builder.getUnitAttr());
newSpec->setAttr(kTuningSpecEntrypointAttrName, builder.getUnitAttr());
// As the newSpec is a named sequence operation with the symbol name
// '__kernel_config', the module should add the unit attribute
// 'iree_codegen.tuning_spec_with_default_entrypoint' to indicate this change.
module->setAttr(kTuningSpecDefaultEntrypointAttrName, builder.getUnitAttr());

Region &region = newSpec.getRegion();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,10 @@ IREECodegenDialect::verifyOperationAttribute(Operation *op,

if (symbol == kTuningSpecDefaultEntrypointAttrName) {
if (auto moduleOp = dyn_cast<ModuleOp>(op)) {
if (!llvm::any_of(moduleOp.getOps(), [](auto &op) {
if (auto namedSeqOp = dyn_cast<transform::NamedSequenceOp>(&op)) {
return namedSeqOp.getName() == kKernelConfigSpecName;
}
return false;
})) {
if (!llvm::any_of(moduleOp.getOps<transform::NamedSequenceOp>(),
[](transform::NamedSequenceOp op) {
return op.getName() == kKernelConfigSpecName;
})) {
return moduleOp.emitError()
<< "The tuning specification must include a named "
"sequence with the symbol name '"
Expand Down
2 changes: 1 addition & 1 deletion docs/website/docs/reference/tuning.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ that conform to the following format:
* All entry points in the final tuning specs must either read
(`transform.readonly`) or consume (`transform.consumed`) the argument.
* The `iree_codegen.tuning_spec_with_default_entrypoint` attribute ensures that
the tuning spec includes a named sequence op marked with `__kernel_config`.
the tuning spec includes a named sequence op with name `__kernel_config`.

The tuning spec above attempts to match `linalg.generic` ops that correspond to the
matmul operation with the RHS operand transposed (a.k.a. mmt) of shape
Expand Down

0 comments on commit f679b93

Please sign in to comment.