Skip to content

Commit

Permalink
Correct clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
djramic committed Nov 14, 2024
1 parent b3d5230 commit bf24e45
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// THIS IS AN AUTOGENERATED FILE.
// DO NOT EDIT THIS FILE DIRECTLY!

// clang-format off
#ifdef NonAccel_DEFINITIONS_GEN

// BEGIN_GEMM_NonAccel_f32_DEFS
Expand Down
18 changes: 9 additions & 9 deletions mlir/lib/Dialect/Rock/Tuning/GridwiseGemmParams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ llvm::raw_ostream &mlir::rock::operator<<(llvm::raw_ostream &os,

/// Non-xdlops
// clang-format off
#define NonAccel_DEFINITIONS_GEN
#include "mlir/Dialect/Rock/Tuning/QuickTuningPerfconfigs.inc"
#undef NonAccel_DEFINITIONS_GEN
#define NonAccel_DEFINITIONS_GEN
#include "mlir/Dialect/Rock/Tuning/QuickTuningPerfconfigs.inc"
#undef NonAccel_DEFINITIONS_GEN
// clang-format on

PopulateParamsInfo PopulateParamsInfo::fromOp(RockGemmWrapperInterface op) {
Expand Down Expand Up @@ -409,9 +409,9 @@ PopulateParamsAccel::obtainTuningParameters(RockGemmWrapperInterface op,

/// Xdlops acceleration
// clang-format off
#define XDL_DEFINITIONS_GEN
#include "mlir/Dialect/Rock/Tuning/QuickTuningPerfconfigs.inc"
#undef XDL_DEFINITIONS_GEN
#define XDL_DEFINITIONS_GEN
#include "mlir/Dialect/Rock/Tuning/QuickTuningPerfconfigs.inc"
#undef XDL_DEFINITIONS_GEN
// clang-format on

LogicalResult PopulateParamsXDL::isValidBlockwiseGemm(
Expand Down Expand Up @@ -611,9 +611,9 @@ PopulateParamsXDL::getGemmParamsAttr(OpBuilder &builder,

/// Wmma acceleration
// clang-format off
#define Wmma_DEFINITIONS_GEN
#include "mlir/Dialect/Rock/Tuning/QuickTuningPerfconfigs.inc"
#undef Wmma_DEFINITIONS_GEN
#define Wmma_DEFINITIONS_GEN
#include "mlir/Dialect/Rock/Tuning/QuickTuningPerfconfigs.inc"
#undef Wmma_DEFINITIONS_GEN
// clang-format on

LogicalResult PopulateParamsWmma::isValidBlockwiseGemm(
Expand Down
6 changes: 5 additions & 1 deletion mlir/utils/performance/analysis/quickTuningGen.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def init_inc_file(self, file_path):
with open(file_path, 'w') as file:
file.write("// THIS IS AN AUTOGENERATED FILE.\n")
file.write("// DO NOT EDIT THIS FILE DIRECTLY!\n\n")
file.write("// clang-format off\n")
for instrction_type, datatypes in instruction_types_to_datatypes.items():
file.write(f"#ifdef {instrction_type}_DEFINITIONS_GEN\n\n")
for datatype in datatypes:
Expand Down Expand Up @@ -357,7 +358,10 @@ def print_results(result):


def main(args=None):

"""
usage: quickTunerGen.py [-h] --input-dir INPUT_DIR --op {gemm,conv} [--th TH] --arch ARCH [--update] [--no-splitK]
usage exsample: python3 quickTunerGen.py --input-dir tunedData --op conv --arch gfx90a --update --no-splitK
"""
if args is None:
args = sys.argv[1:]

Expand Down

0 comments on commit bf24e45

Please sign in to comment.