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
Original file line number Diff line number Diff line change
Expand Up @@ -1191,6 +1191,14 @@ void group_quantize(const GroupedTensor *input, const GroupedTensor *activations
"First logical dimension of a grouped tensor must be divisible by ", tile_dim_y,
".");
}
// SAME_BOTH_DIMS tiles each tensor and reduces its dbias in whole chunks, so a chunk must not
// span two tensors. The per-tensor rows are known on the host only for this representation.
if (shape_rep == ShapeRepresentation::SAME_BOTH_DIMS) {
NVTE_CHECK(
first_logical_dim % num_tensors == 0 && (first_logical_dim / num_tensors) % tile_dim_y == 0,
"First dimension of each tensor in a group must be divisible by ", tile_dim_y, ", got ",
first_logical_dim, " rows split across ", num_tensors, " tensors.");
Comment on lines +1196 to +1200

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Row rejection lacks a test

The existing grouped MXFP8 test skips members whose row count is not divisible by 128, so adding an invalid shape to its input list would not exercise this check. Add a standalone rejection test for two 64-row tensors: their total of 128 rows passes the old check but must fail the new one. Keep an aligned success case alongside it. This would catch future changes that accidentally remove the protection.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

}

const int64_t *const offsets_ptr = reinterpret_cast<const int64_t *>(output->tensor_offsets.dptr);
const int64_t *const first_dims_ptr = reinterpret_cast<const int64_t *>(output->first_dims.dptr);
Expand Down
Loading