ekalda commented on code in PR #10862:
URL: https://github.com/apache/tvm/pull/10862#discussion_r847230101


##########
python/tvm/relay/backend/contrib/ethosu/codegen.py:
##########
@@ -328,6 +330,48 @@ def constant_updater(expr, symbol):  # pylint: 
disable=unused-argument
     return dict()
 
 
+def _create_cascader(
+    options: CascaderOptions,
+    io_region: MemoryRegion,
+    constant_region: MemoryRegion,
+    working_regions: List[MemoryRegion],
+    device_config: EthosuDeviceConfig,
+) -> Callable:
+    def _cascader(te_graph, const_dict, sch):
+        cascade(
+            sch,
+            te_graph,
+            const_dict,
+            options,
+            io_region,
+            constant_region,
+            working_regions,
+            device_config,
+        )
+
+    return _cascader
+
+
+def _ethos_u55_cascader() -> Callable:
+    flash = MemoryRegion(name="FLASH", size=10 ** 7, read_bandwidth=4, 
write_bandwidth=4)
+    sram = MemoryRegion(name="SRAM", size=10 ** 6, read_bandwidth=16, 
write_bandwidth=16)

Review Comment:
   Done, with the caveat that we'll assume that there is one workspace pool in 
the system - is it ok to assume that for now or should we handle the case where 
there are several workspace pools where some of them are not accessible for the 
NPU?



-- 
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]

Reply via email to