14 views

deepseek-ai/DeepGEMM

DeepGEMM: clean and efficient BLAS kernel library on GPU

Cuda★ 8,776+199 that day#6 on trending

Analyzed October 7, 2026 at 057ca59 (main) with jscpd 5.4.0 in 0.1s.

D51.6/100
Project health18,676 lines of code (M)
Duplication36
13.4% in cpp-header, python, bash, perl, cpp
Dead code89
0.8%
Complexity59
40%

The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.

17.48%duplicated code · 2,453 of 14,030 lines
243clones in code
78code files of 107 scanned
12.63%duplicated over all files · 252 clones

The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code.

Largest clones in the code

  • 10 lines in 17 placescpp-header80 tokens
    121SM100BF16GemmRuntime::compile_and_launch("sm100_bf16_gemm", {
    122    .gemm_desc = desc,
    123    .gemm_config = config,
    124    .options = {
    125        .num_smem_bytes = config.pipeline_config.smem_size,
    126        .grid_dim = dim3(config.launch_config.num_sms, 1, 1),
    127        .block_dim = dim3(config.launch_config.num_threads, 1, 1),
    128        .cluster_dim = dim3(config.layout.get_cluster_size(), 1, 1),
    129    },
    130    .grouped_layout = nullptr,
    
    193SM100BF16GemmRuntime::compile_and_launch("sm100_bf16_m_grouped_gemm_contiguous", {
    194    .gemm_desc = desc,
    195    .gemm_config = config,
    196    .options = {
    197        .num_smem_bytes = config.pipeline_config.smem_size,
    198        .grid_dim = dim3(config.launch_config.num_sms, 1, 1),
    199        .block_dim = dim3(config.launch_config.num_threads, 1, 1),
    200        .cluster_dim = dim3(config.layout.get_cluster_size(), 1, 1),
    201    },
    202    .grouped_layout = grouped_layout.data_ptr(),
    
  • 31 lines in 2 placescpp-header327 tokens
    28DG_HOST_ASSERT(n <= 128 and n % 8 == 0);
    29DG_HOST_ASSERT(k % block_k == 0);
    30
    31const auto swizzle_cd_mode = get_swizzle_mode(block_n, sizeof(float));
    32const auto tensor_map_a = make_tma_a_desc(cute::UMMA::Major::K, a, m, k,
    33                                          block_m, block_k,
    34                                          static_cast<int>(a.stride(get_non_contiguous_dim(cute::UMMA::Major::K))), 1,
    35                                          get_swizzle_mode(block_k, a.element_size()), 0,
    36                                          true);
    37const auto tensor_map_b = make_tma_b_desc(cute::UMMA::Major::K, b, n, k,
    

    First 10 of 31 lines.

  • 12 lines in 3 placescpp-header146 tokens
    135static void fp8_fp4_gemm_nn(const std::pair<torch::Tensor, torch::Tensor>& a,
    136                            const std::pair<torch::Tensor, torch::Tensor>& b,
    137                            const torch::Tensor& d,
    138                            const std::optional<torch::Tensor>& c,
    139                            const std::optional<std::tuple<int, int, int>>& recipe,
    140                            const std::optional<std::tuple<int, int>>& recipe_a,
    141                            const std::optional<std::tuple<int, int>>& recipe_b,
    142                            const std::string& compiled_dims,
    143                            const bool& disable_ue8m0_cast,
    144                            const std::optional<float>& alpha,
    

    First 10 of 12 lines.

7 more
Largest clones over all files, tests and data included
By format, code only
FormatFilesLinesClonesDuplicated linesDuplication
cpp-header4810,0792302,31122.93%
python162,957131424.8%
bash12771000%
perl1174000%
cpp149000%
By format, all files
FormatFilesLinesClonesDuplicated linesDuplication
cpp-header4810,0792302,31122.93%
python367,760211952.51%
yaml33751164.27%
bash12771000%
markdown2684000%
perl1174000%
cpp254000%
txt134000%
text231000%

Trending appearances

DayRankStarsFilesLinesClonesAll filesCodeHealthCommit
Oct 7, 2026#68,776 (+199)10719,96225212.63%17.48%D 51.6057ca59

Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.