Skip to content

Commit

Permalink
Removed predictive modeling and related documentation
Browse files Browse the repository at this point in the history
- See issue #837
  • Loading branch information
hfp committed Sep 4, 2024
1 parent 3d55499 commit c0d8a81
Show file tree
Hide file tree
Showing 23 changed files with 6 additions and 4,880 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,3 @@ The batched matrix-matrix multiplication kernels are templated on:
The batched transpose kernels are templated on:

* the characteristic dimensions of the transpose: `m, n`

## Predictive parameters

The input features for the predictive models can be 'raw' parameters (left-most-column in the figure below), or hand-engineered features 'derived' from the raw features (matrix sizes, launch parameters and resource usage estimations).

![libsmm_acc_predictive_modeling_features](../../../../../media/images/libsmm_acc_predictive_modeling_features.png)

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions docs/media/images/README.md

This file was deleted.

Binary file not shown.

This file was deleted.

18 changes: 5 additions & 13 deletions src/acc/libsmm_acc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ For a description of the library (some details are outdated, but this neverthele

## Directory Organization

- [`kernels/`](https://github.com/cp2k/dbcsr/blob/develop/src/acc/libsmm_acc/kernels/): GPU kernels (CUDA- and HIP-compatible) for matrix-matrix multiplication and python interface to autotuning and predictive code.
- [`notebooks/`](https://github.com/cp2k/dbcsr/blob/develop/src/acc/libsmm_acc/notebooks/): jupyter notebooks for exploring data generated from autotuning and prediction.
- [`kernels/`](https://github.com/cp2k/dbcsr/blob/develop/src/acc/libsmm_acc/kernels/): GPU kernels (CUDA- and HIP-compatible) for matrix-matrix multiplication and Python interface to autotuning code.
- `generate_*.py`: utility scripts for `libsmm_acc` compilation
- `libsmm_acc*`: libsmm_acc C++ and CUDA / HIP code
- [`parameters/`](https://github.com/cp2k/dbcsr/blob/develop/src/acc/libsmm_acc/parameters/): contains `parameters_GPU.json` files. These are sets of matrix-matrix multiplication parameters for different (m, n, k)-triplets optimized for a given GPU card. You can explore these parameters interactively using the [provided jupyter notebook](https://github.com/cp2k/dbcsr/blob/develop/src/acc/libsmm_acc/notebooks/inspect_autotuned_parameters.ipynb)
- [`predict/`](https://github.com/cp2k/dbcsr/blob/develop/src/acc/libsmm_acc/predict/): scripts for prediction of optimal parameter sets, see [predictive modeling of kernel parameters](https://github.com/cp2k/dbcsr/blob/develop/src/acc/libsmm_acc/predict/README.md)
- [`parameters/`](https://github.com/cp2k/dbcsr/blob/develop/src/acc/libsmm_acc/parameters/): contains `parameters_GPU.json` files. These are sets of matrix-matrix multiplication parameters for different (m, n, k)-triplets optimized for a given GPU card.
- [`tune/`](https://github.com/cp2k/dbcsr/blob/develop/src/acc/libsmm_acc/tune/): scripts for autotuning of optimal parameter sets, see [autotuning of kernel parameters](https://github.com/cp2k/dbcsr/blob/develop/src/acc/libsmm_acc/tune/README.md)

## Matrix-matrix Multiplication Kernels and Parameters
Expand Down Expand Up @@ -46,7 +44,7 @@ which take between 3 - 7 **parameters** (see figure at the top):
- **w**: input slab width (width of slab `P_A` and `P_B`)
- **v**: output slab width (width of slab `P_C`)

The performance of the matrix-matrix multiplication kernels is highly dependent on the choice of algorithm and parameters. For this reason, `libsmm_acc` provides lists of optimal parameters for different GPU cards and different (m, n, k)-triplets. These sets of optimal parameters can be found either through *autotuning* or *predictive modeling*.
The performance of the matrix-matrix multiplication kernels is highly dependent on the choice of algorithm and parameters. For this reason, `libsmm_acc` provides lists of optimal parameters for different GPU cards and different (m, n, k)-triplets.

## Contributing to libsmm_acc

Expand All @@ -56,19 +54,13 @@ We expect users to contribute to the library by providing new optimized kernels

Follow the [autotuning procedure](https://github.com/cp2k/dbcsr/blob/develop/src/acc/libsmm_acc/tune/README.md)

#### Predictive modeling of kernel parameters

Follow the [predictive modeling procedure](https://github.com/cp2k/dbcsr/blob/develop/src/acc/libsmm_acc/predict/README.md)

#### Adding a new kernel

1. Choose a kernel `name`

2. Add the kernel's code (must be able to compile by both `nvcc` and `hip`) in file `kernels/smm_acc_dnt_name.h`

3. Add python kernel class inheriting from base class `kernels/smm_acc_dnt_name.py`

4. Add the new kernel to the `kernel_algorithm` data structure in [`kernels/smm_acc_predict.py`](https://github.com/cp2k/dbcsr/blob/develop/src/acc/libsmm_acc/kernels/smm_acc_predict.py)
3. Add Python kernel class inheriting from base class `kernels/smm_acc_dnt_name.py`

#### Adding support for a new GPU card

Expand All @@ -85,4 +77,4 @@ Follow the [predictive modeling procedure](https://github.com/cp2k/dbcsr/blob/de
}
```

then add matrix-matrix multiplication parameters for this GPU using *autotuning* and *predictive modeling*
then add matrix-matrix multiplication parameters for this GPU using *autotuning*.
2 changes: 0 additions & 2 deletions src/acc/libsmm_acc/kernels/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

* `smm_acc_dnt_ALGORITHM.h` Batched Multiply Kernel CUDA/HIP code

* [`smm_acc_predict.py`](https://github.com/cp2k/dbcsr/blob/develop/src/acc/libsmm_acc/kernels/smm_acc_predict.py) Class and helper functions for parameter prediction procedure

* [`smm_acc_transpose.h`](https://github.com/cp2k/dbcsr/blob/develop/src/acc/libsmm_acc/kernels/smm_acc_transpose.h) Transpose CUDA/HIP code

## Batched Multiplication Kernels
Expand Down
12 changes: 0 additions & 12 deletions src/acc/libsmm_acc/notebooks/README.md

This file was deleted.

279 changes: 0 additions & 279 deletions src/acc/libsmm_acc/notebooks/inspect_autotuned_parameters.ipynb

This file was deleted.

Loading

0 comments on commit c0d8a81

Please sign in to comment.