wweic commented on a change in pull request #5103: [Relay][ADT]Static Tensor
Array
URL: https://github.com/apache/incubator-tvm/pull/5103#discussion_r400880265
##########
File path: python/tvm/relay/prelude.py
##########
@@ -27,6 +27,538 @@
from . import op
+class StaticTensorArrayOps(object):
+ """Contains tensor array related ops for fixed rank tensor array"""
+
+ def __init__(self, prelude, dtype, shape):
+ """Create tensor array ops registry"""
+ self.prelude = prelude
+ self.dtype = dtype
+ self.shape = shape
+
+ def get_name(self, canonical):
+ """Get name corresponding to the canonical name"""
+ shape_str = str(self.shape).replace('[', '').replace(']', '')\
+ .replace('(', '').replace(')', '').replace(', ', '_')\
+ .replace(',', '')
Review comment:
maybe we should improve this a bit. can we use `'_'.join(self.shape)`?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services