Skip to content

Commit 52ce3a4

Browse files
committed
Tweak comments to use "compact/swizzled format"
Signed-off-by: Tim Moon <[email protected]>
1 parent b796c96 commit 52ce3a4

File tree

14 files changed

+19
-19
lines changed

14 files changed

+19
-19
lines changed

transformer_engine/common/cast/mxfp8/dequantize_mxfp8.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ inline void dequantize(const Tensor &input, Tensor *output, cudaStream_t stream)
240240
NVTE_CHECK(is_fp8_dtype(input.columnwise_data.dtype), "Input must have FP8 type.");
241241
}
242242

243-
NVTE_CHECK(!input.with_gemm_swizzled_scales, "Input must have scales in compact layout.");
243+
NVTE_CHECK(!input.with_gemm_swizzled_scales, "Input must have scales in compact format.");
244244
NVTE_CHECK(!is_fp8_dtype(output->data.dtype), "Output must be in higher precision.");
245245
NVTE_CHECK(output->data.shape == input.data.shape, "Input and output shapes need to match.");
246246

transformer_engine/common/cast/mxfp8/gated_mxfp8.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ void quantize_gated(const Tensor &gated_input, const Tensor &grad, Tensor *outpu
686686
if (USE_COLWISE_SCALING) {
687687
NVTE_CHECK(output->columnwise_scale_inv.dptr != nullptr, "Scaling tensor must be allocated.");
688688
}
689-
NVTE_CHECK(!output->with_gemm_swizzled_scales, "Scaling tensor must be in compact layout.");
689+
NVTE_CHECK(!output->with_gemm_swizzled_scales, "Scaling tensor must be in compact format.");
690690

691691
ScalingType scaling_type;
692692
if (USE_ROWWISE_SCALING && (!USE_COLWISE_SCALING)) {

transformer_engine/common/cast/mxfp8/quantize_mxfp8.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ void quantize(const Tensor &input, const Tensor *act_input, const Tensor *noop,
551551
NVTE_CHECK(input.has_data(), "Cannot quantize tensor without rowwise data.");
552552
NVTE_CHECK(is_fp8_dtype(output->dtype()), "Output must have FP8 type.");
553553
NVTE_CHECK(!output->with_gemm_swizzled_scales,
554-
"Output must have scales in compact layout.");
554+
"Output must have scales in compact format.");
555555
if (use_rowwise_scaling) {
556556
NVTE_CHECK(output->scale_inv.dptr != nullptr, "Scaling tensor must be allocated");
557557
}

transformer_engine/common/cast/nvfp4/dequantize_nvfp4.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ inline void dequantize(const Tensor &input, Tensor *output, cudaStream_t stream)
8080
CheckInputTensor(input, "input");
8181
CheckOutputTensor(*output, "output");
8282
NVTE_CHECK(input.data.dtype == DType::kFloat4E2M1, "Input must have FP4 type.");
83-
NVTE_CHECK(!input.with_gemm_swizzled_scales, "Input must have scales in compact layout.");
83+
NVTE_CHECK(!input.with_gemm_swizzled_scales, "Input must have scales in compact format.");
8484
NVTE_CHECK(is_high_precision_dtype(output->data.dtype), "Output must be in higher precision.");
8585
NVTE_CHECK(output->data.shape == input.data.shape, "Input and output shapes need to match.");
8686

transformer_engine/common/cast/nvfp4/quantize_nvfp4.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ inline void quantize(const Tensor &input, const Tensor *noop, Tensor *output, cu
559559
NVTE_CHECK(is_fp4_dtype(output->data.dtype), "Output must have FP4 type.");
560560
NVTE_CHECK(output->scale_inv.dptr != nullptr, "Scaling tensor must be allocated");
561561
NVTE_CHECK(!output->with_gemm_swizzled_scales,
562-
"Output must have scales in compact layout.");
562+
"Output must have scales in compact format.");
563563

564564
bool use_colwise_scaling = output->has_columnwise_data();
565565
if (use_colwise_scaling) {

transformer_engine/common/cast/nvfp4/quantize_transpose_nvfp4.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@ void quantize_transpose(const Tensor &input, const Tensor *noop, Tensor *output,
11801180
NVTE_CHECK(is_fp4_dtype(output->data.dtype), "Output must have FP4 type.");
11811181
NVTE_CHECK(output->scale_inv.dptr != nullptr, "Scaling tensor must be allocated");
11821182
NVTE_CHECK(!output->with_gemm_swizzled_scales,
1183-
"Output must have scales in compact layout.");
1183+
"Output must have scales in compact format.");
11841184
if (return_transpose) {
11851185
NVTE_CHECK(output->has_columnwise_data(), "NVFP4 transposed output tensor must be allocated.");
11861186
NVTE_CHECK(is_fp4_dtype(output->columnwise_data.dtype),

transformer_engine/common/comm_gemm_overlap/comm_gemm_overlap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ TensorWrapper CommOverlapCore::get_tensor_chunk(const TensorWrapper &source, siz
184184
&has_swizzled_scales, sizeof(has_swizzled_scales),
185185
nullptr);
186186
NVTE_CHECK(has_swizzled_scales,
187-
"Expected MFP8 tensor with scales in GEMM swizzled layout.");
187+
"Expected MFP8 tensor with scales in GEMM swizzled format.");
188188
}
189189

190190
// Tensor dimensions

transformer_engine/common/common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ struct Tensor {
133133

134134
NVTEScalingMode scaling_mode;
135135
NVTETensor nvte_tensor;
136-
/*! Whether scaling factors are in layout expected by GEMM */
136+
/*! Whether scaling factors are in format expected by GEMM */
137137
bool with_gemm_swizzled_scales = false;
138138

139139
/*! Map from NVTETensorParam to parameter sizes */

transformer_engine/common/swizzle/swizzle.cu

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,9 @@ void swizzle_scaling_factors(const Tensor* input, Tensor* output, cudaStream_t s
341341
CheckInputTensor(*input, "scaling_factor_input");
342342
CheckInputTensor(*output, "scaling_factor_output");
343343
NVTE_CHECK(!input->with_gemm_swizzled_scales,
344-
"Expected input tensor with scales in compact layout.");
344+
"Expected input tensor with scales in compact format.");
345345
NVTE_CHECK(output->with_gemm_swizzled_scales,
346-
"Expected output tensor with scales in swizzled layout for GEMM.");
346+
"Expected output tensor with scales in GEMM swizzled format.");
347347
switch (scaling_mode) {
348348
case NVTE_MXFP8_1D_SCALING:
349349
NVTE_CHECK(is_fp8_dtype(input->dtype()), "Input tensor has invalid dtype (expected FP8, got ",
@@ -661,9 +661,9 @@ void multi_tensor_swizzle_scaling_factors(const std::vector<Tensor*>& input,
661661
(is_fp8 && is_mxfp8_scaling(scaling_mode)) || (is_fp4 && is_nvfp4_scaling(scaling_mode)),
662662
"Not implemented scaling mode " + to_string(scaling_mode) + ".");
663663
NVTE_CHECK(!input[i]->with_gemm_swizzled_scales,
664-
"Expected input tensors with scales in compact layout.");
664+
"Expected input tensors with scales in compact format.");
665665
NVTE_CHECK(output[i]->with_gemm_swizzled_scales,
666-
"Expected output tensors with scales in swizzled layout for GEMM.");
666+
"Expected output tensors with scales in GEMM swizzled format.");
667667

668668
// We don't allow empty tensors. They should be filtered out before calling this function.
669669
NVTE_CHECK(input[i]->numel() != 0, "Tensor input[", i, "] is empty.");

transformer_engine/common/swizzle/swizzle_block_scaling.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,9 @@ void swizzle_block_scaling_to_mxfp8_scaling_factors(const Tensor* input, Tensor*
262262
"Output must have E8M0 scaling factors");
263263

264264
NVTE_CHECK(input->with_gemm_swizzled_scales,
265-
"Expected input tensor with scales in swizzled layout for GEMM.");
265+
"Expected input tensor with scales in GEMM swizzled format.");
266266
NVTE_CHECK(output->with_gemm_swizzled_scales,
267-
"Expected output tensor with scales in swizzled layout for GEMM.");
267+
"Expected output tensor with scales in GEMM swizzled format.");
268268

269269
NVTE_CHECK(input->data.dptr != nullptr, "Input must have rowwise data");
270270
NVTE_CHECK(output->data.dptr == input->data.dptr, "Output must share data with input");

0 commit comments

Comments
 (0)