未验证 提交 79c84baf 编写于 作者: C co63oc 提交者: GitHub

Fix typos in paddle/phi/core/generator.cc (#53802)

上级 4f7dfd02
...@@ -277,11 +277,11 @@ uint64_t Generator::Random64() { ...@@ -277,11 +277,11 @@ uint64_t Generator::Random64() {
} }
std::pair<uint64_t, uint64_t> Generator::IncrementOffset( std::pair<uint64_t, uint64_t> Generator::IncrementOffset(
uint64_t increament_offset) { uint64_t increment_offset) {
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) #if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)
std::lock_guard<std::mutex> lock(this->mu_); std::lock_guard<std::mutex> lock(this->mu_);
uint64_t cur_offset = this->state_.thread_offset; 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); return std::make_pair(this->state_.current_seed, cur_offset);
#else #else
PADDLE_THROW(phi::errors::PermissionDenied( PADDLE_THROW(phi::errors::PermissionDenied(
......
...@@ -65,7 +65,7 @@ class Generator { ...@@ -65,7 +65,7 @@ class Generator {
uint64_t Random64(); uint64_t Random64();
std::pair<uint64_t, uint64_t> IncrementOffset(uint64_t increament_offset); std::pair<uint64_t, uint64_t> IncrementOffset(uint64_t increment_offset);
uint64_t get_device_id() { return this->state_.device; } uint64_t get_device_id() { return this->state_.device; }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册