test_annotated_regions.py
3.8 KB
-
[RELAY] Added a AnnotatedRegion utility class (#5030) · b5ec0711
* [RELAY] Added an AnnotatedRegionSet utility class In many of the passes involved in graph partitioning, we need to extract and manipulate annotated regions. This class simplifies the extraction of regions from a relay expression containing region begin and end annotations as well as providing utility functions to query these regions and merge them. Co-authored-by: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> Change-Id: Ia912fea0b99f64b6a7197aa6da2347e58f469fbb * Rename fix * Update MakeRegions * Fix __init__ * Indentation * Code style * Remove 'Region' from docs * Overload [] to get region * Use src/dest for MergeRegions * Simplify merge * Tidy const loop vars
mbaret committed