Skip to content

Commit

Permalink
Update flip_kernel.cu
Browse files Browse the repository at this point in the history
  • Loading branch information
marigoold authored Aug 11, 2023
1 parent 0fc1378 commit 585b93a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions oneflow/user/kernels/flip_kernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ class FlipGpuKernel final : public user_op::OpKernel {
for (auto x : dims) { vis.val[x] = true; }

if (dims.size() == 1 && dims[0] == x_tensor->shape_view().NumAxes() - 1) {
// FlipLastDimGpuForward<T><<<BlocksNum4ThreadsNum(elem_cnt), kCudaThreadsNumPerBlock,
// 0,
// ctx->stream()->As<ep::CudaStream>()->cuda_stream()>>>(
// elem_cnt, x_tensor->shape_view().At(total_dims - 1), x_tensor->dptr<T>(),
// y_tensor->mut_dptr<T>());
// return;
FlipLastDimGpuForward<T><<<BlocksNum4ThreadsNum(elem_cnt), kCudaThreadsNumPerBlock,
0,
ctx->stream()->As<ep::CudaStream>()->cuda_stream()>>>(
elem_cnt, x_tensor->shape_view().At(total_dims - 1), x_tensor->dptr<T>(),
y_tensor->mut_dptr<T>());
return;
}
SIZE_V sizes_v;
Expand Down

0 comments on commit 585b93a

Please sign in to comment.