From 79c84baff53e4804aa00f0e87fe5ea2354de83ec Mon Sep 17 00:00:00 2001 From: co63oc Date: Tue, 16 May 2023 11:25:57 +0800 Subject: [PATCH] Fix typos in paddle/phi/core/generator.cc (#53802) --- paddle/phi/core/generator.cc | 4 ++-- paddle/phi/core/generator.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/paddle/phi/core/generator.cc b/paddle/phi/core/generator.cc index 64bff05654d..4ed25af0814 100644 --- a/paddle/phi/core/generator.cc +++ b/paddle/phi/core/generator.cc @@ -277,11 +277,11 @@ uint64_t Generator::Random64() { } std::pair Generator::IncrementOffset( - uint64_t increament_offset) { + uint64_t increment_offset) { #if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) std::lock_guard lock(this->mu_); uint64_t cur_offset = this->state_.thread_offset; - this->state_.thread_offset += increament_offset; + this->state_.thread_offset += increment_offset; return std::make_pair(this->state_.current_seed, cur_offset); #else PADDLE_THROW(phi::errors::PermissionDenied( diff --git a/paddle/phi/core/generator.h b/paddle/phi/core/generator.h index a1d985dc772..aeaa89f2abf 100644 --- a/paddle/phi/core/generator.h +++ b/paddle/phi/core/generator.h @@ -65,7 +65,7 @@ class Generator { uint64_t Random64(); - std::pair IncrementOffset(uint64_t increament_offset); + std::pair IncrementOffset(uint64_t increment_offset); uint64_t get_device_id() { return this->state_.device; } -- GitLab