dace.cli package
dace.cli.sdfgcc module
Simple SDFG command-line compiler.
- dace.cli.sdfgcc.main()
dace.cli.sdfv module
SDFG visualizer that uses Jinja, HTML5, and Javascript.
- dace.cli.sdfv.main()
- dace.cli.sdfv.partialclass(cls, *args, **kwds)
- dace.cli.sdfv.view(sdfg, filename=None)
View an sdfg in the system’s HTML viewer
- Parameters:
sdfg (
SDFG
) – the sdfg to view, either as dace.SDFG object or a json stringfilename (
Union
[str
,int
,None
]) – the filename to write the HTML to. If None, a temporary file will be created. If an integer, the generated HTML and related sources will be served using a basic web server on that port, blocking the current thread.
dace.cli.daceprof module
A command-line tool that provides performance measurements and analysis on Python scripts, modules, or existing instrumentation report files.
- dace.cli.daceprof.enable_hooks(args)
- Return type:
List
[int
]
- dace.cli.daceprof.main()
- dace.cli.daceprof.parse_arguments()
- Return type:
Namespace
- dace.cli.daceprof.print_report(args, reportfile)
- dace.cli.daceprof.run_script_or_module(args)
Runs the script or module and returns the report file.
- Parameters:
args (
Namespace
) – The arguments with whichdaceprof
was called.- Return type:
Tuple
[Optional
[InstrumentationReport
],Optional
[str
],Union
[int
,str
]]- Returns:
A tuple of (report file name if created, exit code of original program)
- dace.cli.daceprof.save_as_csv(args, report)
- dace.cli.daceprof.validate_arguments(args)
- Return type:
Optional
[str
]
dace.cli.progress module
Progress bar command line interface.
- class dace.cli.progress.OptionalProgressBar(n, title=None, progress=None, time_threshold=5.0)
Bases:
object
Creates a progress bar for lengthy processes, depending on the time spent between successive calls to
next()
.- done()
Closes the progress bar, if it was opened.
- next()
Advances the progress bar. If visible, shows progress, otherwise updates in the background. If the time threshold has passed and the progress bar should appear, this method creates it.
- restart()
Restarts the timer and closes any existing progress bar.
- dace.cli.progress.optional_progressbar(iter, title=None, n=None, progress=None, time_threshold=5.0)
Creates a progress bar for lengthy processes, depending on the time spent iterating over the generator.
- Parameters:
iter (
Generator
[TypeVar
(T
),None
,None
]) – The original generator to iterate over.title (
Optional
[str
]) – An optional title for the progress bar.n (
Optional
[int
]) – An optional length (number of elements in the generator).progress (
Optional
[bool
]) – A boolean stating whether to always show progress (True), never (False), or depending on the DaCe configuration and time spent (seetime_threshold
).time_threshold (
float
) – Time (in seconds) specifying how long to wait before showing the progress bar.
- Return type:
Generator
[TypeVar
(T
),None
,None
]
dace.cli.dacelab module
- dace.cli.dacelab.compile(inputfile)
- dace.cli.dacelab.main()