dace_executable
DaceExecutable
dataclass
Translate GT4Py-frozen parsed SDFG into an executable (dynamics lib) and its marshalled arguments for fast execution.
arguments = None
class-attribute
instance-attribute
Arguments as C-ready pointers
backend
instance-attribute
Backend the executable is build for
check_arguments_hash = True
class-attribute
instance-attribute
Hash arguments to figure if we need to recompute their C pointer. WARNING: turning this is off is very dangerous and should be used only when we are sure no external buffers will be swapped without DSL knowing
compiled_sdfg
instance-attribute
Loaded compiled SDFG. Allowed to be None only when using from_serialized_bundle
mode
instance-attribute
Orchestration mode the executable is built under
name
instance-attribute
DaCe program name
original_unoptimized_sdfg = None
class-attribute
instance-attribute
Optional: Unoptimized SDFG coming from GT4Py-frozen stencils + parsing.
performance_collector
instance-attribute
Performance timer used to time runtime operations (overhead and numerics)
from_serialized_bundle(bundle_dir, *, load_and_compile_optimized_sdfg=True, load_unoptimized_sdfg=True)
classmethod
Read a serialized bundle and ready the system for replay.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bundle_dir
|
str | Path
|
directory from which to read the bundle |
required |
load_and_compile_optimized_sdfg
|
bool
|
load and compile the optimized SDFG |
True
|
load_unoptimized_sdfg
|
bool
|
load unoptimized SDFG, saved before optimization was applied |
True
|
read_backend_from_bundle(bundle_dir)
classmethod
Read the Backend saved within a given DaceExecutable recording bundle
replay(*, bench_iterations=0)
Replay executable using last cached arguments
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bench_iterations
|
int
|
number of iterations for benching the code. When <=0 no benching is done |
0
|
run(dace_program, args, kwargs)
Execute the loaded executable with as little overhead as possible
serialize()
Serialize arguments and code for blind replayability using replay
Only serialize the rank 0