diff --git a/src/operator/nn/layer_norm.cu b/src/operator/nn/layer_norm.cu index b2de5726fc18..0d7bad530311 100644 --- a/src/operator/nn/layer_norm.cu +++ b/src/operator/nn/layer_norm.cu @@ -312,7 +312,7 @@ void LayerNormGPUContig(const LayerNormParam param, cudaStream_t stream = Stream::GetStream(ctx.get_stream()); const dim3 dimBlock(32, nthread_y); MXNET_ACC_TYPE_SWITCH(in_data.type_flag_, DType, AccType, { - typedef std::conditional::type AType; + typedef typename std::conditional::type AType; int nshared = nthread_y > 1 ? nthread_y * 32 * sizeof(AType) + (nthread_y / 2) * 32 * sizeof(int) : 0; CheckLaunchParam(dimGrid, dimBlock); @@ -637,7 +637,7 @@ void LayerNormGradGPUContig(const LayerNormParam param, &gb_block_dim, &gb_grid_dim, &npart); if (gamma_grad_req != kNullOp || beta_grad_req != kNullOp) { MXNET_ACC_TYPE_SWITCH(in_data.type_flag_, DType, AccType, { - typedef std::conditional::type AType; + typedef typename std::conditional::type AType; Tensor workspace = ctx.requested[0].get_space_typed(Shape1(2 * npart * nchannel), s); AType* part_gamma_grad_ptr = workspace.dptr_; @@ -696,7 +696,7 @@ void LayerNormGradGPUContig(const LayerNormParam param, const int LOAD_UNROLL = 4; if (data_grad_req != kNullOp) { MXNET_ACC_TYPE_SWITCH(in_data.type_flag_, DType, AccType, { - typedef std::conditional::type AType; + typedef typename std::conditional::type AType; int nshared = data_block_dim.y > 1 ? data_block_dim.y * data_block_dim.x * sizeof(AType) : 0; CheckLaunchParam(data_grid_dim, data_block_dim); if (data_grad_req == kAddTo) {