Skip to content

Commit 158c5fc

Browse files
committed
fix ci fail
1 parent a412135 commit 158c5fc

File tree

3 files changed

+0
-24
lines changed

3 files changed

+0
-24
lines changed

paddle/fluid/framework/generator.cc

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -158,25 +158,6 @@ uint64_t Generator::Random64() {
158158
return (*engine)();
159159
}
160160

161-
std::pair<uint64_t, uint64_t> Generator::IncrementOffset(
162-
uint64_t total_numel, uint64_t grid_size, uint64_t block_size,
163-
uint64_t engine_calls_num) {
164-
uint64_t cur_offset = this->state_.thread_offset;
165-
#ifdef PADDLE_WITH_CUDA
166-
std::lock_guard<std::mutex> lock(this->mu_);
167-
uint64_t numel_per_thread =
168-
(total_numel - 1) / (block_size * grid_size * 4) + 1;
169-
uint64_t increment = numel_per_thread * engine_calls_num;
170-
171-
this->state_.thread_offset += increment;
172-
173-
#else
174-
PADDLE_THROW(platform::errors::PermissionDenied(
175-
"Increment Offset only support in CUDA place"));
176-
#endif
177-
return std::make_pair(this->state_.current_seed, cur_offset);
178-
}
179-
180161
std::pair<uint64_t, uint64_t> Generator::IncrementOffset(
181162
uint64_t increament_offset) {
182163
uint64_t cur_offset = this->state_.thread_offset;

paddle/fluid/framework/generator.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,6 @@ struct Generator {
9999

100100
uint64_t Random64();
101101

102-
std::pair<uint64_t, uint64_t> IncrementOffset(uint64_t total_numel,
103-
uint64_t grid_size,
104-
uint64_t block_size,
105-
uint64_t engine_calls_num);
106102
std::pair<uint64_t, uint64_t> IncrementOffset(uint64_t increament_offset);
107103

108104
void SetIsInitPy(bool);

python/paddle/framework/random.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ def manual_seed(seed):
4343
seed = int(seed)
4444

4545
if core.is_compiled_with_cuda():
46-
# print("PYTHON>>>>>> gpu nums: {}".format(core.get_cuda_device_count()))
4746
for i in range(core.get_cuda_device_count()):
4847
core.default_cuda_generator(i)._is_init_py = True
4948
core.default_cuda_generator(i).manual_seed(seed)

0 commit comments

Comments
 (0)