Skip to content

Commit

Permalink
fix syncbn nan (#59089)
Browse files Browse the repository at this point in the history
  • Loading branch information
ceci3 authored Nov 30, 2023
1 parent a232b2e commit 5f9f2ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion paddle/fluid/operators/sync_batch_norm_op.cu
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void SyncBatchNormKernel(const Context& ctx,
phi::Stream(reinterpret_cast<phi::StreamId>(ctx.stream())));

auto* stats = reinterpret_cast<BatchNormParamType<T>*>(alloc_ptr->ptr());
const int threads = 256;
const int threads = 512;
int grid = std::min(C, (max_threads + threads - 1) / threads);
if (layout == phi::DataLayout::kNCHW) {
KeLocalStats<T, threads, phi::DataLayout::kNCHW>
Expand Down

0 comments on commit 5f9f2ec

Please sign in to comment.