[Dev][TL] Add TL BaseScheduler and Library Generator #200
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several changes to the
bitblas
project, focusing on enhancing the library generation and wrapper functionality, as well as updating the module handling and optimization strategies. The key changes include the addition of a new wrapper for TileLang, updates to the library generation process, and the introduction of a base scheduler. These changes aim to improve code maintainability, extend functionality, and ensure better performance.Wrapper Enhancements:
TLWrapper
class inbitblas/builder/wrapper/tl.py
to support TileLang ([bitblas/builder/wrapper/tl.pyR1-R193](https://github.com/microsoft/BitBLAS/pull/200/files#diff-7a06aea7d0ad014e71fea5e2754bc701039d6257e0bf23ef7e420571e585a064R1-R193)
).TIRWrapper
to usescheduled_ir_module
instead ofoptimized_mod
for better clarity and consistency ([[1]](https://github.com/microsoft/BitBLAS/pull/200/files#diff-c10e48719ba0d10a0fd37550438b6d70f459a7b8fab7db66a460bbf5e5960fd5L51-R37)
,[[2]](https://github.com/microsoft/BitBLAS/pull/200/files#diff-c10e48719ba0d10a0fd37550438b6d70f459a7b8fab7db66a460bbf5e5960fd5L193-R179)
,[[3]](https://github.com/microsoft/BitBLAS/pull/200/files#diff-c10e48719ba0d10a0fd37550438b6d70f459a7b8fab7db66a460bbf5e5960fd5L390-R386)
).Library Generation:
compile_lib
method inbitblas/builder/lib_generator/__init__.py
to include an optionalwith_tl
parameter, enabling support for TileLang ([[1]](https://github.com/microsoft/BitBLAS/pull/200/files#diff-1cb4cef867511b586a5170e07b0b282d566ff7726909dab599c31c481db456c2L29-R30)
,[[2]](https://github.com/microsoft/BitBLAS/pull/200/files#diff-1cb4cef867511b586a5170e07b0b282d566ff7726909dab599c31c481db456c2L48-R64)
).os.path
asosp
to simplify path handling ([bitblas/builder/lib_generator/__init__.pyR7](https://github.com/microsoft/BitBLAS/pull/200/files#diff-1cb4cef867511b586a5170e07b0b282d566ff7726909dab599c31c481db456c2R7)
).Module Handling:
bitblas/cache/operator.py
to usescheduled_ir_module
instead ofoptimized_mod
when saving operator configurations ([bitblas/cache/operator.pyL111-R112](https://github.com/microsoft/BitBLAS/pull/200/files#diff-f8a4e09cbf6dfcad69926fd793e0d0e61ce69b4732bfa515c16fded27079b3c5L111-R112)
).bitblas/ops/general_matmul/__init__.py
to include a scheduler selection method and refactored backend handling ([[1]](https://github.com/microsoft/BitBLAS/pull/200/files#diff-74fe5dd2824cb03a0fb2b0a913a2fc5caeb9c08e5368c318cd32b3af7e6f52edL51-L55)
,[[2]](https://github.com/microsoft/BitBLAS/pull/200/files#diff-74fe5dd2824cb03a0fb2b0a913a2fc5caeb9c08e5368c318cd32b3af7e6f52edL360-R356)
,[[3]](https://github.com/microsoft/BitBLAS/pull/200/files#diff-74fe5dd2824cb03a0fb2b0a913a2fc5caeb9c08e5368c318cd32b3af7e6f52edL384-R379)
,[[4]](https://github.com/microsoft/BitBLAS/pull/200/files#diff-74fe5dd2824cb03a0fb2b0a913a2fc5caeb9c08e5368c318cd32b3af7e6f52edR575-R591)
).Optimization Strategies:
OptimizeStrategy
,TransformKind
, andBackendKind
enums inbitblas/ops/common.py
to standardize optimization strategies and transformations ([bitblas/ops/common.pyR1-R21](https://github.com/microsoft/BitBLAS/pull/200/files#diff-b4984b795537d5afdee6f0d9040991fbf45e129353e701f8e028b2085e7345a6R1-R21)
).TransformKind
inbitblas/gpu/matmul_mma.py
andbitblas/gpu/matmul_mma_dequantize.py
to use the new common module ([[1]](https://github.com/microsoft/BitBLAS/pull/200/files#diff-22e295329a3b938cfdeeb390d41cf0e088c65553911a3d0a2b13d6947b1a5894L11-R11)
,[[2]](https://github.com/microsoft/BitBLAS/pull/200/files#diff-4a893772b7972bd9794f2e7f8a6702f11a047da82505d431b7ad9d14fd9d98fdL12-R12)
).Base Scheduler:
BaseScheduler
class inbitblas/ops/base_scheduler.py
to provide a simplified interface for scheduling transformations ([bitblas/ops/base_scheduler.pyR1-R46](https://github.com/microsoft/BitBLAS/pull/200/files#diff-1ce8a161a5b58d85057d647e262724e64934c352b3199a7d085c40c1d70c296dR1-R46)
).