mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-03 21:21:22 +00:00
Adding dispatcher architecture (#3300)
* WIP POC of dispatcher * Dispatcher python workflow setup. * Dispatcher cleanup and updates. Further dispatcher cleanup and updates. Build fixes Improvements and python to CK example Improvements to readme * Fixes to python paths * Cleaning up code * Improving dispatcher support for different arch Fixing typos * Fix formatting errors * Cleaning up examples * Improving codegeneration * Improving and fixing C++ examples * Adding conv functionality (fwd,bwd,bwdw) and examples. * Fixes based on feedback. * Further fixes based on feedback. * Adding stress test for autogeneration and autocorrection, and fixing preshuffle bug. * Another round of improvements based on feedback. * Trimming out unnecessary code. * Fixing the multi-D implementation. * Using gpu verification for gemms and fixing convolutions tflops calculation. * Fix counter usage issue and arch filtering per ops. * Adding changelog and other fixes. * Improve examples and resolve critical bugs. * Reduce build time for python examples. * Fixing minor bug. * Fix compilation error. * Improve installation instructions for dispatcher. * Add docker based installation instructions for dispatcher. * Fixing arch-based filtering to match tile engine. * Remove dead code and fix arch filtering. * Minor bugfix. * Updates after rebase. * Trimming code. * Fix copyright headers. * Consolidate examples, cut down code. * Minor fixes. * Improving python examples. * Update readmes. * Remove conv functionality. * Cleanup following conv removable.
This commit is contained in:
committed by
GitHub
parent
44f481a45c
commit
9e049a32a1
60
dispatcher/python/README.md
Normal file
60
dispatcher/python/README.md
Normal file
@@ -0,0 +1,60 @@
|
||||
# CK Tile Dispatcher Python Utilities
|
||||
|
||||
This directory contains Python utilities used by the dispatcher examples.
|
||||
|
||||
## Contents
|
||||
|
||||
- `ctypes_utils.py` - Core ctypes utilities for GEMM Python examples
|
||||
- `KernelConfig` - Kernel configuration dataclass
|
||||
- `setup_gemm_dispatcher()` - Setup dispatcher with auto-correction
|
||||
- `cleanup_gemm()` - Cleanup dispatcher resources
|
||||
- `GemmRunner` - GPU execution helper
|
||||
- Auto-correction and validation utilities
|
||||
|
||||
- `conv_utils.py` - Core utilities for Conv Python examples
|
||||
- `ConvSignature`, `ConvAlgorithm` - Convolution configuration
|
||||
- `ConvProblem` - Problem definition
|
||||
- `GpuConvRunner` - GPU execution helper
|
||||
- `EnhancedConvCodegenRunner` - Kernel codegen utilities
|
||||
|
||||
## Usage
|
||||
|
||||
### GEMM Examples
|
||||
|
||||
The GEMM Python examples in `dispatcher/examples/gemm/python/` import:
|
||||
|
||||
```python
|
||||
import sys
|
||||
from pathlib import Path
|
||||
sys.path.insert(0, str(Path(__file__).parent.parent.parent.parent / "python"))
|
||||
|
||||
from ctypes_utils import (
|
||||
KernelConfig,
|
||||
setup_gemm_dispatcher,
|
||||
cleanup_gemm,
|
||||
GemmRunner,
|
||||
)
|
||||
```
|
||||
|
||||
### Conv Examples
|
||||
|
||||
The Conv Python examples in `dispatcher/examples/conv/python/` import:
|
||||
|
||||
```python
|
||||
import sys
|
||||
from pathlib import Path
|
||||
sys.path.insert(0, str(Path(__file__).parent.parent.parent.parent / "python"))
|
||||
|
||||
from conv_utils import (
|
||||
ConvSignature,
|
||||
ConvAlgorithm,
|
||||
ConvProblem,
|
||||
GpuConvRunner,
|
||||
)
|
||||
```
|
||||
|
||||
## Requirements
|
||||
|
||||
- Python 3.8+
|
||||
- NumPy
|
||||
- HIP runtime (for GPU execution)
|
||||
Reference in New Issue
Block a user