NicolaLancellotti commented on a change in pull request #10344:
URL: https://github.com/apache/tvm/pull/10344#discussion_r816961419
##########
File path: python/tvm/relay/backend/contrib/ethosu/tir_to_cs_translator.py
##########
@@ -398,11 +398,11 @@ def assign_addresses(buffer_info, npu_ops,
scratch_region_map):
def replace_npu_fm_with_address(npu_fm):
assert isinstance(npu_fm.tiles.addresses[0], tvm.tir.Load)
- # We currently does not support tiles
- # Change this when tiles are needed
- # (i.e. when using rolling buffers)
- assert npu_fm.tiles.addresses[1:] == [0, 0, 0]
- npu_fm.tiles.addresses[1:] = [0, 0, 0]
+ for i in range(1, 4):
+ address = npu_fm.tiles.addresses[i]
+ if isinstance(address, tvm.tir.expr.Load):
+ address = address.index
+ npu_fm.tiles.addresses[i] = int(address)
Review comment:
The addresses are already correct, we have only to convert `IntImm` to
`int` and consider the case where the address is a `Load`.
--
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]