mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-04 21:51:28 +00:00
[rocm-libraries] ROCm/rocm-libraries#5697 (commit dd1c396)
Revert "Ck/joye/revert oob check (#5640)" This reverts commit 552ab4880292694cb8261f40fa4223af52cb8419. ## Motivation <!-- Explain the purpose of this PR and the goals it aims to achieve. --> ## Technical Details <!-- Explain the changes along with any relevant GitHub links. --> ## Test Plan <!-- Explain any relevant testing done to verify this PR. --> ## Test Result <!-- Briefly summarize test outcomes. --> ## Submission Checklist - [ ] Look over the contributing guidelines at https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
This commit is contained in:
committed by
assistant-librarian[bot]
parent
5a4243096b
commit
1834e318da
@@ -448,11 +448,23 @@ struct UniversalGemmKernel
|
||||
}
|
||||
if(kargs.K % vectorSizeA != 0)
|
||||
{
|
||||
if(ck_tile::EnvIsEnabled(CK_TILE_ENV(CK_TILE_LOGGING)))
|
||||
const auto remainder = kargs.K % vectorSizeA;
|
||||
constexpr ck_tile::index_t APackedSize =
|
||||
ck_tile::numeric_traits<ADataType>::PackedSize;
|
||||
const auto remainder_in_bytes = remainder * sizeof(ADataType) / APackedSize;
|
||||
// oob can support to dword level
|
||||
if(remainder_in_bytes % 4 == 0)
|
||||
{
|
||||
CK_TILE_ERROR("K is not a multiple of vector load size for A tensor!");
|
||||
AsTensorIsValid = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(ck_tile::EnvIsEnabled(CK_TILE_ENV(CK_TILE_LOGGING)))
|
||||
{
|
||||
CK_TILE_ERROR("K is not a multiple of vector load size for A tensor!");
|
||||
}
|
||||
AsTensorIsValid = false;
|
||||
}
|
||||
AsTensorIsValid = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -468,11 +480,24 @@ struct UniversalGemmKernel
|
||||
}
|
||||
if(kargs.M % vectorSizeA != 0)
|
||||
{
|
||||
if(ck_tile::EnvIsEnabled(CK_TILE_ENV(CK_TILE_LOGGING)))
|
||||
const auto remainder = kargs.M % vectorSizeA;
|
||||
constexpr ck_tile::index_t APackedSize =
|
||||
ck_tile::numeric_traits<ADataType>::PackedSize;
|
||||
const auto remainder_in_bytes = remainder * sizeof(ADataType) / APackedSize;
|
||||
// oob can support to dword level
|
||||
if(remainder_in_bytes % 4 == 0)
|
||||
{
|
||||
CK_TILE_ERROR("M is not a multiple of vector load size for A tensor!");
|
||||
|
||||
AsTensorIsValid = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(ck_tile::EnvIsEnabled(CK_TILE_ENV(CK_TILE_LOGGING)))
|
||||
{
|
||||
CK_TILE_ERROR("M is not a multiple of vector load size for A tensor!");
|
||||
}
|
||||
AsTensorIsValid = false;
|
||||
}
|
||||
AsTensorIsValid = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -495,33 +520,58 @@ struct UniversalGemmKernel
|
||||
}
|
||||
if(kargs.N % vectorSizeB != 0)
|
||||
{
|
||||
if(ck_tile::EnvIsEnabled(CK_TILE_ENV(CK_TILE_LOGGING)))
|
||||
const auto remainder = kargs.N % vectorSizeB;
|
||||
constexpr ck_tile::index_t BPackedSize =
|
||||
ck_tile::numeric_traits<BDataType>::PackedSize;
|
||||
const auto remainder_in_bytes = remainder * sizeof(BDataType) / BPackedSize;
|
||||
// oob can support to dword level
|
||||
if(remainder_in_bytes % 4 == 0)
|
||||
{
|
||||
CK_TILE_ERROR("N is not a multiple of vector load size for B tensor!");
|
||||
BsTensorIsValid = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(ck_tile::EnvIsEnabled(CK_TILE_ENV(CK_TILE_LOGGING)))
|
||||
{
|
||||
CK_TILE_ERROR("N is not a multiple of vector load size for B tensor!");
|
||||
}
|
||||
BsTensorIsValid = false;
|
||||
}
|
||||
BsTensorIsValid = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(kargs.K % (TilePartitioner::KPerBlock * kargs.k_batch) != 0 &&
|
||||
GemmPipeline::kPadK == false)
|
||||
else
|
||||
{
|
||||
if(ck_tile::EnvIsEnabled(CK_TILE_ENV(CK_TILE_LOGGING)))
|
||||
if(kargs.K % (TilePartitioner::KPerBlock * kargs.k_batch) != 0 &&
|
||||
GemmPipeline::kPadK == false)
|
||||
{
|
||||
CK_TILE_ERROR(
|
||||
"Can't support K that is not a multiple of k_batch * KPerBlock "
|
||||
"without padding!");
|
||||
if(ck_tile::EnvIsEnabled(CK_TILE_ENV(CK_TILE_LOGGING)))
|
||||
{
|
||||
CK_TILE_ERROR(
|
||||
"Can't support K that is not a multiple of k_batch * KPerBlock "
|
||||
"without padding!");
|
||||
}
|
||||
BsTensorIsValid = false;
|
||||
}
|
||||
BsTensorIsValid = false;
|
||||
}
|
||||
if(kargs.K % vectorSizeB != 0)
|
||||
{
|
||||
if(ck_tile::EnvIsEnabled(CK_TILE_ENV(CK_TILE_LOGGING)))
|
||||
if(kargs.K % vectorSizeB != 0)
|
||||
{
|
||||
CK_TILE_ERROR("K is not a multiple of vector load size for B tensor!");
|
||||
const auto remainder = kargs.K % vectorSizeB;
|
||||
constexpr ck_tile::index_t BPackedSize =
|
||||
ck_tile::numeric_traits<BDataType>::PackedSize;
|
||||
const auto remainder_in_bytes = remainder * sizeof(BDataType) / BPackedSize;
|
||||
// oob can support to dword level
|
||||
if(remainder_in_bytes % 4 == 0)
|
||||
{
|
||||
BsTensorIsValid = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(ck_tile::EnvIsEnabled(CK_TILE_ENV(CK_TILE_LOGGING)))
|
||||
{
|
||||
CK_TILE_ERROR(
|
||||
"K is not a multiple of vector load size for B tensor!");
|
||||
}
|
||||
BsTensorIsValid = false;
|
||||
}
|
||||
}
|
||||
BsTensorIsValid = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user