spcl/dace-vscode

Proposal: Interactive Optimization Workflow

Opened this issue · 0 comments

Working with Python and VSCode at the same time is currently not well-supported.

One of the main faults is the interaction between Python debugging/running of DaCe programs and VSCode. We previously proposed the DaCe debugger, but one can assume most people would not use it (requires switching back and forth with debug adapters). A new proposal thus emerges:

@dace.program(interactive=True)
def prog(...):
    ...

(or alternatively, with dace.interactive_optimization(): would apply it globally to any called DaCe program)

Any call would create a .dacecache/<program name>/vscode.port file, and open a small server that awaits commands from VSCode. If such a file is found (we listen to the filesystem anyway), it will override the current "should I display a new SDFG" and display it. In the meantime, dace will await one of the commands from VSCode (continue, profile, ...?) on the port written in the file, while the extension can optimize.

This will be in addition to the regenerate_sdfg, regenerate_code, and recompile arguments to @dace.program, and will override them. It implies no regeneration of SDFG after calling it.

Please feel free to amend or counter this proposal.