[Bugfix] Replace thread binding detector in LayoutInference Pass #31
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.
CPU support introduced a flag
skip thread bindinginto LayoutInference Pass, while it depends on buffer allocations to detect whether it's a cuda like device, which is not efficient and may introduce some bugs.This pull request includes significant changes to the
format.shandsrc/transform/layout_inference.ccfiles, focusing on removingclang-tidysupport and refactoring the layout inference logic. Below are the most important changes:Removal of
clang-tidysupport:format.sh: Removed the entire section related toclang-tidychecks, including the installation check, function definitions, and script logic for runningclang-tidyon files.Refactoring layout inference logic:
src/transform/layout_inference.cc: Replaced theAllocateCollectorclass withThreadBindingCollectorto focus on collecting thread bindings instead of memory allocations. Removed functions related to shared memory and local fragment checks.src/transform/layout_inference.cc: Updated theLayoutInferencefunction to useThreadBindingCollectorand simplified the logic to determine if thread partitioning should be skipped based on the presence of thread bindings.