Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a script for generating the quick-tuning perfconfigs list #1689

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 9 additions & 23 deletions mlir/include/mlir/Dialect/Rock/Tuning/GridwiseGemmParams.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,9 @@ class BasePopulateParams {
//
class PopulateParams : public BasePopulateParams<InitParamsNonAccel> {
private:
static constexpr size_t nInitParameters = 30;
static const InitParamsNonAccel initParameters[nInitParameters];
#define NonAccel_DECLARATIONS_GEN
#include "mlir/Dialect/Rock/Tuning/QuickTuningPerfconfigs.inc"
#undef NonAccel_DECLARATIONS_GEN
// if can't select config from above , use this config to do
// padding kernel for example , GemmK/block is 16 , if your gemmK is 13 , we
// add more 3 gemmk
Expand Down Expand Up @@ -387,19 +388,9 @@ class PopulateParamsAccel : public BasePopulateParams<InitParamsAccel> {
// Xdlops interface
//
class PopulateParamsXDL : public PopulateParamsAccel {
static constexpr size_t nInitParameters = 40;
// Initial tuning parameters for forward convolution and backward
// convolution.
static const InitParamsAccel initParameters[nInitParameters];

static constexpr size_t nInitParametersFp16 = 40;
// Tuning parameters for fp16/bf16 convolutions.
static const InitParamsAccel initParametersFp16[nInitParametersFp16];

static constexpr size_t nInitParametersForward8Bit = 40;
// Tuning parameters for i8 convolutions.
static const InitParamsAccel
initParametersForward8Bit[nInitParametersForward8Bit];
#define XDL_DECLARATIONS_GEN
#include "mlir/Dialect/Rock/Tuning/QuickTuningPerfconfigs.inc"
#undef XDL_DECLARATIONS_GEN

public:
std::vector<InitParamsAccel>
Expand All @@ -425,14 +416,9 @@ class PopulateParamsXDL : public PopulateParamsAccel {
//
class PopulateParamsWmma : public PopulateParamsAccel {
private:
static constexpr size_t nInitParametersFp16 = 30;
// Tuning parameters for fp16/bf16 convolutions.
static const InitParamsAccel initParametersFp16[nInitParametersFp16];

static constexpr size_t nInitParametersForward8Bit = 30;
// Tuning parameters for i8 convolutions.
static const InitParamsAccel
initParametersForward8Bit[nInitParametersForward8Bit];
#define Wmma_DECLARATIONS_GEN
#include "mlir/Dialect/Rock/Tuning/QuickTuningPerfconfigs.inc"
#undef Wmma_DECLARATIONS_GEN

public:
std::vector<InitParamsAccel>
Expand Down
Loading