cutlass
cutlass copied to clipboard
Add print_svg for mma
Cute provides a utility called print_latex
for visualizing layouts, which can aid in designing layouts for GEMM problems. However, utilizing LaTeX is not straightforward due to several reasons:
- LaTeX files must be compiled into PDF format before they can be utilized.
- LaTeX tools are not commonly installed in many Linux environments, and the installation process can be resource-intensive, requiring significant disk space and numerous dependencies.
- While online LaTeX platforms(like overleaf) can assist in setting up the environment, they come with limitations, such as restrictions on compilation time.
- By default, LaTeX struggles to handle large graphs with numerous nodes efficiently, often resulting in errors such as "TeX capacity exceeded, sorry [main memory size=5000000]." This issue arises, for instance, when dealing with a 128x32x32 tiled mma.
SVG is a widely adopted file format that can be opened using popular web browsers. I have developed the print_svg
function and tested it using Chrome version 127.0.6533.120 and Safari version 17.5. This function achieves the same visualization goals as LaTeX but without its associated challenges. I have attached several results for your reference.