Open Stagno opened 4 years ago
Investigating this further i found out that the problem is that the dawn4py.compile
path was running pass groups in the defaultPassGroups()
: {PassGroup::SetStageName, PassGroup::StageReordering, PassGroup::StageMerger, PassGroup::SetCaches, PassGroup::SetBlockSize}
, while the dawn-opt
path was just lowering.
StageMerger
proved to be the problematic one because it generates local variables, not supported by cuda-ico
(https://github.com/MeteoSwiss-APN/dawn/issues/1030).
Still it remains that the 2 paths differ substantially in which groups they run and, since one would not expect that to happen, we should uniform them.
Decision taken was to also make dawn-opt
run the defaultPassGroups()
by default (without passing option --default-opt
), to reflect the expectation that usually compilers apply some optimizations by default.
Transforming this into a task.
Using the new dusk cli (https://github.com/dawn-ico/dusk/pull/49) the following problem with dawn occurred to me. Behaviors of these two commands, which should do the same thing before code generation, differ:
Specifically, it seems that the (default) passes run differ between the implementation of
dawn-opt
anddawn4py.compile
. Compilation is failing in thedawn4py.compile
path. This suggest that its set of default passes is wrong.