Command-Line Utilities
DaCe provides a set of command-line utilities to simplify interaction with SDFGs and tools or workflows within the DaCe framework.
sdfgcc
- SDFG Command-line Compiler
The SDFG Command-line Compiler sdfgcc
enables compilation of SDFG files from the command-line.
sdfgcc [-o OUT] [-O] <filepath>
Argument |
Required |
Description |
---|---|---|
<filepath> |
Yes |
Path to the SDFG file to compile. |
|
If set, invokes the command-line optimization interface. |
|
|
If provided, saves the library as the given file or in the specified path, together with a header file. |
sdfv
- SDFG Viewer
The SDFG Viewer sdfv
displays SDFGs in the system’s HTML viewer. It reads an SDFG and creates a temporary
HTML file that contains a standalone viewer, which is then opened.
sdfv <filepath>
Argument |
Required |
Description |
---|---|---|
<filepath> |
Yes |
Path to the SDFG file to show. If a directory is
provided, the tool searches for a file called
|
daceprof
- Profiler and Report Viewer
The DaCe profiler is a versatile profiling and analysis tool that can provide performance results
and performance modeling for DaCe programs. Calling a Python script or module with daceprof
instead
of python
will profile/instrument each individual call to a DaCe program and print the latest
report at the end.
The tool can also be used to view a profiling report directly in the console with the -i
flag.
If --type
is given, performs instrumentation of specific elements in the invoked DaCe program. If
nothing is given, the tool will time the entire execution of each program using profile()
.
daceprof [ARGUMENTS] myscript.py [SCRIPT ARGUMENTS]
daceprof [ARGUMENTS] -m package.module [MODULE ARGUMENTS]
daceprof [ARGUMENTS] -i profile.json
Argument |
Required |
Description |
---|---|---|
Execution arguments |
||
<scriptpath> OR -m <modulepath> OR -i <filepath> |
Yes |
Path to the script file, report, or Python module. |
Profiling arguments |
||
|
Runs each profiled program for the specified number of repetitions (default: 100). |
|
|
Number of additional repetitions to run before measuring runtime (default: 0). |
|
|
Followed by |
|
|
A comma-separated list specifying which SDFG elements to
instrument. Can be a comma-separated list of element types
from the following: |
|
|
Disable CPU multi-threading in code generation. |
|
Data instrumentation |
||
|
Enable data instrumentation and store all (or filtered) arrays. |
|
|
Reproducibly run code by restoring all (or filtered) arrays. |
|
Filtering arguments |
||
|
Specifies a filter for elements to instrument. |
|
|
Specifies a filter for data containers to serialize. |
|
Report arguments |
||
|
Sort by a specific criterion. Choices are:
|
|
|
If given, sort in ascending order. |
|
|
If given, saves report in output path. |
|
|
Use Comma-Separated Values (CSV) for reporting. |
For a more detailed guide on how to profile SDFGs and work with the resulting data, see Profiling and Instrumentation and this tutorial.