| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[NFC] Switch to new pass generation tablegen definitions. (#4370) This commit completes the migration from the deprecated GEN_PASS_CLASSES to the new GEN_PASS_DEF infrastructure across all torch-mlir passes. Changes include: 1. Remove PassDetail.h files (deprecated pattern) - Deleted lib/Conversion/PassDetail.h - Deleted lib/RefBackend/PassDetail.h - Deleted lib/Dialect/Torch/Transforms/PassDetail.h - Deleted lib/Dialect/TorchConversion/Transforms/PassDetail.h - Deleted lib/Dialect/TMTensor/Transforms/PassDetail.h 2. Migrate conversion passes to GEN_PASS_DEF - Updated all passes in lib/Conversion/ to use #define GEN_PASS_DEF_* - Removed GEN_PASS_DECL from .cpp files (move to headers where needed) - Fixed includes and namespace declarations 3. Migrate dialect transform passes - Updated Torch, TorchConversion, and TMTensor transform passes - Properly scoped GEN_PASS_DEF in namespace blocks 4. Handle passes with options (TorchToStablehlo, TorchToTosa) - Added GEN_PASS_DECL_* to headers - Implemented default and convenience create functions - Used generated constructors via using BaseClass::BaseClass 5. Handle passes without options (RefBackend) - Removed manual create function implementations - Let tablegen auto-generate create functions - Added using declarations for Base classes in impl namespace 6. Fix backend type conversion passes - Added missing create functions in BackendTypeConversionPasses.cpp - Fixed namespace scoping issues 7. Fix missing namespace closures - Added proper closing namespace comments in Verify*BackendContract.cpp The migration maintains full backward compatibility while adopting the recommended LLVM pass infrastructure patterns. All passes now use the generated base classes and follow consistent patterns based on whether they have options defined in tablegen. This is the preparation for https://github.com/llvm/llvm-project/pull/166904 Signed-off-by: hanhanW <hanhan0912@gmail.com> --------- Signed-off-by: hanhanW <hanhan0912@gmail.com> | 9 个月前 | |
Re-organize project structure to separate PyTorch dependencies from core project. (#2542) This is a first step towards the structure we discussed here: https://gist.github.com/stellaraccident/931b068aaf7fa56f34069426740ebf20 There are two primary goals: 1. Separate the core project (C++ dialects and conversions) from the hard PyTorch dependencies. We move all such things into projects/pt1 as a starting point since they are presently entangled with PT1-era APIs. Additional work can be done to disentangle components from that (specifically LTC is identified as likely ultimately living in a projects/ltc). 2. Create space for native PyTorch2 Dynamo-based infra to be upstreamed without needing to co-exist with the original TorchScript path. Very little changes in this path with respect to build layering or options. These can be updated in a followup without commingling directory structure changes. This also takes steps toward a couple of other layering enhancements: * Removes the llvm-external-projects/torch-mlir-dialects sub-project, collapsing it into the main tree. * Audits and fixes up the core C++ build to account for issues found while moving things. This is just an opportunistic pass through but roughly ~halves the number of build actions for the project from the high 4000's to the low 2000's. It deviates from the discussed plan by having a projects/ tree instead of compat/. As I was thinking about it, this will better accommodate the follow-on code movement. Once things are roughly in place and the CI passing, followups will focus on more in-situ fixes and cleanups. | 2 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 9 个月前 | ||
| 2 年前 |