mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-07-11 01:27:34 +00:00
add type-conversion to AccDataType and then to CDataType to exactly mimic GPU's behavior
This commit is contained in:
committed by
Kevin Abraham
parent
7ed033a1b2
commit
81953c81d6
@@ -105,12 +105,15 @@ struct ReferenceBatchedGemm : public device::BaseOperator
|
||||
{
|
||||
for(int batchIdx = 0;batchIdx < arg.k_batch_;batchIdx++)
|
||||
{
|
||||
v_c = ck::type_convert<CDataType>(ck::type_convert<AccDataType>(v_c) + ck::type_convert<AccDataType>(partialSums[batchIdx]));
|
||||
// mimic the way fp operations would be done on GPU for k-batching
|
||||
v_c = ck::type_convert<AccDataType>(ck::type_convert<CDataType>(
|
||||
ck::type_convert<AccDataType>(v_c) +
|
||||
ck::type_convert<AccDataType>(partialSums[batchIdx])));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
v_c = partialSums[0];
|
||||
v_c = ck::type_convert<AccDataType>(partialSums[0]);
|
||||
}
|
||||
|
||||
arg.c_g_m_n_(g, m, n) = ck::type_convert<CDataType>(v_c);
|
||||
|
||||
Reference in New Issue
Block a user