Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion paddle/phi/kernels/cpu/median_grad_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void CalcMedianGradEvenly(int64_t pre_dim,
dout_data[i] / static_cast<T>(2.0);
}
} else {
for (j = 0; j < data_index.size(); j++) {
for (j = 0; j < static_cast<int64_t>(data_index.size()); j++) {
dx_data[data_index[j]] =
dout_data[i] / static_cast<T>(data_index.size());
}
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/cpu/nanmedian_grad_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void CalcNanMedianGradEvenly(int64_t pre_dim,
dout_data[i] / static_cast<T>(2.0);
}
} else {
for (j = 0; j < data_index.size(); j++) {
for (j = 0; j < static_cast<int64_t>(data_index.size()); j++) {
dx_data[data_index[j]] =
dout_data[i] / static_cast<T>(data_index.size());
}
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/funcs/dense_tensor_iterator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ void DenseTensorIteratorBase::populate_operands(
for (size_t idx = 0; idx < config.tensors_.size(); idx++) {
auto& tensor = config.tensors_[idx];
operands_.emplace_back(std::move(const_cast<DenseTensor*>(tensor)));
if (idx < config.num_outputs_) {
if (idx < static_cast<size_t>(config.num_outputs_)) {
operands_[idx].is_output = true;
}
}
Expand Down
Loading