Skip to content

Commit 1f476d7

Browse files
authored
[XPU] fix int64 index bug of masked_select (#72762)
1 parent ddb39d4 commit 1f476d7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

paddle/phi/kernels/xpu/masked_select_kernel.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void MaskedSelectKernel(const Context& dev_ctx,
5555
static_cast<void*>(&out_size_cpu),
5656
mask.place(),
5757
static_cast<void*>(out_size),
58-
sizeof(int32_t));
58+
sizeof(int64_t));
5959
if (std::getenv("XPUSIM_SKIP_RUN") &&
6060
std::strcmp(std::getenv("XPUSIM_SKIP_RUN"), "1") == 0) {
6161
VLOG(3) << "WARNING: In the simulator mode, the variable out_size_cpu "

paddle/phi/kernels/xpu/warpctc_kernel.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ void WarpctcKernel(const Context& dev_ctx,
115115
dev_ctx.template Alloc<T>(warpctcgrad);
116116
T* warpctcgrad_data = warpctcgrad->data<T>();
117117

118-
int sm_workspace, lm_workspace;
118+
int64_t sm_workspace, lm_workspace;
119119
int64_t max_S = 2 * max_target_seq_length + 1;
120120
if (warpctcgrad_data == nullptr) {
121121
sm_workspace = sizeof(T) * sequence_width +

0 commit comments

Comments
 (0)