Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/infiniop/ops/lp_norm/cuda/kernel.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ __device__ void warpLPNormKernel(T const *input, T *output,
}
__syncthreads();
float global_max = max(p_max[threadIdx.y], eps);
float global_max_inv = __fdividef(1.0F, max(p_max[threadIdx.y], eps));
float global_max_inv = __fdividef(1.0F, global_max);
float p_data = 0.0f;

for (int ind = threadIdx.x; ind < dimsize; ind += BLOCK_SIZE_x) {
Expand Down Expand Up @@ -201,7 +201,7 @@ __device__ void warpLPNormStridesKernel(T const *input, T *output, const ptrdiff
}
__syncthreads();
float global_max = max(p_max[threadIdx.y], eps);
float global_max_inv = __fdividef(1.0F, max(p_max[threadIdx.y], eps));
float global_max_inv = __fdividef(1.0F, global_max);
float p_data = 0.0f;

for (int ind = threadIdx.x; ind < dimsize; ind += BLOCK_SIZE_x) {
Expand Down
Loading