SOL provides a series of debug and visualization features.
SOL’s generated code can be debugged by setting:
sol.config["jit::debug"]=True
For Python based frameworks you can then execute the following series of commands:
gdb python3
run myscript.py
or run interactively
gdb python3
run
# starting from here the Python console will be active.
# use CTRL+C to switch back to GDB
import framework
import sol
model = init_model()
sol_model = sol.optimize(...)
Option | Description |
---|---|
sol.config["compiler::debug"]=True |
plots the input CG, and a separate CG for every device and execution pass. |
sol.config["compiler::debug_params"]=True |
adds also parameter and copy nodes to the output. All plots are in SVG format and stored in $CWD/.sol/debug . |
sol.config["compiler::name"]="string" |
Can be used to assign a name to the debug output. |
sol.config["compiler::debug_text"]=True |
Generates a textual representation of your computation graph, in case your graph is too complex. |
sol.config["compiler::debug_memory_consumption"]=True
plots the memory consumption for all devices and execution passes in $CWD/.sol/debug/*_memory.svg
.
Colors:
Labels: