Leo-arm commented on a change in pull request #9386:
URL: https://github.com/apache/tvm/pull/9386#discussion_r738992046
##########
File path: python/tvm/relay/op/contrib/ethosn.py
##########
@@ -61,6 +61,49 @@ def partition_for_ethosn(mod, params=None, **opts):
-------
ret : annotated and partitioned module.
"""
+ if opts:
+ tops = opts.get("tops", None)
+ ple_ratio = opts.get("ple_ratio", None)
+ sram_size = opts.get("sram_size", None)
+ if tops or ple_ratio or sram_size:
+ raise ValueError(
+ "Setting tops, ple_ratio or sram_size has no effect when
targeting Ethos(TM)-N77"
+ )
+
+ if params:
+ mod["main"] = bind_params_by_name(mod["main"], params)
+
+ seq = tvm.transform.Sequential(
+ [
+ transform.InferType(),
+ transform.MergeComposite(pattern_table()),
+ transform.AnnotateTarget("ethos-n"),
+ transform.MergeCompilerRegions(),
+ transform.PartitionGraph(),
+ ]
+ )
Review comment:
Yes, I have noticed this too, but would suggest to do this as an
follow-on patch, amongst some other cleanup I want to do.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]