Skip to content

Commit 744383a

Browse files
anmyachevetiotto
andauthored
Explicitly use int64_t type for std::min in MatchTargetSizePass::getSubOpSize for portability between platforms (#2620)
Part of #2478. To reduce diff. --------- Signed-off-by: Anatoly Myachev <[email protected]> Co-authored-by: Ettore Tiotto <[email protected]>
1 parent 6536edb commit 744383a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

third_party/intel/lib/TritonIntelGPUTransforms/MatchTargetSize.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -722,9 +722,9 @@ MatchTargetSizePass::getSubOpSize(RankedTensorType type,
722722
if (isa<ttgi::WarpEncodingAttr>(layout)) {
723723
// 32 = 2 * 16(subgroupSize) which is for large load/store
724724
// max 2d block prefetch width is 16 for 32-bit datatype
725-
subSize[1] = std::min(sizeInBits == 32 ? 16L : 32L, shape[1]);
725+
subSize[1] = std::min<int64_t>(sizeInBits == 32 ? 16 : 32, shape[1]);
726726
// max 2d block load height is 32
727-
subSize[0] = std::min(32L, shape[0]);
727+
subSize[0] = std::min<int64_t>(32, shape[0]);
728728
} else if (auto dotLayout = dyn_cast<ttg::DotOperandEncodingAttr>(layout)) {
729729
const TargetArchNativeSizes::BlockMemShape &memShape =
730730
nativeSizes.getBlockMemShape(sizeInBits);

0 commit comments

Comments
 (0)