Skip to content

Commit 51d1a8c

Browse files
CUDA: better error for FA kernel with 0 occupancy (ggml-org#16643)
1 parent 4926419 commit 51d1a8c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ggml/src/ggml-cuda/fattn-common.cuh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,7 @@ void launch_fattn(
895895
const dim3 block_dim(warp_size, nwarps, 1);
896896
int max_blocks_per_sm = 1; // Max. number of active blocks limited by occupancy.
897897
CUDA_CHECK(cudaOccupancyMaxActiveBlocksPerMultiprocessor(&max_blocks_per_sm, fattn_kernel, block_dim.x * block_dim.y * block_dim.z, nbytes_shared));
898+
GGML_ASSERT(max_blocks_per_sm > 0);
898899
int parallel_blocks = max_blocks_per_sm;
899900

900901
dim3 blocks_num;

0 commit comments

Comments
 (0)