Skip to content
Snippets Groups Projects
Commit 4c04295d authored by Bhatu's avatar Bhatu
Browse files

Don't add clearmem calls for freeing scalars

parent 3a1af191
No related branches found
No related tags found
No related merge requests found
......@@ -888,8 +888,15 @@ class IRBuilderCSF(IRBuilderAST):
else:
assert False
# We don't need to clear scalars.
if node.op == AST.Operators.ClearMemSecret or node.op == AST.Operators.ClearMemPublic:
if Type.isInt(node.expr.type):
return (prog1, expr1)
if node.expr.type.dim == 0:
return (prog1, expr1)
argsList = OrderedDict()
inputType = node.expr.type
if Type.isTensor(inputType):
for ii, curDim in enumerate(inputType.shape):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment