未验证 提交 6f07960c 编写于 作者: MarDino's avatar MarDino 提交者: GitHub

fix ambiguous symbol error (#49406)

上级 0bb999b6
...@@ -343,12 +343,12 @@ class FusedDropoutHelper { ...@@ -343,12 +343,12 @@ class FusedDropoutHelper {
}; };
template <typename T> template <typename T>
struct PDDataTypeTraits { struct DataTypeTraits {
using DataType = T; using DataType = T;
}; };
template <> template <>
struct PDDataTypeTraits<phi::dtype::float16> { struct DataTypeTraits<phi::dtype::float16> {
// Since LayerNormDirectCUDAFunctor register half type, we need to convert // Since LayerNormDirectCUDAFunctor register half type, we need to convert
// phi::float16 to half. // phi::float16 to half.
using DataType = half; using DataType = half;
...@@ -390,8 +390,8 @@ class FusedDropoutLayerNormHelper ...@@ -390,8 +390,8 @@ class FusedDropoutLayerNormHelper
OutType* out, OutType* out,
LayerNormParamType<T>* mean, LayerNormParamType<T>* mean,
LayerNormParamType<T>* variance) { LayerNormParamType<T>* variance) {
using InDataType = typename PDDataTypeTraits<InType>::DataType; using InDataType = typename DataTypeTraits<InType>::DataType;
using OutDataType = typename PDDataTypeTraits<OutType>::DataType; using OutDataType = typename DataTypeTraits<OutType>::DataType;
phi::LayerNormDirectCUDAFunctor<InDataType, LayerNormParamType<T>> phi::LayerNormDirectCUDAFunctor<InDataType, LayerNormParamType<T>>
layer_norm; layer_norm;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册