Skip to content

Commit

Permalink
Fix parent struct allocation wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
phschaad committed Oct 30, 2024
1 parent dbe1ae2 commit b4712f6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dace/sdfg/infer_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,11 @@ def set_default_schedule_and_storage_types(scope: Union[SDFG, SDFGState, nodes.E
if not desc.transient and scope.parent_sdfg is not None:
desc.storage = _get_storage_from_parent(aname, scope)
elif ((desc.transient or scope.parent_sdfg is None) and desc.storage == dtypes.StorageType.Default):
# Indeterminate storage type, set to register
desc.storage = dtypes.StorageType.Register
# Indeterminate storage type, set to register, or CPU Heap for structures.
if isinstance(desc, data.Structure):
desc.storage = dtypes.StorageType.CPU_Heap
else:
desc.storage = dtypes.StorageType.Register
return

# Setup arguments
Expand Down

0 comments on commit b4712f6

Please sign in to comment.