未验证 提交 4dc28b54 编写于 作者: L limingshu 提交者: GitHub

fix_windows_static_assert_error (#53750)

上级 b086404b
...@@ -535,10 +535,11 @@ void ComputeFusedGemmEpilogueBackwardImpl(const phi::GPUContext& dev_ctx, ...@@ -535,10 +535,11 @@ void ComputeFusedGemmEpilogueBackwardImpl(const phi::GPUContext& dev_ctx,
bool use_addto_dx, bool use_addto_dx,
bool use_addto_dy) { bool use_addto_dy) {
using MT = typename phi::dtype::MPTypeTrait<T>::Type; using MT = typename phi::dtype::MPTypeTrait<T>::Type;
static_assert(std::is_same<DXT, T>::value || std::is_same<DXT, MT>::value, constexpr bool kIsValidDataType =
""); (std::is_same<DXT, T>::value || std::is_same<DXT, MT>::value) &&
static_assert(std::is_same<DYT, T>::value || std::is_same<DYT, MT>::value, (std::is_same<DYT, T>::value || std::is_same<DYT, MT>::value);
""); static_assert(kIsValidDataType, "Invalid data type");
using Trait = FusedGEMMGradTrait<TransX, TransY>; using Trait = FusedGEMMGradTrait<TransX, TransY>;
if (dx) { if (dx) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册