/*
 * Copyright (c) 2026 by FlashInfer team.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
#include <flashinfer/gemm/group_gemm_nvfp4_groupwise_sm120.cuh>

using namespace flashinfer;
using namespace flashinfer::group_gemm;

namespace flashinfer {
namespace group_gemm {

{% for tile_m in [128] %}
{% for tile_n in [32, 64, 128] %}
{% for tile_k in [128, 256] %}
{% for swap_ab in ["true", "false"] %}
{% for dtype_sfa in ["cutlass::float_ue4m3_t"] %}
{% for dtype_sfb in ["cutlass::float_ue4m3_t"] %}


INSTANTIATE_GROUP_GEMM_NVFP4_GROUPWISE_SM120(
    {{ tile_m }},
    {{ tile_n }},
    {{ tile_k }},
    {{ swap_ab }},
    {{ dtype_a | trim }},
    {{ dtype_b  | trim }},
    {{ dtype_sfa | trim  }},
    {{ dtype_sfb  | trim }},
    {{ dtype_d  | trim }},
    {{ dtype_a | replace("cutlass::", "") }},
    {{ dtype_b  | replace("cutlass::", "")}},
    {{ dtype_sfa  | replace("cutlass::", "")}},
    {{ dtype_sfb  | replace("cutlass::", "")}},
    {{ dtype_d  | replace("cutlass::", "")}}
)

{% endfor %}
{% endfor %}
{% endfor %}
{% endfor %}
{% endfor %}
{% endfor %}

};  // namespace group_gemm
};  // namespace flashinfer
