8 views
tile-ai/tilelang
Domain-specific language designed to streamline the development of high-performance GPU/CPU/Accelerators kernels
Python★ 8,159+163 that day#6 on trending
D43.8/100
Duplication29
15.2% in python, cpp, c-header, cpp-header, bash, cmake, perlDead code95
0.5%Complexity43
61.1% The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
10.82%duplicated code · 31,077 of 287,152 lines
2,055clones in code
822code files of 1,897 scanned
15%duplicated over all files · 5,837 clones
Most complex files
- 3rdparty/hip-headers/include/hip/amd_detail/hip_prof_str.h3032 cx
- src/ascend/codegen/codegen_pto.cc1728 cx
- src/cuda/codegen/codegen_cuda.cc1438 cx
- src/tl_templates/cpp/half.hpp1061 cx
- src/ascend/codegen/codegen_ascend.cc962 cx
- src/cuda/codegen/codegen_cutedsl.cc776 cx
- src/transform/inject_pipeline.cc684 cx
- src/rocm/codegen/codegen_hip.cc612 cx
- src/cuda/transform/materialize_ws_schedule.cc530 cx
- src/ascend/transform/insert_sync.cc494 cx
Dead code 0.52% unused · 104 findings
- maint/scripts/pytest_cuda_scheduler.pyunused-file
- tilelang/language/tir/ir.pyiunused-file
- docs/conf.pyunused-file
- maint/layout_inference/cases/broadcast_read.pyunused-file
- maint/layout_inference/cases/reducer_scalar_candidates.pyunused-file
- maint/layout_inference/cases/offset_region_copy.pyunused-file
- maint/layout_inference/cases/reduce_broadcast.pyunused-file
- maint/layout_inference/cases/mixed_dtype_chain.pyunused-file
- maint/layout_inference/cases/elementwise_copy.pyunused-file
- maint/layout_inference/cases/transposed_store.pyunused-file
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code, and 2 generated files: 3rdparty/hip-headers/include/hip/amd_detail/hip_prof_str.h, 3rdparty/hip-headers/include/hip/hip_version.h.
Largest clones in the code
- 21 lines in 21 placescpp799 tokenssrc/ascend/target.cc:1–21src/ascend/transform/assign_core.cc:1–21src/ascend/transform/auto_schedule.cc:1–21src/ascend/transform/auto_schedule/dependency_analysis.cc:1–21src/ascend/transform/auto_schedule/ir_structure.cc:1–21and 16 more
1/* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0First 10 of 21 lines.
- 1010 lines in 2 placescpp8,914 tokens
582 // depend on threadIdx, the recursive visit of args below (via 583 // IRMutatorWithAnalyzer::VisitExpr_) will correctly mark the 584 // condition as non-block-uniform through VisitExpr_(VarNode*). 585 // 586 // Mirrors the BufferLoadNode handling above(#90299d68); without this, 587 // conditions like `T.any_of(local_fragment[:])` get hoisted out of the 588 // if-body and break write-before-read sync between shared-memory loads 589 // and mma/tma reads. 590} 591return IRMutatorWithAnalyzer::VisitExpr_(op);First 10 of 1010 lines.
- 670 lines in 2 placescpp6,121 tokenssrc/ascend/transform/layout_inference.cc:51–720src/transform/layout_inference/layout_inference.cc:46–715
51namespace ascend { 52 53using namespace tirx; 54using namespace ffi; 55 56namespace { 57 58int64_t GetElementStorageBits(DataType dtype) { 59 // Layout aliasing must be reasoned about in logical storage bits per element, 60 // not in bytes. For sub-byte dtypes such as fp4, `dtype.bytes()` rounds upFirst 10 of 670 lines.
7 more
- 640 lines in 2 placescpp6,084 tokens
- 21 lines in 8 placesc-header799 tokens
- 18 lines in 7 placesc-header788 tokens
- 495 lines in 2 placescpp4,279 tokens
- 66 lines in 5 placesc-header1,061 tokens
- 60 lines in 5 placesc-header1,057 tokens
- 18 lines in 7 placescpp633 tokens
Largest clones over all files, tests and data included
- 21 lines in 21 placescpp799 tokenssrc/ascend/target.cc:1–21src/ascend/transform/assign_core.cc:1–21src/ascend/transform/auto_schedule.cc:1–21src/ascend/transform/auto_schedule/dependency_analysis.cc:1–21src/ascend/transform/auto_schedule/ir_structure.cc:1–21and 16 more
1/* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0First 10 of 21 lines.
- 23 lines in 10 placesc-headervendored1,086 tokens3rdparty/hip-headers/include/hip/amd_detail/amd_channel_descriptor.h:1–233rdparty/hip-headers/include/hip/amd_detail/amd_device_functions.h:1–233rdparty/hip-headers/include/hip/amd_detail/amd_math_functions.h:1–233rdparty/hip-headers/include/hip/amd_detail/hip_fp16_math_fwd.h:1–233rdparty/hip-headers/include/hip/amd_detail/math_fwd.h:1–23and 5 more
1/* 2Copyright (c) 2015 - 2023 Advanced Micro Devices, Inc. All rights reserved. 3 4Permission is hereby granted, free of charge, to any person obtaining a copy 5of this software and associated documentation files (the "Software"), to deal 6in the Software without restriction, including without limitation the rights 7to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8copies of the Software, and to permit persons to whom the Software is 9furnished to do so, subject to the following conditions: 10First 10 of 23 lines.
- 1010 lines in 2 placescpp8,914 tokens
582 // depend on threadIdx, the recursive visit of args below (via 583 // IRMutatorWithAnalyzer::VisitExpr_) will correctly mark the 584 // condition as non-block-uniform through VisitExpr_(VarNode*). 585 // 586 // Mirrors the BufferLoadNode handling above(#90299d68); without this, 587 // conditions like `T.any_of(local_fragment[:])` get hoisted out of the 588 // if-body and break write-before-read sync between shared-memory loads 589 // and mma/tma reads. 590} 591return IRMutatorWithAnalyzer::VisitExpr_(op);First 10 of 1010 lines.
- 670 lines in 2 placescpp6,121 tokens
- 640 lines in 2 placescpp6,084 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| cpp | 215 | 132,826 | 920 | 15,890 | 11.96% |
| python | 415 | 103,451 | 626 | 9,035 | 8.73% |
| c-header | 169 | 42,497 | 430 | 5,439 | 12.8% |
| cpp-header | 3 | 6,364 | 78 | 706 | 11.09% |
| bash | 19 | 1,840 | 1 | 7 | 0.38% |
| perl | 1 | 174 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| python | 1,254 | 283,243 | 3,716 | 50,071 | 17.68% |
| c-header | 207 | 80,969 | 1,052 | 11,205 | 13.84% |
| cpp | 224 | 133,195 | 923 | 15,923 | 11.95% |
| cpp-header | 4 | 8,138 | 78 | 706 | 8.68% |
| json | 11 | 1,966 | 20 | 775 | 39.42% |
| yaml | 19 | 2,043 | 19 | 330 | 16.15% |
| markdown | 91 | 15,981 | 13 | 265 | 1.66% |
| bash | 42 | 2,270 | 5 | 46 | 2.03% |
| txt | 12 | 1,942 | 5 | 415 | 21.37% |
| markup | 4 | 501 | 4 | 35 | 6.99% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Oct 2, 2026 | #6 | 8,159 (+163) | 1,897 | 531,872 | 5,837 | 15% | 10.82% | D 43.8 | 994b44e |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.