[RELAY][BYOC] Add support for composite functions in BYOC (#5261)
* [RELAY] Add 'check' functions to MergeComposite
Currently, MergeComposite can only perform structural
matches. This patch introduces the ability to specify
a 'check' function alongside the pattern which can include
custom logic to determine whether an extracted pattern
should be merged.
For example, if you only want to merge 'NHWC' convolutions,
you can specify a 'check' function which queries the
data_layout value of the extracted pattern (see the test).
Change-Id: I9337ce39f10997051a286d888be38ed0d410d340
* [RELAY] Reformat merge_composite.cc
Run clang-format on merge_composite.cc
Change-Id: I1736bff798cc6d93e57519b08ab3362869098779
* [RELAY][BYOC] Support composite functions in AnnotateTarget
This patch introduces support to annotate composite functions
in the AnnotateTarget pass. In order for a composite function
to be annotated, you should name it according to the style:
{codegen}.{name}
eg. dnnl.add_relu
Change-Id: I74d6c0b506153d866f6d1feb203b32dad59f2871
Showing
Please
register
or
sign in
to comment