Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Conv] add ck bfp16 for fwd and bwd #3431

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/solver/conv/conv_hip_implicit_gemm_bwd_data_xdlops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,12 @@ void PerformanceConfigHipImplicitGemmBwdXdlops::HeuristicInit(
{
case miopenHalf: Init<ck::half_t>(problem); break;
case miopenFloat: Init<float>(problem); break;
case miopenBFloat16: Init<ck::bhalf_t>(problem); break;
case miopenFloat8:
case miopenBFloat8:
case miopenInt8:
case miopenInt32:
case miopenInt64:
case miopenBFloat16:
case miopenDouble: break;
}
#endif
Expand Down Expand Up @@ -223,12 +223,12 @@ bool PerformanceConfigHipImplicitGemmBwdXdlops::IsValid(
{
case miopenHalf: return CheckIsSupportCKArgs<ck::half_t>(problem);
case miopenFloat: return CheckIsSupportCKArgs<float>(problem);
case miopenBFloat16: return CheckIsSupportCKArgs<ck::bhalf_t>(problem);
case miopenFloat8:
case miopenBFloat8:
case miopenInt8:
case miopenInt32:
case miopenInt64:
case miopenBFloat16:
case miopenDouble: break;
}
#endif
Expand Down Expand Up @@ -304,12 +304,12 @@ bool ConvHipImplicitGemmBwdXdlops::IsApplicable(
{
case miopenHalf: return CheckCKApplicability<ck::half_t>(problem);
case miopenFloat: return CheckCKApplicability<float>(problem);
case miopenBFloat16: return CheckCKApplicability<ck::bhalf_t>(problem);
case miopenFloat8:
case miopenBFloat8:
case miopenInt8:
case miopenInt32:
case miopenInt64:
case miopenBFloat16:
case miopenDouble: break;
}
#endif
Expand All @@ -334,10 +334,14 @@ ConvSolution ConvHipImplicitGemmBwdXdlops::GetSolution(
CKArgs,
miopen::conv::DataInvokeParams>(
ctx, problem, config.kernel_id);
case miopenBFloat16:
return InitInvokerFactoryNHWC<DeviceOpBwdPtrs<ck::bhalf_t>,
CKArgs,
miopen::conv::DataInvokeParams>(
ctx, problem, config.kernel_id);
case miopenInt8:
case miopenInt32:
case miopenInt64:
case miopenBFloat16:
case miopenDouble:
case miopenFloat8:
case miopenBFloat8:
Expand Down
12 changes: 8 additions & 4 deletions src/solver/conv/conv_hip_implicit_gemm_fwd_xdlops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,11 @@ void PerformanceConfigHipImplicitGemmFwdXdlops::HeuristicInit(
case miopenInt8: Init<int8_t>(problem); break;
case miopenHalf: Init<ck::half_t>(problem); break;
case miopenFloat: Init<float>(problem); break;
case miopenBFloat16: Init<ck::bhalf_t>(problem); break;
case miopenFloat8:
case miopenBFloat8:
case miopenInt64:
case miopenInt32:
case miopenBFloat16:
case miopenDouble: break;
}
#endif
Expand Down Expand Up @@ -225,11 +225,11 @@ bool PerformanceConfigHipImplicitGemmFwdXdlops::IsValid(
case miopenInt8: return CheckIsSupportCKArgs<int8_t>(problem);
case miopenHalf: return CheckIsSupportCKArgs<ck::half_t>(problem);
case miopenFloat: return CheckIsSupportCKArgs<float>(problem);
case miopenBFloat16: return CheckIsSupportCKArgs<ck::bhalf_t>(problem);
case miopenFloat8:
case miopenBFloat8:
case miopenInt64:
case miopenInt32:
case miopenBFloat16:
case miopenDouble: break;
}
#endif
Expand Down Expand Up @@ -306,11 +306,11 @@ bool ConvHipImplicitGemmFwdXdlops::IsApplicable(
case miopenInt8: return CheckCKApplicability<int8_t>(problem);
case miopenHalf: return CheckCKApplicability<ck::half_t>(problem);
case miopenFloat: return CheckCKApplicability<float>(problem);
case miopenBFloat16: return CheckCKApplicability<ck::bhalf_t>(problem);
case miopenFloat8:
case miopenBFloat8:
case miopenInt64:
case miopenInt32:
case miopenBFloat16:
case miopenDouble: break;
}
#endif
Expand All @@ -336,9 +336,13 @@ ConvSolution ConvHipImplicitGemmFwdXdlops::GetSolution(
case miopenFloat:
return InitInvokerFactoryNHWC<DeviceOpPtrs<float>, CKArgs, miopen::conv::DataInvokeParams>(
ctx, problem, config.kernel_id);
case miopenBFloat16:
return InitInvokerFactoryNHWC<DeviceOpPtrs<ck::bhalf_t>,
CKArgs,
miopen::conv::DataInvokeParams>(
ctx, problem, config.kernel_id);
case miopenInt64:
case miopenInt32:
case miopenBFloat16:
case miopenDouble:
case miopenFloat8:
case miopenBFloat8:
Expand Down
Loading