A valid installation of DaCe is required. The minimum supported version is 0.13.1.
This tool requires Python 3.8 or later to be installed.
There are two modes of verification available:
- One-Shot verification of a single transformation instance (see xfuzz)
- Broad verification of all instances of a given transformation type on a given program (see xfuzzall)
To verify a single instance of a transformation, make sure you have:
- A JSON file containing the transformation to be verified
- An SDFG file with the program the transformation is supposed to operate on.
With both of these things, invoke the verification process using the following command:
python -m fuzzyflow.cli.xfuzz -p <PATH_TO_SDFG> -x <PATH_TO_TRANSFORMATION_JSON>
Note: For information on how to obtain transformation JSON files, see the Good To Know section.
A number of command line arguments can further be used to control the verification process:
argument | Details | Default |
---|---|---|
-r /--runs |
Controls the number of trials (i.e., runs with random inputs) | 200 |
-c /--cutout-strategy |
Control what strategy to use when extracting minimal program cutouts | SIMPLE |
-s /--sampling-strategy |
Control what strategy to use when sampling random inputs | SIMPLE_UNIFORM |
--data-constraints-file |
Path to a file containing constraints on data values | - |
--symbol-constraints-file |
Path to a file containing constraints on symbol values | - |
To verify every instance of a transformation on a given program, you need:
- An SDFG file with the program to check for transformation instances
- The string descriptor of a transformation. This is a 2-part string separated
by a
.
(e.g.:xfclass.xfname
). The first part (xfclass
) represents what class a transformation belongs to (one ofdataflow
,interstate
,subgraph
, orpasses
), and the second part (xfname
) represents the class name of that transformation (e.g.GPUTransformMap
).
Run the verification with the following command:
python -m fuzzyflow.cli.xfuzzall -p <PATH_TO_SDFG> -t <TRANSFORMATION_DESCRIPTOR>
You can additionally provide a path to an output folder via -o
/--output
.
This folder will be created when the verification procedure starts, and will be
used to dump information about any transformation instances that have failed
verification. Specifically, inside this folder, a new folder is created for
each instance of a transformation that fails verification. In each failed case,
the corresponding folder then contains:
- The SDFG cutout before applying the transformation
- The SDFG cutout after applying the transformation
- The transformation instance serialized into a JSON file
- A file containing the reason the verification failed
If no output path is provided, no information will be stored about instances that fail verification.
A number of command line arguments can further be used to control the verification process:
argument | Details | Default |
---|---|---|
-r /--runs |
Controls the number of trials (i.e., runs with random inputs) per instance | 200 |
-o /--output |
Provide a path to an output folder which will be newly created | - |
-c /--cutout-strategy |
Control what strategy to use when extracting minimal program cutouts | SIMPLE |
-s /--sampling-strategy |
Control what strategy to use when sampling random inputs | SIMPLE_UNIFORM |
--data-constraints-file |
Path to a file containing constraints on data values | - |
--symbol-constraints-file |
Path to a file containing constraints on symbol values | - |
--skip-n |
Skip the first N instances of the transformation | - |
--savepath |
Keep track of the current progress in a progressfile | - |
--restore |
Restore progress previously saved in a progressfile (provide the path via --savepath ) |
- |
Transformation JSON files can be obtained through the transformation's .to_json()
method or the DaCe serialization module, or through VSCode: