Skip to content

Commit 1dae3ba

Browse files
committed
Removed alias leftovers
1 parent 8b31386 commit 1dae3ba

File tree

2 files changed

+4
-24
lines changed

2 files changed

+4
-24
lines changed

Deeploy/DeeployTypes.py

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -322,25 +322,7 @@ def __getstate__(self):
322322

323323
@classmethod
324324
def fromNode(cls, node: gs.Node):
325-
return (cls(
326-
name = node.name,
327-
shape = node.shape if not isinstance(node, gs.Constant) else node.values.shape,
328-
aliases = [],
329-
))
330-
331-
def get_aliases_of(self):
332-
"""
333-
Getter function for the aliases attribute.
334-
Returns
335-
-------
336-
List[str]
337-
List of names o all aliases of this VariableBuffer.
338-
"""
339-
340-
if hasattr(self, "aliases"):
341-
return list(self.aliases)
342-
else:
343-
return list()
325+
return (cls(name = node.name, shape = node.shape if not isinstance(node, gs.Constant) else node.values.shape))
344326

345327
def has_live_aliases(self, ctxt: NetworkContext) -> bool:
346328
"""Checks whether this VariableBuffer has any live aliases, i.e. buffers that are still live and are aliased by this buffer.
@@ -1150,11 +1132,7 @@ def parseOutputs(cls, ctxt: NetworkContext, node: gs.Node) -> NetworkContext:
11501132

11511133
for node, name in zip(outputNodes, outputNames):
11521134
if not ctxt.is_global(name):
1153-
nb = ctxt.VariableBuffer(
1154-
name = name,
1155-
shape = node.shape,
1156-
aliases = [],
1157-
)
1135+
nb = ctxt.VariableBuffer(name = name, shape = node.shape)
11581136
ctxt.add(nb, 'local')
11591137
else:
11601138
nb = ctxt.lookup(name)

Deeploy/Targets/PULPOpen/Templates/ReshapeTemplate.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ def alignToContext(self, ctxt: NetworkContext,
5656
# Link aliases to each buffer
5757
bufferIn.aliases.add(bufferOut.name)
5858
bufferOut.aliases.add(bufferIn.name)
59+
60+
# Linking required for tiling
5961
bufferOut._alias = bufferIn.name
6062

6163
return ctxt, operatorRepresentation, []

0 commit comments

Comments
 (0)