sycl:refine convert

Signed-off-by: zhentaoyu <zhentao.yu@intel.com>
This commit is contained in:
zhentaoyu 2024-08-16 01:46:54 +00:00
parent bd960a67dc
commit df3f1c1850

View file

@ -424,9 +424,8 @@ static void convert_unary(const void * __restrict__ vx, dst_t * __restrict__ y,
const int64_t global_id = item_ct1.get_local_id(2) + work_group_size * item_ct1.get_group(2); const int64_t global_id = item_ct1.get_local_id(2) + work_group_size * item_ct1.get_group(2);
// make each work-item deal with more elements since sycl global range can not exceed max int // make each work-item deal with more elements since sycl global range can not exceed max int
const src_t * x = (src_t *) vx;
for (int64_t i = global_id; i < k; i += work_group_size * item_ct1.get_group_range(2)) { for (int64_t i = global_id; i < k; i += work_group_size * item_ct1.get_group_range(2)) {
const src_t * x = (src_t *) vx;
y[i] = x[i]; y[i] = x[i];
} }
} }