Skip to content

Retire llvm-external-projects/iree-dialects dependency from IREE #24466

Closed

Description

@hanhanW

The llvm-external-projects was designed for better integration for other ecosystem (like the old sandbox project in other repo). Most of dialects are either moved to IREE's main codebase (e.g., LinalgExt, VectorExt, ect) or replaced with modern dialect (e.g., iree-input dialect is deleted).

There are remaining transformations and code in the dir, and I think we should be able to remove this old and outdated dir. The remaining work is:

Softmax Matcher

It is used by production path, i.e., RaiseSpecialOps in GlobalOptimization phase. We should be able to port what we need to the local pass. The estimation from LLM is ~200 LOC.

transform_ext::MatcherContext matcherContext;
transform_ext::StructuredOpMatcher *maxReduction;
transform_ext::StructuredOpMatcher *softmaxroot;
makeSoftmaxMatcher(matcherContext, maxReduction, softmaxroot);

Unused Matchers / Transform ops

There are 7 files in compiler/src/iree/compiler/Codegen/Common/test that use transform.iree.register_match_callbacks, transform.iree.match_callback, transform.iree.take_first, and transform.iree.emit_remark. These tests primarily cover the old iree-dialects callback matcher infrastructure.

Note: for the matchers that used in ROCm kernel specialization, it uses other matchers like in-tree transform.iree.match.* ops. So it is safe to drop them.

DropSchedulePass

We can move the generic transform schedule cleanup pass from llvm-external-projects/iree-dialects/lib/Dialect/LinalgTransform/Passes/DropSchedulePass.cpp into IREE main, preferably near compiler/src/iree/compiler/Codegen/Common/TransformDialectInterpreter.cpp. Update users in Common, SPIRV, LLVMGPU, iree-opt registration, and init_iree_dialects.h to include/use the in-tree pass.

ErrorCheckingTrackingListener

Update production users in compiler/src/iree/compiler/Codegen/Common/TransformExtensions/CommonExtensions.cpp and compiler/src/iree/compiler/Codegen/LLVMGPU/TransformExtensions/LLVMGPUExtensions.cpp. This should allow removing StructuredTransformOpsExtension includes from production code that only need the listener.

Activity

  1. self-assigned this
    on May 13, 2026
  2. added
    good first issue 🌱
    quality of life 😊
    on May 13, 2026
  3. Alex-Wengg commented on Jun 22, 2026

    @Alex-Wengg
    Contributor

    This issue is now resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

good first issue 🌱quality of life 😊

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions