Skip to content

Commit e6bf02a

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent cd92f72 commit e6bf02a

4 files changed

Lines changed: 235 additions & 237 deletions

File tree

tests/cpp/operator/test_cast_mxfp8_grouped.cu

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ void performTest_x1(const ProcessingMethod processing_method,
263263
std::vector<OutputType> out_data_colwise_h(colwise ? elts_num : 0);
264264
std::vector<fp8e8m0> out_scales_rowwise_h(rowwise ? sfs_num : 0);
265265
std::vector<fp8e8m0> out_scales_colwise_h(colwise ? sfs_num : 0);
266-
266+
267267
std::vector<OutputType> out_data_rowwise_ref(rowwise ? elts_num : 0);
268268
std::vector<OutputType> out_data_colwise_ref(colwise ? elts_num : 0);
269269
std::vector<fp8e8m0> out_scales_rowwise_ref(rowwise ? sfs_num : 0);
@@ -310,7 +310,7 @@ void performTest_x1(const ProcessingMethod processing_method,
310310
cudaMalloc((void**)&first_dims_d, first_dims_size);
311311
cudaMalloc((void**)&last_dims_d, last_dims_size);
312312
cudaMalloc((void**)&offsets_d, offsets_size);
313-
313+
314314
cudaMemcpy(in_data_d, in_data.data(), in_data_size, cudaMemcpyHostToDevice);
315315
cudaMemcpy(first_dims_d, first_dims_h.data(), first_dims_size, cudaMemcpyHostToDevice);
316316
cudaMemcpy(last_dims_d, last_dims_h.data(), last_dims_size, cudaMemcpyHostToDevice);
@@ -393,7 +393,7 @@ void performTest_x1(const ProcessingMethod processing_method,
393393
OutputType* const out_data_colwise_ptr = out_data_colwise_ref.data() + data_offset;
394394
fp8e8m0* const out_scales_rowwise_ptr = out_scales_rowwise_ref.data() + sfs_offset;
395395
fp8e8m0* const out_scales_colwise_ptr = out_scales_colwise_ref.data() + sfs_offset;
396-
396+
397397
compute_ref<InputType, OutputType>(
398398
processing_method, OP, rowwise, colwise, in_ptr, /*grad=*/ nullptr,
399399
out_data_rowwise_ptr, out_data_colwise_ptr,
@@ -516,7 +516,7 @@ TEST_P(GroupedFusedCastMXFP8TestSuite, Test) {
516516

517517
using namespace transformer_engine;
518518
using namespace test;
519-
519+
520520
const ProcessingMethod processing_method = std::get<0>(GetParam());
521521
const ActivationKind activation = std::get<1>(GetParam());
522522
const ScalingDirection scaling_direction = std::get<2>(GetParam());
@@ -532,7 +532,7 @@ TEST_P(GroupedFusedCastMXFP8TestSuite, Test) {
532532
switch (shape_rep) {
533533
case SAME_BOTH_DIMS: {
534534
first_dims[t] = logical_shape[0] / num_tensors;
535-
last_dims[t] = logical_shape[1];
535+
last_dims[t] = logical_shape[1];
536536
break;
537537
}
538538
case VARYING_FIRST_DIM: {

transformer_engine/common/cast/cast.cu

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ void nvte_quantize(const NVTETensor input, NVTETensor output, cudaStream_t strea
2727
// dispatch::quantize_fwd_helper<IS_ACT, Empty, nullptr>(input, output, nullptr, stream);
2828
}
2929

30-
void nvte_quantize_grouped(const NVTEGroupedTensor input, NVTEGroupedTensor output, cudaStream_t stream) {
30+
void nvte_quantize_grouped(const NVTEGroupedTensor input, NVTEGroupedTensor output,
31+
cudaStream_t stream) {
3132
NVTE_API_CALL(nvte_quantize_grouped);
3233
using namespace transformer_engine;
3334

transformer_engine/common/cast/dispatch/quantize_grouped.cuh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ void quantize_grouped_fwd_helper(const NVTEGroupedTensor input, NVTEGroupedTenso
5959
GroupedTensor *workspace_tensor = convertNVTEGroupedTensor(workspace);
6060

6161
mxfp8::quantize_grouped</*IS_DBIAS=*/false, /*IS_DACT=*/false, IS_ACT, ParamOP, OP>(
62-
input_tensor, activations_tensor, noop_tensor, output_tensor, dbias_tensor, workspace_tensor, stream);
62+
input_tensor, activations_tensor, noop_tensor, output_tensor, dbias_tensor,
63+
workspace_tensor, stream);
6364
break;
6465
}
6566
default:

0 commit comments

Comments
 (0)