Skip to content
Open
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
6 changes: 6 additions & 0 deletions fbgemm_gpu/src/jagged_tensor_ops/common.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,13 @@ inline std::tuple<dim3, dim3, StackArray<int64_t>> check_shape_and_partition_(

const int threads_x =
inner_dense_size >= kWarpSize / 2 ? kWarpSize : inner_dense_size;
#ifndef USE_ROCM
const int threads_y = kMaxThreads / kWarpSize;
#else
// AMD: ~256-thread blocks improve wavefront packing for common D=1 shapes.
constexpr int kTargetBlockThreads = 256;
const int threads_y = kTargetBlockThreads / threads_x;
#endif
const dim3 blocks(
div_round_up(outer_dense_size * jagged_folded_size, threads_y));

Expand Down
Loading