Skip to content

Commit

Permalink
Add clarifying comments based on code review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhar committed Nov 29, 2024
1 parent 4cc001f commit 9637295
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ struct MaterializeTuningSpecsPass final
transform::TransformDialect::kWithNamedSequenceAttrName,
UnitAttr::get(ctx));
linkedTuningSpec->insert(linkedTuningSpec->begin(), userTuningSpec.clone());

// TODO(https://github.com/iree-org/iree/issues/19214): Add linked tuning
// spec memoization to IREECodegenDialect. We should be able to provide a
// list of input libraries that may have already been linked and ask the
// dialect to return it to us, or invoke a callback that will insert it if
// not found.
FailureOr<transform::NamedSequenceOp> newEntrypoint =
linkTuningSpecs(linkedTuningSpec.get());
if (failed(newEntrypoint)) {
Expand Down
10 changes: 10 additions & 0 deletions compiler/src/iree/compiler/Codegen/Common/Passes.td
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,16 @@ def MaterializeEncodingIntoNopPass :
def MaterializeTuningSpecsPass : Pass<"iree-codegen-materialize-tuning-specs", "ModuleOp"> {
let summary =
"Load tuning spec transform dialect libraries and encode them in the module";
let description = [{
Links all available tuning spec transform dialect modules into a single
tuning spec. Next, serializes this tuning spec to bytecode and attaches it
as a module attribute. We do this so that the full tuning spec is always
encoded in the program IR and can be checked with `--mlir-print-ir-after-all`
(or equivalent).

This attribute is expected to be short-lived and removed by
`iree-codegen-materialize-user-configs`.
}];
}

def MaterializeUserConfigsPass : Pass<"iree-codegen-materialize-user-configs", "ModuleOp"> {
Expand Down

0 comments on commit 9637295

Please sign in to comment.