The following APIs are added to the Python FusionDefinition. They all return strings instead of printing to stdout so the python user can do what they want with the string output.
Scheduled Fusion IR
Gives a string for the scheduled Fusion IR with or without transforms for either the last scheduled fusion or for a specific set of inputs. Note, segmented fusions also print the segmented groupings to help the user understand what the scheduled Fusion IR represents.
Cuda Code
Gives a string for the Cuda Code for a fusion with or without the full intrinsic code required to execute the kernel for either the last scheduled fusion or for a specific set of inputs.
Resolves issue #2387 for @mruberry .
The following APIs are added to the Python
FusionDefinition
. They all return strings instead of printing tostdout
so the python user can do what they want with the string output.Example test case:
Fusion IR Gives a string for the unscheduled Fusion IR for a given definition. Example Usage:
Output:
Scheduled Fusion IR Gives a string for the scheduled Fusion IR with or without transforms for either the last scheduled fusion or for a specific set of inputs. Note, segmented fusions also print the segmented groupings to help the user understand what the scheduled Fusion IR represents.
Example Usages:
Output:
Cuda Code Gives a string for the Cuda Code for a fusion with or without the full intrinsic code required to execute the kernel for either the last scheduled fusion or for a specific set of inputs.
Example Usages:
Output: