ThrudPrimrose / dace

DaCe - Data Centric Parallel Programming
http://dace.is/fast
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Error in Extracting Kernels #4

Open ThrudPrimrose opened 5 days ago

ThrudPrimrose commented 5 days ago

Describe the bug I cant extract many kernels of velocity tendencies because of the following error: I use the following function to cut out kernels, where I call the following function for every GPU_Device scheduled map.

def _copy_sub_scope(state: dace.sdfg.SDFGState, scope_entry: dace.nodes.MapEntry):
    nn = []
    for n in state.bfs_nodes(scope_entry):
        if n == state.exit_node(scope_entry):
            break
        nn.append(n)

    cut_sdfg = SDFGCutout.singlestate_cutout(state, *nn)
    return cut_sdfg

The error I get is: Extract kernel: T_l2716_c2728_gmap[T_l2716_c2728gmapi=0] ( T_l2716_c2728_gmap[T_l2716_c2728__gmapi=0] ) Error in extracting and profiling kernel: T_l2716_c2728_gmap[T_l2716_c2728gmapi=0] ( T_l2716_c2728_gmap[T_l2716_c2728__gmapi=0] ) Error: 'NestedDict does not support setting nested keys'

Could it be related to structs? I am going to create a better minimally reproducible example with one of the kernels that fail and provide more details.

ThrudPrimrose commented 5 days ago

The detailed error message:

Extract kernel:  T_l224_c228_gmap[T_l224_c228__gmapi=0] ( T_l224_c228_gmap[T_l224_c228__gmapi=0] )
Traceback (most recent call last):
  File "/home/primrose/Work/IconGrounds/auto_profile.py", line 11, in <module>
    profile_results = auto_profile.auto_profile(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/primrose/Work/forkdace/dace/transformation/auto_tile/auto_profile.py", line 59, in auto_profile
    kernel_sdfg = auto_tile_util._copy_sub_scope(state, node)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/primrose/Work/forkdace/dace/transformation/auto_tile/auto_tile_util.py", line 23, in _copy_sub_scope
    cut_sdfg = SDFGCutout.singlestate_cutout(state, *nn)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/primrose/Work/forkdace/dace/sdfg/analysis/cutout.py", line 217, in singlestate_cutout
    cutout.add_datadesc(memlet.data, new_desc)
  File "/home/primrose/Work/forkdace/dace/sdfg/sdfg.py", line 2014, in add_datadesc
    self._arrays[name] = datadesc
    ~~~~~~~~~~~~^^^^^^
  File "/home/primrose/Work/forkdace/dace/sdfg/sdfg.py", line 63, in __setitem__
    raise KeyError('NestedDict does not support setting nested keys')
KeyError: 'NestedDict does not support setting nested keys'

In the viewer all of the direct inputs (views, light blue) have float64 datatype. gpu_p_init and gpu_p_prog are pointers.

The kernel looks like this: image