Skip to content
Merged
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
6 changes: 3 additions & 3 deletions paddle/phi/kernels/funcs/elementwise_functor.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ limitations under the License. */
#if defined(__xpu__)
#include <xpu/runtime.h>

#include "xpu/kernel/math_xpu2.h" //pow()
#include "xpu/kernel/math_xpu2.h" // pow()
#endif

namespace phi {
Expand Down Expand Up @@ -557,7 +557,7 @@ struct FloorDivideFunctor {
#ifndef PADDLE_WITH_XPU_KP
PADDLE_ENFORCE(b != 0, DIV_ERROR_INFO);
#endif
return static_cast<T>(std::trunc(a / b));
return static_cast<T>(a / b);
}
};

Expand All @@ -567,7 +567,7 @@ struct InverseFloorDivideFunctor {
#ifndef PADDLE_WITH_XPU_KP
PADDLE_ENFORCE(a != 0, DIV_ERROR_INFO);
#endif
return static_cast<T>(std::trunc(b / a));
return static_cast<T>(b / a);
}
};

Expand Down