[RELAY] Added a AnnotatedRegion utility class (#5030)
* [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
Showing
src/relay/analysis/annotated_region_set.cc
0 → 100644
src/relay/analysis/annotated_region_set.h
0 → 100644
tests/python/relay/test_annotated_regions.py
0 → 100644
Please
register
or
sign in
to comment