-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for tiling of linalg.generic operations #609
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ae3743b
to
832063c
Compare
aPere3
reviewed
Nov 10, 2023
compilers/concrete-compiler/compiler/lib/Dialect/FHELinalg/Transforms/Tiling.cpp
Show resolved
Hide resolved
compilers/concrete-compiler/compiler/lib/Conversion/FHEToTFHECrt/FHEToTFHECrt.cpp
Outdated
Show resolved
Hide resolved
antoniupop
reviewed
Feb 5, 2024
...lers/concrete-compiler/compiler/tests/end_to_end_fixture/tests_cpu/end_to_end_fhelinalg.yaml
Show resolved
Hide resolved
antoniupop
approved these changes
Feb 7, 2024
compilers/concrete-compiler/compiler/lib/Conversion/Utils/Dialects/SCF.cpp
Outdated
Show resolved
Hide resolved
compilers/concrete-compiler/compiler/lib/Analysis/StaticLoops.cpp
Outdated
Show resolved
Hide resolved
60482c3
to
9c6fd08
Compare
0991f1c
to
bc65d30
Compare
…on MacOS The tests `end_to_end_leveled.jit.loop_dagmulti.mul_eint_10bits.0` and `end_to_end_leveled.jit.loop_dagmulti.signed_mul_eint_10bits.0` reproducibly fail on the mac2.metal instance used by the CI due to insufficient memory. This change disables all instances of these tests with 10 or more bits of precision on MacOS.
…ics passes This makes the trip counts of operations in the TFHE statistics pass as well as the per-location memory usage statistics in the memory usage statistics pass optional. These values are unset if the trip count could not be determined statically.
…r operations This adds a new pass that converts `scf.forall` loops into nested `scf.for` operations. The conversion carries parallel output tensors from the original loop as dependencies through the loop nest and replaces any occurrence of `tensor.parallel_insert_slice` operations in the `scf.forall.in_parallel` terminator with equivalent `tensor.insert_slice` operations.
…alect This adds an invocation of the `SCFForallToSCFFor` pass to the compilation pipeline before lowering to the LLVM dialect as a sequential fallback path to future passes exploiting the parallelism of `scf.forall` further up in the pipeline.
…nd scf.forall.in_parallel
…HE to Concrete pass
…HE parametrization
…E to TFHE passes
…HE key normalization pass
…erface for scf.forall
… pass Add the required patterns for `tensor.empty` and `scf.forall` to the TFHE circuit parametrization pass.
This adds support for the tiling of `linalg.generic` operations that have only parallel iterators or only parallel iterators and a single reduction dimension via the linalg tiling infrastructure (i.e., `mlir::linalg::tileToForallOpUsingTileSizes()` and `mlir::linalg::tileReductionUsingForall()`). This allows for the tiling of FHELinalg operations by first replacing them with appropriate `linalg.generic` oeprations and then invoking the tiling pass in the pipeline. In order for the tiling to take place, tile sizes must be specified using the `tile-sizes` operation attribute, either directly for `linalg.generic` operations or indirectly for the FHELinalg operation, e.g., "FHELinalg.matmul_eint_int"(%a, %b) { "tile-sizes" = [0, 0, 7] } : ... Tiling of operations with a reduction dimension is currently limited to tiling of the reduction dimension, i.e., the tile sizes for the parallel dimensions must be zero.
aPere3
approved these changes
Mar 14, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.