m1n1.utils: Hack to recognize NdRange even if a partial reload happened

Signed-off-by: Asahi Lina <lina@asahilina.net>
This commit is contained in:
Asahi Lina 2022-08-17 14:04:25 +09:00
parent 6f6073a531
commit 0cd85eb14b

View file

@ -853,7 +853,7 @@ class BaseRegMap(Reloadable):
width = rcls.__WIDTH__
rd = functools.partial(backend.read, width=width)
wr = functools.partial(backend.write, width=width)
if isinstance(addr, NdRange):
if type(addr).__name__ == "NdRange":
self._accessor[name] = RegArrayAccessor(addr, rcls, rd, wr, base)
else:
self._accessor[name] = RegAccessor(rcls, rd, wr, base + addr)