Skip to content

Commit

Permalink
Fix index_with_sort kernel accuracy error with nonstandard bool dty…
Browse files Browse the repository at this point in the history
…pe (#1104)

Resolve issue: #1048
  • Loading branch information
xytintel authored Nov 20, 2024
1 parent 97fb903 commit 7f99952
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ATen/native/xpu/sycl/Indexing.h
Original file line number Diff line number Diff line change
Expand Up @@ -802,16 +802,16 @@ struct IndexPutDeterministicKernelFunctor {

accscalar_t acc;
if (accumulate_)
acc = self_[s_gid];
acc = c10::load(&self_[s_gid]);
for (int64_t inner_idx = id.glb_batch;
inner_idx < cfg_.problem_batch_ && sorted_indices_[inner_idx] == idx;
inner_idx++) {
int64_t idx_orig = indices_[inner_idx];
int64_t v_gid = idx_orig * stride_ + v_stride;
if (accumulate_) {
acc += (accscalar_t)value_[v_gid];
acc += (accscalar_t)c10::load(&value_[v_gid]);
} else {
self_[s_gid] = value_[v_gid];
self_[s_gid] = c10::load(&value_[v_gid]);
break;
}
}
Expand Down

0 comments on commit 7f99952

Please sign in to comment.