Skip to content

Commit

Permalink
[tuner]: format the code based on comments
Browse files Browse the repository at this point in the history
Signed-off-by: Bangtian Liu <[email protected]>
  • Loading branch information
bangtianliu committed Dec 7, 2024
1 parent 00e8665 commit 0f98992
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
19 changes: 9 additions & 10 deletions compiler/bindings/python/IREECompilerDialectsModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,16 +376,15 @@ PYBIND11_MODULE(_ireeCompilerDialects, m) {
ireeGPULoweringConfigAttrGetSubgroupCount(self);
MlirAttribute mCountAttr = info.subgroupMCountAttr;
MlirAttribute nCountAttr = info.subgroupNCountAttr;
std::optional<int64_t> mCount =
mlirAttributeIsNull(mCountAttr)
? std::nullopt
: std::optional<int64_t>(
mlirIntegerAttrGetValueInt(mCountAttr));
std::optional<int64_t> nCount =
mlirAttributeIsNull(nCountAttr)
? std::nullopt
: std::optional<int64_t>(
mlirIntegerAttrGetValueInt(nCountAttr));
std::optional<int64_t> mCount;
if (!mlirAttributeIsNull(mCountAttr)) {
mCount = mlirIntegerAttrGetValueInt(mCountAttr);
}

std::optional<int64_t> nCount;
if (!mlirAttributeIsNull(nCountAttr)) {
nCount = mlirIntegerAttrGetValueInt(nCountAttr);
}
return py::make_tuple(mCount, nCount);
})
.def_property_readonly(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ ireeGPUTileSizes ireeGPULoweringConfigAttrGetTileSizes(MlirAttribute attr) {

llvm::SmallVector<int64_t> reductions =
loweringConfigAttr.getStaticTilingLevelSizes(
static_cast<int64_t>(
llvm::to_underlying(
mlir::iree_compiler::IREE::GPU::TilingLevel::Reduction),
nullptr);
tilesizes.reductionTileSizes = reductions.data();
Expand Down

0 comments on commit 0f98992

Please sign in to comment.