Skip to content

Commit

Permalink
auto format by CI
Browse files Browse the repository at this point in the history
  • Loading branch information
oneflow-ci-bot committed Aug 11, 2023
1 parent 585b93a commit 8d5adbf
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions oneflow/user/kernels/flip_kernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,11 @@ 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 8d5adbf

Please sign in to comment.