From 8894f5acd1f045ae2539217ccff17ea364e71fda Mon Sep 17 00:00:00 2001 From: Jakub Kuderski Date: Wed, 4 Dec 2024 12:16:37 -0500 Subject: [PATCH] [Codegen][Tuner] Clarify tuning spec linking order. NFC. (#19370) This clarification was suggested in https://github.com/iree-org/iree/pull/19337#discussion_r1868494935. --- compiler/src/iree/compiler/Codegen/Common/Passes.h | 3 ++- compiler/src/iree/compiler/Codegen/Common/Passes.td | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/src/iree/compiler/Codegen/Common/Passes.h b/compiler/src/iree/compiler/Codegen/Common/Passes.h index 2938bdd87da5..83a8206b5869 100644 --- a/compiler/src/iree/compiler/Codegen/Common/Passes.h +++ b/compiler/src/iree/compiler/Codegen/Common/Passes.h @@ -56,7 +56,8 @@ void addEncodingToNopPasses(FunctionLikeNest &passManager); /// Links nested transform dialect tuning specs named sequences into a single /// entry point. Returns the new named sequence op (inserted into the `module`) /// that includes the nested tuning specs, or a null op when no nested named -/// sequences were found. +/// sequences were found. The order of inclusion is the same as the order in +/// which these nested tuning specs appear in the IR. FailureOr linkTuningSpecs(ModuleOp module); //------------------------------------------------------------------------------ diff --git a/compiler/src/iree/compiler/Codegen/Common/Passes.td b/compiler/src/iree/compiler/Codegen/Common/Passes.td index 5471c95b0cad..5571aba9b1e4 100644 --- a/compiler/src/iree/compiler/Codegen/Common/Passes.td +++ b/compiler/src/iree/compiler/Codegen/Common/Passes.td @@ -412,7 +412,7 @@ def LinkTuningSpecsPass : Pass<"iree-codegen-link-tuning-specs", "ModuleOp"> { let description = [{ Given a module with multiple nested tuning specs, introduce a new named sequence that includes all the other tuning spec entry points. The order of inclusion is the same - as the in which these nested tuning specs appear in the IR. + as the order in which these nested tuning specs appear in the IR. A tuning spec entry point is a `transform.named_sequence` op annotated with the `iree_codegen.tuning_spec` unit attribute. We require it to perform in-place op