2023-04-15 11:19:34 +08:00
|
|
|
# PyCUTLASS Examples
|
|
|
|
|
|
|
|
**NOTE:** This directory contains examples for PyCUTLASS, a Python library providing low-level
|
|
|
|
building blocks for emitting CUTLASS C++ kernels. For examples using CUTLASS's Pythonic interface,
|
|
|
|
see the [examples/python](/examples/python) directory.
|
|
|
|
|
|
|
|
Two types of examples are provided:
|
2022-11-19 22:02:15 +08:00
|
|
|
* _Basic examples_: minimal examples that illustrate how to set up GEMMs, convolutions, and grouped GEMM operations
|
|
|
|
* [_Customizable examples_](customizable): examples that allow one to specify a variety of template parameters for the given kernel
|
2022-09-04 06:48:46 +08:00
|
|
|
|
2022-11-19 22:02:15 +08:00
|
|
|
## Setting up the Python interface
|
2023-04-15 11:19:34 +08:00
|
|
|
Please follow the instructions [here](/python/README.md#installation) to set up the PyCUTLASS.
|
2022-09-04 06:48:46 +08:00
|
|
|
|
2022-11-19 22:02:15 +08:00
|
|
|
## Running examples
|
|
|
|
Each of the basic examples can be run as follows:
|
2022-09-04 06:48:46 +08:00
|
|
|
```shell
|
2022-11-19 22:02:15 +08:00
|
|
|
# Run the GEMM example
|
|
|
|
python gemm.py
|
2022-09-04 06:48:46 +08:00
|
|
|
|
2022-11-19 22:02:15 +08:00
|
|
|
# Run the Conv2d example
|
|
|
|
python conv2d.py
|
2022-09-04 06:48:46 +08:00
|
|
|
|
2022-11-19 22:02:15 +08:00
|
|
|
# Run the grouped GEMM example
|
|
|
|
python gemm_grouped.py
|
2022-09-04 06:48:46 +08:00
|
|
|
```
|
2022-09-13 09:26:30 +08:00
|
|
|
|
2022-11-19 22:02:15 +08:00
|
|
|
To run the customizable examples, refer to the README in the [customizable](customizable) directory.
|