Merge pull request !39653 from jiaorui/clean-code-master
This commit is contained in:
i-robot 2022-08-06 09:24:50 +00:00 committed by Gitee
commit 6d8f2a988c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 2 additions and 2 deletions

View File

@ -205,7 +205,7 @@ AnfNodePtr ConcatOutputsForAllGather::InsertConcatForOutput(const FuncGraphPtr &
while (concat_input_num - cur_input_index >= static_cast<size_t>(inputs_divisor_)) {
concat = CreateNewConcat(func_graph, concat_input_nodes, concat_input_info, cur_input_index, inputs_divisor_);
output_nodes.push_back(concat);
cur_input_index += inputs_divisor_;
cur_input_index += LongToSize(inputs_divisor_);
}
size_t rest_num = concat_input_num - cur_input_index;
if (rest_num == 1) {

View File

@ -34,7 +34,7 @@ using KernelRunFunc = RandomPoissonCpuKernelMod::KernelRunFunc;
&RandomPoissonCpuKernelMod::LaunchKernel<rate_type, output_type> \
}
static unsigned int s_seed = LongToUint(time(nullptr));
static unsigned int s_seed = static_cast<unsigned int>(time(nullptr));
EIGEN_DEVICE_FUNC uint64_t get_random_seed() {
auto rnd = rand_r(&s_seed);
return IntToSize(rnd);