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
12 changes: 6 additions & 6 deletions csrc/ck_gemm_moe_2stages_codegen/gen_instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
}}
else if (block_m == 128)
{{
if (inter_dim <= 192)
if (inter_dim <= 192 || inter_dim % 128 != 0)
{{
return ck_moe_stage1_gemm<{A0DataType}, {B0DataType}, {AccDataType}, {EDataType}, {CDEElementOp}, V1, 256, 128, 64, 128/sizeof({A0DataType}), 1, 4, {Nswizzle}, {Quant} == static_cast<int>(QuantType::per_Tensor), {MulRoutedWeight}, {ActOP}>;
}}
Expand All @@ -95,7 +95,7 @@
}}
else if (block_m == 256)
{{
if (inter_dim <= 192)
if (inter_dim <= 192 || inter_dim % 128 != 0)
{{
return ck_moe_stage1_gemm<{A0DataType}, {B0DataType}, {AccDataType}, {EDataType}, {CDEElementOp}, V1, 256, 256, 64, 128/sizeof({A0DataType}), 1, 4, {Nswizzle}, {Quant} == static_cast<int>(QuantType::per_Tensor), {MulRoutedWeight}, {ActOP}>;
}}
Expand Down Expand Up @@ -370,7 +370,7 @@
{{
if (block_m == 32)
{{
if (inter_dim <= 192)
if (inter_dim <= 192 || inter_dim % 128 != 0)
{{
return ck_moe_stage2_gemm<{A0DataType}, {B0DataType}, {AccDataType}, {EDataType}, {CDEElementOp}, V1, 256, 32, 64, 64, 1, 4, {Nswizzle}, {Quant} == static_cast<int>(QuantType::per_Tensor), {MulRoutedWeight}, {ActOP}>;
}}
Expand All @@ -381,7 +381,7 @@
}}
else if (block_m == 64)
{{
if (inter_dim <= 192)
if (inter_dim <= 192 || inter_dim % 128 != 0)
{{
return ck_moe_stage2_gemm<{A0DataType}, {B0DataType}, {AccDataType}, {EDataType}, {CDEElementOp}, V1, 256, 64, 128, 64, 1, 4, {Nswizzle}, {Quant} == static_cast<int>(QuantType::per_Tensor), {MulRoutedWeight}, {ActOP}>;
}}
Expand All @@ -392,7 +392,7 @@
}}
else if (block_m == 128)
{{
if (inter_dim <= 192)
if (inter_dim <= 192 || inter_dim % 128 != 0)
{{
return ck_moe_stage2_gemm<{A0DataType}, {B0DataType}, {AccDataType}, {EDataType}, {CDEElementOp}, V3, 256, 128, 64, 64, 1, 4, {Nswizzle}, {Quant} == static_cast<int>(QuantType::per_Tensor), {MulRoutedWeight}, {ActOP}>;
}}
Expand All @@ -403,7 +403,7 @@
}}
else if (block_m == 256)
{{
if (inter_dim <= 192)
if (inter_dim <= 192 || inter_dim % 128 != 0)
{{
return ck_moe_stage2_gemm<{A0DataType}, {B0DataType}, {AccDataType}, {EDataType}, {CDEElementOp}, V3, 256, 256, 128, 64, 1, 4, {Nswizzle}, {Quant} == static_cast<int>(QuantType::per_Tensor), {MulRoutedWeight}, {ActOP}>;
}}
Expand Down
Loading