Repository Analysis

triton-lang/triton

Development repository for the Triton language and compiler

9.8 Low AI signal View on GitHub
9.8
Adjusted Score
9.8
Raw Score
100%
Time Factor
2026-05-30
Last Push
19,314
Stars
MLIR
Language
372,980
Lines of Code
1233
Files
3109
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 15HIGH 13MEDIUM 404LOW 2677

Pattern Findings

3109 matches across 18 categories. Click a row to expand file-level details.

Decorative Section Separators365 hits · 954 pts
SeverityFileLineSnippet
MEDIUMpython/test/unit/cuda/test_libdevice_cuda.py12# -----------------------
MEDIUMpython/test/unit/cuda/test_libdevice_cuda.py14# -----------------------
MEDIUMpython/test/unit/language/test_standard.py8# ---------------
MEDIUMpython/test/unit/language/test_standard.py10# ---------------
MEDIUMpython/test/unit/language/test_standard.py23# ---------------
MEDIUMpython/test/unit/language/test_standard.py25# ---------------
MEDIUMpython/test/unit/language/test_standard.py62# ---------------
MEDIUMpython/test/unit/language/test_standard.py64# ---------------
MEDIUMpython/test/unit/language/test_core.py369# ---------------
MEDIUMpython/test/unit/language/test_core.py371# ---------------
MEDIUMpython/test/unit/language/test_core.py515# ---------------
MEDIUMpython/test/unit/language/test_core.py556# ---------------
MEDIUMpython/test/unit/language/test_core.py558# ---------------
MEDIUMpython/test/unit/language/test_core.py583# ---------------
MEDIUMpython/test/unit/language/test_core.py585# ---------------
MEDIUMpython/test/unit/language/test_core.py615# ----------
MEDIUMpython/test/unit/language/test_core.py617# ----------
MEDIUMpython/test/unit/language/test_core.py664# ------------------
MEDIUMpython/test/unit/language/test_core.py666# ------------------
MEDIUMpython/test/unit/language/test_core.py681# ----------------
MEDIUMpython/test/unit/language/test_core.py683# ----------------
MEDIUMpython/test/unit/language/test_core.py792# ----------------------------
MEDIUMpython/test/unit/language/test_core.py794# ----------------------------
MEDIUMpython/test/unit/language/test_core.py808# ---------------
MEDIUMpython/test/unit/language/test_core.py810# ---------------
MEDIUMpython/test/unit/language/test_core.py902# ---------------
MEDIUMpython/test/unit/language/test_core.py904# ---------------
MEDIUMpython/test/unit/language/test_core.py935# ----------------
MEDIUMpython/test/unit/language/test_core.py937# ----------------
MEDIUMpython/test/unit/language/test_core.py1006# -------------
MEDIUMpython/test/unit/language/test_core.py1008# -------------
MEDIUMpython/test/unit/language/test_core.py1067# ----------------
MEDIUMpython/test/unit/language/test_core.py1069# ----------------
MEDIUMpython/test/unit/language/test_core.py1114# ----------------
MEDIUMpython/test/unit/language/test_core.py1116# ----------------
MEDIUMpython/test/unit/language/test_core.py1148# ----------------
MEDIUMpython/test/unit/language/test_core.py1150# ----------------
MEDIUMpython/test/unit/language/test_core.py1175# ----------------
MEDIUMpython/test/unit/language/test_core.py1177# ----------------
MEDIUMpython/test/unit/language/test_core.py1358# ---------------
MEDIUMpython/test/unit/language/test_core.py1360# ---------------
MEDIUMpython/test/unit/language/test_core.py1870# ---------------
MEDIUMpython/test/unit/language/test_core.py1872# ---------------
MEDIUMpython/test/unit/language/test_core.py2316# ---------------
MEDIUMpython/test/unit/language/test_core.py2318# ---------------
MEDIUMpython/test/unit/language/test_core.py2871# ---------------
MEDIUMpython/test/unit/language/test_core.py2873# ---------------
MEDIUMpython/test/unit/language/test_core.py2921# ------------------------
MEDIUMpython/test/unit/language/test_core.py2923# ------------------------
MEDIUMpython/test/unit/language/test_core.py3118# ---------------
MEDIUMpython/test/unit/language/test_core.py3120# ---------------
MEDIUMpython/test/unit/language/test_core.py3235# ---------------
MEDIUMpython/test/unit/language/test_core.py3237# ---------------
MEDIUMpython/test/unit/language/test_core.py4605# ---------------
MEDIUMpython/test/unit/language/test_core.py4607# ---------------
MEDIUMpython/test/unit/language/test_core.py4782# --------------------
MEDIUMpython/test/unit/language/test_core.py4784# --------------------
MEDIUMpython/test/unit/language/test_core.py5054# -------------
MEDIUMpython/test/unit/language/test_core.py5056# -------------
MEDIUMpython/test/unit/language/test_core.py4301# ---------------
305 more matches not shown…
Hyper-Verbose Identifiers1065 hits · 891 pts
SeverityFileLineSnippet
LOWsetup.py550def get_triton_version_suffix():
LOWpython/build_helpers.py126def _download_file_with_urllib(url: str, path: str, label: str):
LOWpython/build_helpers.py380def _get_thirdparty_package_cmake_vars(package: Package, helper_args: BuildHelperArgs):
LOWpython/build_helpers.py414def get_thirdparty_cmake_vars(packages: list[str], helper_args: BuildHelperArgs):
LOWpython/build_helpers.py434def write_thirdparty_cmake_vars(output: str, packages: list[str], helper_args: BuildHelperArgs):
LOWpython/build_helpers.py482def download_and_copy_dependencies(helper_args: BuildHelperArgs):
LOWpython/test/conftest.py45def fresh_knobs_including_libraries():
LOWpython/test/unit/test_debug.py24def _run_device_assert_barrier(device):
LOWpython/test/unit/test_debug.py38def _run_expect_zero_device_assert(device):
LOWpython/test/unit/test_debug.py54def test_expect_zero_device_assert(device):
LOWpython/test/unit/test_debug.py76def test_device_assert_barrier(device):
LOWpython/test/unit/test_debug.py151def test_sanitize_int_add_overflow(x, y, x_dtype, y_dtype, debug, should_overflow, device):
LOWpython/test/unit/test_debug.py167def test_sanitize_int_mul_overflow(x, y, x_dtype, y_dtype, debug, should_overflow, device):
LOWpython/test/unit/test_debug.py182def test_sanitize_int_sub_overflow(x, y, x_dtype, y_dtype, debug, should_overflow, device):
LOWpython/test/unit/test_perf_warning.py12def enable_diagnostics_context(value):
LOWpython/test/unit/test_perf_warning.py98def test_remark_vectorization(capfd, fresh_triton_cache):
LOWpython/test/unit/test_perf_warning.py162def test_remark_swp_op_before_operands(capfd, fresh_triton_cache):
LOWpython/test/unit/tools/test_aot.py321def compile_aot_kernel_no_specialization(dir, kernel_path, dtype, BM, BN, BK, target=None):
LOWpython/test/unit/tools/test_aot.py366def generate_matmul_test_data(dir, M, N, K):
LOWpython/test/unit/tools/test_aot.py392def test_compile_link_matmul_no_specialization():
LOWpython/test/unit/tools/test_aot.py459def test_launcher_has_no_available_kernel():
LOWpython/test/unit/tools/test_aot.py497def test_compile_link_autotune_matmul():
LOWpython/test/unit/tools/test_linear_layout.py36def test_operator_mul_identity():
LOWpython/test/unit/tools/test_linear_layout.py42def test_operator_mul_disjoint_dims():
LOWpython/test/unit/tools/test_linear_layout.py75def test_get_matrix_view_identity():
LOWpython/test/unit/tools/test_linear_layout.py83def test_get_matrix_view_strided():
LOWpython/test/unit/tools/test_linear_layout.py92def test_get_matrix_view_from_bases():
LOWpython/test/unit/tools/test_slice_kernel.py45def test_slice_kernel_basic_module_slicing(tmp_path):
LOWpython/test/unit/tools/test_slice_kernel.py646def test_slice_kernel_treats_assign_targets_as_locals(tmp_path):
LOWpython/test/unit/tools/test_slice_kernel.py121def test_slice_kernel_does_not_treat_site_packages_as_stdlib(tmp_path, monkeypatch):
LOWpython/test/unit/tools/test_slice_kernel.py167def test_slice_kernel_supports_injected_decorator_matchers(tmp_path):
LOWpython/test/unit/tools/test_slice_kernel.py263def test_slice_kernel_translate_to_gluon_keeps_tensor_method_rewrites(tmp_path):
LOWpython/test/unit/tools/test_slice_kernel.py299def test_slice_kernel_translate_to_gluon_inlines_descriptor_adapter(tmp_path):
LOWpython/test/unit/tools/test_slice_kernel.py346def test_slice_kernel_binds_local_imports(tmp_path):
LOWpython/test/unit/tools/test_slice_kernel.py376def test_slice_kernel_function_import(tmp_path):
LOWpython/test/unit/tools/test_slice_kernel.py411def test_slice_kernel_function_import_module_value(tmp_path):
LOWpython/test/unit/tools/test_slice_kernel.py442def test_slice_kernel_function_relative_import(tmp_path):
LOWpython/test/unit/tools/test_slice_kernel.py488def test_slice_kernel_function_from_import_value(tmp_path):
LOWpython/test/unit/tools/test_slice_kernel.py519def test_slice_kernel_function_absolute_import(tmp_path):
LOWpython/test/unit/tools/test_slice_kernel.py565def test_slice_kernel_function_module_relative_import(tmp_path):
LOWpython/test/unit/tools/test_slice_kernel.py607def test_slice_kernel_function_module_relative_import_leaf(tmp_path):
LOWpython/test/unit/tools/test_slice_kernel.py671def test_slice_kernel_treats_annassign_targets_as_locals(tmp_path):
LOWpython/test/unit/tools/test_slice_kernel.py695def test_slice_kernel_treats_assign_and_annassign_targets_as_locals(tmp_path):
LOWpython/test/unit/tools/test_slice_kernel.py733def test_slice_kernel_translate_to_gluon_avoids_double_descriptor_wrap(tmp_path):
LOWpython/test/unit/tools/test_slice_kernel.py765def test_translate_to_gluon_explicit_expand_dims_rewrites_layout(tmp_path):
LOWpython/test/unit/tools/test_slice_kernel.py799def test_translate_to_gluon_member_fn_expand_dims_rewrites_layout(tmp_path):
LOWpython/test/unit/tools/test_slice_kernel.py833def test_slice_kernel_public_imports():
LOWpython/test/unit/tools/test_irsource.py10def test_mlir_attribute_parsing(tmp_path: pathlib.Path) -> None:
LOWpython/test/unit/tools/test_disasm.py25def test_extract_handles_large_instruction_offsets(monkeypatch):
LOWpython/test/unit/tools/test_triton_to_gluon.py100def test_triton_to_gluon_dot_minimal(tmp_path):
LOWpython/test/unit/tools/test_triton_to_gluon.py222def test_triton_to_gluon_dot_scaled(
LOWpython/test/unit/tools/test_triton_to_gluon.py272def dot_transposed_operand_tile_kernel(
LOWpython/test/unit/tools/test_triton_to_gluon.py308def test_triton_to_gluon_dot_transposed_operands(lhs_transposed, rhs_transposed, tmp_path):
LOWpython/test/unit/tools/test_triton_to_gluon.py435def _skip_unless_descriptor_target():
LOWpython/test/unit/tools/test_triton_to_gluon.py442def test_triton_to_gluon_descriptor_roundtrip(tmp_path):
LOWpython/test/unit/tools/test_triton_to_gluon.py466def test_triton_to_gluon_descriptor_load_roundtrip(tmp_path):
LOWpython/test/unit/tools/test_triton_to_gluon.py488def make_tensor_descriptor_copy_kernel(x_ptr, y_ptr, M, N, BLOCK_M: tl.constexpr, BLOCK_N: tl.constexpr):
LOWpython/test/unit/tools/test_triton_to_gluon.py505def test_triton_to_gluon_make_tensor_descriptor(tmp_path, with_allocator):
LOWpython/test/unit/tools/test_triton_to_gluon.py539def test_triton_reshape_trans(tmp_path, TRANS_KIND):
LOWpython/test/unit/tools/test_triton_to_gluon.py720def gather_scatter_roundtrip_kernel(out_ptr, in_ptr, idx_ptr, X: tl.constexpr, Y: tl.constexpr, BLOCK_X: tl.constexpr,
1005 more matches not shown…
Over-Commented Block851 hits · 822 pts
SeverityFileLineSnippet
LOWunittest/Dialect/TritonGPU/SwizzleTest.cpp1#include "triton/Dialect/Triton/IR/Dialect.h"
LOWunittest/Dialect/TritonGPU/SwizzleTest.cpp241 int maskedLaneIdx;
LOWunittest/Dialect/TritonGPU/SwizzleTest.cpp261 } else {
LOW…test/Dialect/TritonGPU/LinearLayoutConversionsTest.cpp3501// to load the data. If the layouts differ, MMA would compute wrong addresses.
LOWbin/triton-llvm-opt.cpp1/// Trimmed down clone of llvm opt to be able to test triton custom llvm ir
LOWbin/triton-tensor-layout.cpp1#include "RegisterTritonDialects.h"
LOWbin/triton-tensor-layout.cpp21//
LOWbin/RegisterTritonDialects.h1#pragma once
LOWbin/RegisterTritonDialects.h21#include "TritonAMDGPUTransforms/Passes.h"
LOWpython/test/unit/cuda/test_tma_store_gemm.py1# Copyright (c) 2023 NVIDIA Corporation & Affiliates. All rights reserved.
LOWpython/test/unit/language/test_line_info.py261 def kernel_basic(src, N, BLOCK_SIZE: tl.constexpr):
LOWpython/test/unit/language/test_line_info.py281 # CHECK: } loc(#loc)
LOWpython/test/unit/language/test_line_info.py481 kernel_info = kernel.warmup(torch.float32, torch.float32, grid=(1, ))
LOWpython/test/unit/language/test_line_info.py501 # CHECK: %offsets_1 = arith.addi %offsets_0, %offsets : tensor<16xi32> loc(#loc16)
LOWpython/test/gluon/test_frontend.py221@gluon.jit
LOWpython/test/gluon/test_frontend.py521 # CHECK-NEXT: [[OUTS:%.*]]:3 = ttg.warp_specialize([[A]], [[B]], [[C]], [[A]], [[B]], [[C]]) {{.*}}requestedRegis
LOWpython/test/gluon/test_frontend.py581 # CHECK-DAG: [[BLOCKED_NW4:#.*]] = #ttg.blocked<{sizePerThread = [1], threadsPerWarp = [32], warpsPerCTA = [4], orde
LOWpython/test/gluon/test_frontend.py1901def test_auto_layout_broadcast():
LOWpython/triton/experimental/gsan/src/GSan.h1#pragma once
LOW…on/experimental/gluon/language/amd/gfx1250/_layouts.py141 # tile (i.e. the tile's shape is already expressed in memory order):
LOW…on/experimental/gluon/language/amd/gfx1250/_layouts.py161 # M=3: w2 w3
LOWpython/triton/tools/disasm.py1# MIT License
LOW…triton/tools/triton_to_gluon_translator/ordered_set.py1"""
LOWpython/examples/gluon/02-conv-dgrad.py61#
LOWpython/examples/gluon/02-conv-fprop.py61
LOWpython/examples/gluon/02-conv-fprop.py481 output = torch.empty((N, out_h, out_w, Co), device=input_tensor.device, dtype=TORCH_GEMM_DTYPE)
LOWpython/examples/gluon/02-conv-wgrad.py61# grad_W[Co, R*S*Ci] = grad_out[M, Co]^T @ im2col(input)[M, R*S*Ci]
LOWpython/triton_kernels/triton_kernels/matmul.py61 out_handles: torch.Tensor
LOWpython/triton_kernels/triton_kernels/matmul.py201 k: torch.empty(v[0], device=allocation.device, dtype=v[1])
LOW…_kernels/tensor_details/layout_details/hopper_value.py121 init_shape = data.shape
LOW…riton_kernels/tensor_details/layout_details/strided.py1from dataclasses import dataclass
LOW…n_kernels/tensor_details/layout_details/torch_utils.py1import torch
LOW…n_kernels/tensor_details/layout_details/torch_utils.py21# if not is_fp4:
LOWpython/tutorials/02-fused-softmax.py61
LOWpython/tutorials/02-fused-softmax.py181
LOWpython/tutorials/08-grouped-gemm.py1"""
LOWpython/tutorials/04-low-memory-dropout.py21# The *dropout* operator was first introduced in [SRIVASTAVA2014]_ as a way to improve the performance
LOWpython/tutorials/04-low-memory-dropout.py81output = dropout(x, x_keep=x_keep, p=p)
LOWpython/tutorials/04-low-memory-dropout.py161
LOWpython/tutorials/03-matrix-multiplication.py21# -----------
LOWpython/tutorials/03-matrix-multiplication.py41# for k in range(0, K, BLOCK_SIZE_K):
LOWpython/tutorials/03-matrix-multiplication.py61# For a row-major 2D tensor :code:`X`, the memory location of :code:`X[i, j]` is given
LOWpython/tutorials/03-matrix-multiplication.py81# offs_k = tl.arange(0, BLOCK_SIZE_K)
LOWpython/tutorials/03-matrix-multiplication.py101#
LOWpython/tutorials/03-matrix-multiplication.py121# # Number of programs ids along the N axis
LOWpython/tutorials/03-matrix-multiplication.py281 # We will advance this pointer as we move in the K direction
LOWpython/tutorials/05-layer-norm.py21# It takes a vector :math:`x` as input and produces a vector :math:`y` of the same shape as output.
LOWpython/tutorials/05-layer-norm.py101#
LOWpython/tutorials/10-block-scaled-matmul.py21 python 10-block-scaled-matmul.py --format mxfp8 --K_range 8192 16384 --K_step 2048 --bench
LOWpython/tutorials/10-block-scaled-matmul.py41# where scale_a and scale_b are the blocked scale factors for the A and B matrices.
LOWpython/tutorials/10-block-scaled-matmul.py61# In order to conform with Triton's language semantics for dot_scaled, the scale factors
LOWpython/tutorials/10-block-scaled-matmul.py81#
LOWpython/tutorials/10-block-scaled-matmul.py101#
LOWpython/tutorials/gluon/05-wgmma.py41# Let's illustrate WGMMA with a trivial kernel launched with grid size (1, ).
LOWpython/tutorials/gluon/05-wgmma.py61#
LOWpython/tutorials/gluon/05-wgmma.py81#
LOWpython/tutorials/gluon/05-wgmma.py101#
LOWpython/tutorials/gluon/05-wgmma.py181 # and all this does is immediately wait for 0 outstanding operations. In
LOWpython/tutorials/gluon/05-wgmma.py261# False 32 8.48
LOWpython/tutorials/gluon/05-wgmma.py421# We should try to pick the largest `n` for the WGMMA layout. Based on the
791 more matches not shown…
Unused Imports499 hits · 388 pts
SeverityFileLineSnippet
LOWpython/test/unit/runtime/test_build.py1
LOWpython/test/unit/language/test_annotations.py1
LOWpython/test/gsan/test_allocator.py1
LOWpython/test/gsan/test_gsan_failures.py1
LOWpython/test/gsan/test_symmetric_memory.py1
LOWpython/test/gsan/test_gsan.py1
LOWpython/triton/knobs.py1
LOWpython/triton/__init__.py8
LOWpython/triton/__init__.py8
LOWpython/triton/__init__.py8
LOWpython/triton/__init__.py8
LOWpython/triton/__init__.py8
LOWpython/triton/__init__.py8
LOWpython/triton/__init__.py8
LOWpython/triton/__init__.py8
LOWpython/triton/__init__.py8
LOWpython/triton/__init__.py8
LOWpython/triton/__init__.py20
LOWpython/triton/__init__.py21
LOWpython/triton/__init__.py21
LOWpython/triton/__init__.py22
LOWpython/triton/__init__.py22
LOWpython/triton/__init__.py23
LOWpython/triton/__init__.py24
LOWpython/triton/__init__.py27
LOWpython/triton/__init__.py28
LOWpython/triton/_utils.py1
LOWpython/triton/experimental/gsan/__init__.py1
LOWpython/triton/experimental/gsan/__init__.py1
LOWpython/triton/experimental/gsan/_testing_utils.py1
LOWpython/triton/experimental/gsan/_allocator.py1
LOWpython/triton/experimental/gsan/symmetric_memory.py1
LOWpython/triton/experimental/gsan/_testing.py1
LOWpython/triton/experimental/gsan/_stream_sync.py1
LOWpython/triton/experimental/gsan/_utils.py1
LOWpython/triton/experimental/gluon/__init__.py1
LOWpython/triton/experimental/gluon/__init__.py1
LOWpython/triton/experimental/gluon/__init__.py1
LOWpython/triton/experimental/gluon/__init__.py2
LOWpython/triton/experimental/gluon/__init__.py2
LOWpython/triton/experimental/gluon/__init__.py3
LOWpython/triton/experimental/gluon/__init__.py4
LOWpython/triton/experimental/gluon/_runtime.py1
LOWpython/triton/experimental/gluon/_runtime.py4
LOWpython/triton/experimental/gluon/language/__init__.py1
LOWpython/triton/experimental/gluon/language/__init__.py1
LOWpython/triton/experimental/gluon/language/__init__.py1
LOWpython/triton/experimental/gluon/language/__init__.py1
LOWpython/triton/experimental/gluon/language/__init__.py1
LOWpython/triton/experimental/gluon/language/__init__.py1
LOWpython/triton/experimental/gluon/language/__init__.py1
LOWpython/triton/experimental/gluon/language/__init__.py1
LOWpython/triton/experimental/gluon/language/__init__.py1
LOWpython/triton/experimental/gluon/language/__init__.py1
LOWpython/triton/experimental/gluon/language/__init__.py1
LOWpython/triton/experimental/gluon/language/__init__.py1
LOWpython/triton/experimental/gluon/language/__init__.py1
LOWpython/triton/experimental/gluon/language/__init__.py1
LOWpython/triton/experimental/gluon/language/__init__.py1
LOWpython/triton/experimental/gluon/language/__init__.py1
439 more matches not shown…
Hallucination Indicators15 hits · 145 pts
SeverityFileLineSnippet
CRITICALpython/test/unit/language/test_core.py4001 if not is_interpreter() and triton.runtime.driver.active.utils.get_device_properties(
CRITICALpython/test/unit/language/test_matmul.py104 shared_mem_avail = triton.runtime.driver.active.utils.get_device_properties(0)["max_shared_mem"]
CRITICALpython/test/gluon/test_frontend.py786 %0 = tt.call @triton.experimental.gluon.language.nvidia.ampere.mbarrier.allocate_mbarrier__cNone_cTrue() : () -> !tt
CRITICALpython/test/gluon/test_frontend.py791 tt.func private @triton.experimental.gluon.language.nvidia.ampere.mbarrier.allocate_mbarrier__cNone_cTrue() -> !ttg.me
CRITICALpython/test/gluon/test_frontend.py3487 %13 = tt.call @triton.experimental.gluon.language._standard.zeros__Tc1T_cfp16_cAL() : () -> tensor<1xf16, #gluon.aut
CRITICALpython/test/gluon/test_frontend.py3515 tt.func private @triton.experimental.gluon.language._standard.zeros__Tc1T_cfp16_cAL() -> tensor<1xf16, #gluon.auto_enc
CRITICALpython/test/gluon/test_frontend.py3546 %1 = tt.call @triton.experimental.gluon.language._standard.zeros__Tc1T_cbf16_cAL() : () -> tensor<1xbf16, #gluon.aut
CRITICALpython/test/gluon/test_frontend.py3564 tt.func private @triton.experimental.gluon.language._standard.zeros__Tc1T_cbf16_cAL() -> tensor<1xbf16, #gluon.auto_en
CRITICALpython/triton/language/core.py3450 triton.runtime.driver.active.utils.set_printf_fifo_size(size_bytes)
CRITICALthird_party/proton/proton/hooks/instrumentation.py157 max_shared_mem = triton.runtime.driver.active.utils.get_device_properties(device)["max_shared_mem"]
CRITICALthird_party/proton/proton/hooks/instrumentation.py182 arch = triton.runtime.driver.active.utils.get_device_properties(device)["arch"].split(":")[0]
CRITICALthird_party/amd/backend/driver.py242 return triton.runtime.driver.active.utils.build_signature_metadata(kernel_signature)
CRITICALthird_party/nvidia/backend/driver.py182 return triton.runtime.driver.active.utils.build_signature_metadata(kernel_signature)
CRITICALthird_party/nvidia/backend/driver.py238 cu_tensor_map = triton.runtime.driver.active.utils.fill_tma_descriptor_im2col(
CRITICALthird_party/nvidia/backend/driver.py253 cu_tensor_map = triton.runtime.driver.active.utils.fill_tma_descriptor_tiled(
Deep Nesting151 hits · 128 pts
SeverityFileLineSnippet
LOWsetup.py129
LOWpython/build_helpers.py313
LOWpython/test/unit/tools/test_triton_to_gluon.py520
LOWpython/test/unit/runtime/test_specialize.py41
LOWpython/test/unit/language/test_conversions.py15
LOWpython/test/unit/language/test_conversions.py276
LOWpython/test/unit/language/test_core.py382
LOWpython/test/unit/language/test_core.py2557
LOWpython/test/unit/language/test_core.py2735
LOWpython/test/unit/language/test_core.py3240
LOWpython/test/unit/language/test_core.py3404
LOWpython/test/unit/language/test_core.py4216
LOWpython/test/unit/language/test_core.py4441
LOWpython/test/unit/language/test_core.py4612
LOWpython/test/unit/language/test_core.py5064
LOWpython/test/unit/language/test_core.py5537
LOWpython/test/unit/language/test_core.py2561
LOWpython/test/unit/language/test_core.py5067
LOWpython/test/unit/language/test_core.py5540
LOWpython/test/unit/language/test_pipeliner.py215
LOWpython/test/unit/language/test_subprocess.py37
LOWpython/test/unit/language/test_matmul.py489
LOWpython/test/unit/language/test_matmul.py628
LOWpython/test/unit/language/test_matmul.py684
LOWpython/test/unit/language/test_line_info.py138
LOWpython/test/unit/language/test_line_info.py183
LOWpython/test/unit/language/test_annotations.py62
LOWpython/test/unit/language/print_helper.py107
LOWpython/test/unit/language/test_tensor_descriptor.py1555
LOWpython/test/unit/language/test_tensor_descriptor.py1564
LOWpython/test/gsan/test_gsan_failures.py94
LOWpython/test/gsan/test_symmetric_memory.py369
LOWpython/test/gsan/test_gsan.py421
LOWpython/test/gluon/test_lowerings.py14
LOWpython/test/gluon/test_lowerings.py699
LOWpython/test/gluon/test_frontend.py4236
LOWpython/test/gluon/test_frontend.py4239
LOWpython/test/gluon/test_core.py1193
LOWpython/test/gluon/test_core.py2164
LOWpython/test/gluon/test_core.py2821
LOWpython/test/gluon/test_core.py2933
LOWpython/test/gluon/test_core.py1273
LOWpython/test/gluon/test_core.py2171
LOWpython/test/gluon/test_consan.py967
LOWpython/test/gluon/test_consan.py2751
LOWpython/test/gluon/test_consan.py995
LOWpython/test/gluon/test_consan.py2762
LOWpython/test/gluon/test_fpsan.py417
LOWpython/test/gluon/test_fpsan.py715
LOWpython/test/gluon/test_fpsan.py769
LOWpython/test/gluon/test_fpsan.py921
LOWpython/test/regression/test_functional_regressions.py137
LOWpython/test/regression/test_functional_regressions.py140
LOWpython/triton/knobs.py297
LOWpython/triton/testing.py44
LOWpython/triton/testing.py99
LOWpython/triton/testing.py166
LOWpython/triton/testing.py308
LOWpython/triton/testing.py623
LOWpython/triton/testing.py576
91 more matches not shown…
Verbosity Indicators41 hits · 79 pts
SeverityFileLineSnippet
LOWpython/triton/runtime/jit.py202 # The purpose of this function is to visit everything in `arguments`
LOWpython/tutorials/gluon/13-conv-im2col.py149# Step 1: Extract patches for each output position
LOWpython/tutorials/gluon/13-conv-im2col.py156# Step 2: Stack patches into im2col matrix A (M=4, K=4)
LOWpython/tutorials/gluon/13-conv-im2col.py167# Step 3: Reshape filter into weight matrix W (Co=1, K=4)
LOWpython/tutorials/gluon/13-conv-im2col.py171# Step 4: Output = A @ W^T
LOWthird_party/amd/lib/TritonAMDGPUToLLVM/TargetInfo.cpp443 // Step 1: Right shift for 8 lanes.
LOWthird_party/amd/lib/TritonAMDGPUToLLVM/TargetInfo.cpp446 // Step 2: Right shift for 4 lanes.
LOWthird_party/amd/lib/TritonAMDGPUToLLVM/TargetInfo.cpp449 // Step 3: Right shift for 2 lanes.
LOWthird_party/amd/lib/TritonAMDGPUToLLVM/TargetInfo.cpp452 // Step 4: Right shift for 1 lane.
LOWthird_party/amd/lib/TritonAMDGPUToLLVM/TargetInfo.cpp455 // Step 5: Broadcast lane 15 of each row to all the lanes of its next row.
LOWthird_party/amd/lib/TritonAMDGPUToLLVM/TargetInfo.cpp458 // Step 6: Broadcast lane 31 to lane 32-63.
LOWthird_party/amd/lib/TritonAMDGPUToLLVM/TargetInfo.cpp463 // Step 7: Read the reduction result from lane 63 and broadcast with
LOWthird_party/amd/lib/TritonAMDGPUToLLVM/Utility.cpp1038 // Step 1: extract EM bits for elements 0,2,4,6 and 1,3,5,7 respectively.
LOWthird_party/amd/lib/TritonAMDGPUToLLVM/Utility.cpp1045 // Step 2: convert fp4 to fp8 using LUT
LOWthird_party/amd/lib/TritonAMDGPUToLLVM/Utility.cpp1055 // Step 3: extract sign bits
LOWthird_party/amd/lib/TritonAMDGPUToLLVM/Utility.cpp1059 // Step 4: assemble 4 packed fp8 values w/ sign
LOWthird_party/amd/lib/TritonAMDGPUToLLVM/Utility.cpp1063 // Step 5: convert fp8 to fp32
LOWthird_party/amd/lib/TritonAMDGPUToLLVM/Utility.cpp1145 // Step 1: extract EM bits for elements 0,2,4,6 and 1,3,5,7 respectively.
LOWthird_party/amd/lib/TritonAMDGPUToLLVM/Utility.cpp1153 // Step 2: extract S bit for elements 0,2,4,6 and 1,3,5,7
LOWthird_party/amd/lib/TritonAMDGPUToLLVM/Utility.cpp1161 // Step 3: Upcast elements 0,2,4,6 to 4 16-bit elements
LOWthird_party/amd/lib/TritonAMDGPUToLLVM/Utility.cpp1190 // Step 4: Upcast elements 1,3,5,7 to 4 16-bit elements
LOWthird_party/amd/lib/TritonAMDGPUToLLVM/Utility.cpp1220 // Step 5: Reorder 16-bit elements to be 0,1,2,3,4,5,6,7
LOW…_party/amd/lib/TritonAMDGPUToLLVM/DotOpToLLVM/MFMA.cpp485 // Step 1: construct each kBase-element vector by
LOW…_party/amd/lib/TritonAMDGPUToLLVM/DotOpToLLVM/MFMA.cpp497 // Step 2: process rawElems based on element type
LOW…_party/amd/lib/TritonAMDGPUToLLVM/DotOpToLLVM/MFMA.cpp517 // Step 3: Insert the processed vals into the ValueTable
LOW…/lib/Transforms/WarpSpecialization/WSCodePartition.cpp1229 // Step 1: collect all communications between producers and consumers.
LOW…/lib/Transforms/WarpSpecialization/WSCodePartition.cpp1240 // Step 2: group channels
LOW…/lib/Transforms/WarpSpecialization/WSCodePartition.cpp1249 // Step 3: reorder producer ops and the backward slices of the producer ops.
LOW…/lib/Transforms/WarpSpecialization/WSCodePartition.cpp1252 // Step 4: find top-level ops that contain a channel, also create new ForOps
LOW…/lib/Transforms/WarpSpecialization/WSCodePartition.cpp1272 // Step 5: Create buffers. An array of buffers for each channel.
LOW…/lib/Transforms/WarpSpecialization/WSCodePartition.cpp1280 // Step 6: Lower the loads. Also add local copy ops for non-load
LOW…/lib/Transforms/WarpSpecialization/WSCodePartition.cpp1290 // Step 7: Create tokens. A set of tokens for each group of channels for
LOW…/lib/Transforms/WarpSpecialization/WSCodePartition.cpp1301 // Step 8: add async communication ops (ProducerAcquire etc). Also lower
LOW…/hopper/lib/Transforms/WarpSpecialization/WSBuffer.cpp304 // Step 1: Append accumCnts as forOp arguments.
LOW…/hopper/lib/Transforms/WarpSpecialization/WSBuffer.cpp308 // Step 2: Add accumCnts to yieldOp.
LOW…/hopper/lib/Transforms/WarpSpecialization/WSBuffer.cpp317 // Step 3: Create loop arguments for the new ForOp.
LOW…/hopper/lib/Transforms/WarpSpecialization/WSBuffer.cpp326 // Step 4: Create newForOp and take the region of the original forOp.
LOW…/hopper/lib/Transforms/WarpSpecialization/WSBuffer.cpp332 // Step 5: Replace forOp with newForOp.
LOWthird_party/nvidia/lib/NVGPUToLLVM/NVGPUToLLVMPass.cpp604 // TODO: pred will have a long liverange, we need to check if this is a
LOWlib/Dialect/TritonGPU/IR/LinearLayoutConversions.cpp1065 // Step 3: Along the "register" dim, remove any all-zero bases.
LOW…t/TritonInstrument/Transforms/ConcurrencySanitizer.cpp673 // Op is writing to the buffer, we need to check if anything else
Excessive Try-Catch Wrapping45 hits · 51 pts
SeverityFileLineSnippet
LOWsetup.py528 except Exception:
LOWsetup.py536 except Exception:
MEDIUMsetup.py524def get_git_commit_hash(length=8):
MEDIUMsetup.py532def get_git_branch():
LOWpython/test/unit/runtime/test_cache.py821 except Exception as e:
LOWpython/test/unit/language/test_core.py5044 except Exception as e:
LOWpython/test/unit/language/test_decorator.py27 except Exception as e:
LOWpython/test/backend/test_mir_stage.py11 except Exception:
MEDIUMpython/test/backend/test_mir_stage.py8def is_hip():
LOWpython/triton/_internal_testing.py262 except Exception as e:
LOWpython/triton/experimental/gsan/symmetric_memory.py152 except Exception:
LOWpython/triton/experimental/gsan/symmetric_memory.py252 except Exception:
LOWpython/triton/experimental/gsan/symmetric_memory.py444 except Exception:
MEDIUMpython/triton/experimental/gsan/symmetric_memory.py249def __del__(self) -> None:
LOWpython/triton/experimental/gsan/_utils.py109 except Exception:
LOWpython/triton/runtime/cache.py81 except Exception:
LOWpython/triton/runtime/cache.py225 except Exception:
LOWpython/triton/runtime/_async_compile.py22 except Exception:
LOWpython/triton/runtime/interpreter.py1406 except Exception as e:
LOWpython/triton/runtime/interpreter.py1447 except Exception:
LOWpython/triton/runtime/interpreter.py1540 except Exception as e:
LOWpython/triton/runtime/autotuner.py159 except Exception as e:
LOWpython/triton/compiler/compiler.py308 except Exception as e:
LOWpython/triton/compiler/code_generator.py1375 except Exception as e:
LOWpython/triton/compiler/code_generator.py1426 except Exception as e:
LOWpython/triton/compiler/code_generator.py1597 except Exception as e:
LOWpython/triton/compiler/code_generator.py1632 except Exception as e:
LOWpython/examples/gluon/02-conv-dgrad.py980 except Exception:
MEDIUMpython/examples/gluon/02-conv-dgrad.py937def _benchmark_dgrad_config(
LOWpython/examples/gluon/02-conv-wgrad.py735 except Exception:
MEDIUMpython/examples/gluon/02-conv-wgrad.py692def _benchmark_wgrad_config(
LOWthird_party/proton/test/test_instrumentation.py938 except Exception as e:
MEDIUMthird_party/proton/test/test_instrumentation.py935def run_kernel():
LOWthird_party/proton/test/test_api.py98 except Exception as e:
LOWthird_party/proton/test/test_api.py120 except Exception as e:
LOWthird_party/proton/test/test_api.py133 except Exception as e:
LOWthird_party/proton/test/test_api.py287 except Exception as e:
LOWthird_party/proton/test/test_api.py404 except Exception as e:
LOWthird_party/proton/test/test_api.py414 except Exception as e:
LOW…ton/test/reproducers/cupti_graph_replay_heap_growth.py275 except Exception:
LOWthird_party/proton/proton/proton.py46 except Exception as e:
MEDIUMthird_party/proton/proton/proton.py47 print("An error occurred while executing the script:")
LOWthird_party/amd/python/test/test_gluon_gfx1250.py1994 except Exception as e:
LOWthird_party/amd/backend/driver.py45 except Exception:
LOWthird_party/nvidia/backend/driver.py58 except Exception:
Cross-File Repetition10 hits · 50 pts
SeverityFileLineSnippet
HIGHpython/test/unit/tools/test_slice_kernel.py0import math def common_util() -> int: return math.prod([11, 33])
HIGHpython/test/unit/tools/test_slice_kernel.py0import math def common_util() -> int: return math.prod([11, 33])
HIGHpython/test/unit/tools/test_slice_kernel.py0import math def common_util() -> int: return math.prod([11, 33])
HIGHpython/test/unit/tools/test_slice_kernel.py0import math def common_util() -> int: return math.prod([11, 33])
HIGHpython/test/unit/tools/test_slice_kernel.py0import math def common_util() -> int: return math.prod([11, 33]) def helper() -> none: common_util() def kernel() -> non
HIGHpython/test/unit/tools/test_slice_kernel.py0import math def common_util() -> int: return math.prod([11, 33]) def helper() -> none: common_util() def kernel() -> non
HIGHpython/test/unit/tools/test_slice_kernel.py0import math def common_util() -> int: return math.prod([11, 33]) def helper() -> none: common_util() def kernel() -> non
HIGH…iton/experimental/gluon/language/amd/rdna4/__init__.py0computes matrix-multiplication of a * b + acc using amd wmma instruction. args: a (tensor): the operand a to be multipli
HIGH…iton/experimental/gluon/language/amd/rdna3/__init__.py0computes matrix-multiplication of a * b + acc using amd wmma instruction. args: a (tensor): the operand a to be multipli
HIGH…on/experimental/gluon/language/amd/gfx1250/__init__.py0computes matrix-multiplication of a * b + acc using amd wmma instruction. args: a (tensor): the operand a to be multipli
Self-Referential Comments15 hits · 43 pts
SeverityFileLineSnippet
MEDIUMpython/build_helpers.py356 # Create a stable symlink that doesn't include revision
MEDIUMpython/test/gluon/test_core.py2679 # Create a test matrix with known values
MEDIUMpython/test/gluon/test_core.py3227 # Create a test matrix [N, M]
MEDIUMpython/test/gluon/test_core.py3388 # Create a test tensor [N, M, P]
MEDIUMpython/triton/experimental/gluon/language/_semantic.py618 # Create the warp specialize op.
MEDIUMpython/triton/experimental/gluon/language/_layouts.py617 # Create a idendity mapping based on shape_per_cta + order
MEDIUMpython/triton/runtime/jit.py400 # Create the function argument list and the dict entries for the return statement
MEDIUMpython/triton/runtime/jit.py1138 # Create a bound function to support constexpr_function methods
MEDIUMpython/triton/language/core.py1659 # Define the wrapped Triton value type.
MEDIUMpython/tutorials/02-fused-softmax.py173 # Create a number of persistent programs.
MEDIUMpython/tutorials/01-vector-add.py46 # Create a mask to guard memory operations against out-of-bounds accesses.
MEDIUMdocs/conf.py6# This file is execfile()d with the current directory set to its
MEDIUMthird_party/proton/proton/hooks/instrumentation.py39 # Create the buffer
MEDIUMthird_party/proton/proton/hooks/instrumentation.py111 # Create the appropriate mode instance
MEDIUMthird_party/amd/python/test/test_gluon_gfx1250.py2212 # Create a flattened view into the nD reference to unify the indexing logic over all dimensions
AI Slop Vocabulary15 hits · 40 pts
SeverityFileLineSnippet
MEDIUM…riton/tools/triton_to_gluon_translator/slice_kernel.py112 # HACK: An AST rewrite would be more robust, but this works for now.
MEDIUMpython/triton/runtime/cache.py115 # use temp dir to be robust against program interruptions
LOWpython/triton/runtime/interpreter.py1444 # e.g., dynamically generated functions, we cannot rewrite it so just return the original function
MEDIUMpython/triton_kernels/bench/bench_dense_matmul.py3# This is not meant to be a comprehensive benchmark of triton_kernels.
MEDIUMpython/triton_kernels/bench/bench_dense_matmul.py135 # even for the fp16 benchmark path. Match that when reproducing the OpenAI harness.
MEDIUMpython/tutorials/09-persistent-matmul.py411 # Enable warp specialization to leverage async warp scheduling in the GPU.
MEDIUMpython/tutorials/10-block-scaled-matmul.py390 # With 256 elements we better utilize the L2 and don't require the TMA
MEDIUMpython/tutorials/gluon/11-tcgen05-mma-scaled.py654 # elements. With 256 bytes along the inner dimension, we better utilize the
MEDIUMpython/tutorials/gluon/08-warp-specialization.py369# specialization is especially powerful when used to build intricate schedules
MEDIUMpython/tutorials/gluon/02-layouts.py868# Linear layouts are extremely poweful, and can be used in conjunction with
MEDIUMpython/tutorials/gluon/07-persistence.py841# work in conjunction with the GPU, getting the best of both worlds. This is
LOWthird_party/amd/python/test/test_gluon_gfx1250.py2776 # In practice, since we know that phase is initialized to 0, we can just set count = NUM_WARPS * WARP_SIZE and call
LOWthird_party/amd/python/test/test_gluon_gfx1250.py2837 # In practice, since we know that phase is initialized to 0, we can just set count = NUM_WARPS and call directly ttg
MEDIUM…party/amd/lib/TritonAMDGPUTransforms/ScheduleLoops.cpp210/// which is not coalesced. To better utilize global memory bandwidth,
MEDIUM…party/amd/lib/TritonAMDGPUToLLVM/LoadStoreOpToLLVM.cpp2248 // In the case of unpaired f16 elements utilize dpp instructions to
Overly Generic Function Names17 hits · 18 pts
SeverityFileLineSnippet
LOWpython/test/unit/tools/test_slice_kernel.py636def helper() -> None:
LOWpython/test/unit/tools/test_slice_kernel.py652 def helper() -> int:
LOWpython/test/unit/tools/test_slice_kernel.py130 def helper() -> int:
LOWpython/test/unit/tools/test_slice_kernel.py157def helper() -> int:
LOWpython/test/unit/tools/test_slice_kernel.py382 def helper() -> None:
LOWpython/test/unit/tools/test_slice_kernel.py397def helper() -> None:
LOWpython/test/unit/tools/test_slice_kernel.py417 def helper():
LOWpython/test/unit/tools/test_slice_kernel.py432def helper():
LOWpython/test/unit/tools/test_slice_kernel.py455 def helper() -> None:
LOWpython/test/unit/tools/test_slice_kernel.py474def helper() -> None:
LOWpython/test/unit/tools/test_slice_kernel.py494 def helper():
LOWpython/test/unit/tools/test_slice_kernel.py509def helper():
LOWpython/test/unit/tools/test_slice_kernel.py536 def helper() -> None:
LOWpython/test/unit/tools/test_slice_kernel.py555def helper() -> None:
LOWpython/test/unit/tools/test_slice_kernel.py578 def helper() -> None:
LOWpython/test/unit/tools/test_slice_kernel.py597def helper() -> None:
LOWpython/test/unit/tools/test_slice_kernel.py620 def helper() -> None:
Redundant / Tautological Comments10 hits · 13 pts
SeverityFileLineSnippet
LOWpython/build_helpers.py96 # Set timeout to 300 seconds to prevent the request from hanging forever.
LOWpython/triton/compiler/code_generator.py133# Check if the given syntax node has an "early" return
LOWutils/generate-test-checks.py177 # Check if an existing variable exists for this name.
LOWutils/generate-test-checks.py320 # Check if this is an attribute definition and process it
LOWthird_party/proton/proton/hooks/hook.py93 # Check if any other sessions rely on this hook
LOWthird_party/amd/python/test/address_sanitizer_helper.py23 #Set access to go out of bounds for ASAN test
LOWthird_party/amd/backend/driver.py330 # Check if cooperative groups are supported on the device.
LOW.github/workflows/integration-tests-nvidia.yml41 # Check if files exist before proceeding
LOW.github/workflows/integration-tests-amd.yml66 # Check if files exist before proceeding
LOW.github/workflows/build-macos.yml37 # Check if files exist before proceeding
Cross-Language Confusion2 hits · 10 pts
SeverityFileLineSnippet
HIGHpython/test/unit/tools/test_aot.py147 while (fscanf(file, "%hd,", &buffer[index]) != EOF && index < size) {
HIGHpython/triton/experimental/gsan/symmetric_memory.py396 stack.push(listener)
Slop Phrases4 hits · 8 pts
SeverityFileLineSnippet
LOWpython/test/unit/language/test_core.py6446 # reuse the temp variable and make sure to check that it isn't creating incorrect IR.
LOWpython/tutorials/01-vector-add.py74 # - Don't forget to pass meta-parameters as keywords arguments.
MEDIUMpython/tutorials/gluon/14-multicta.py359# It's worth noting that the pattern changes a bit once the TMA has to wait on the tcgen05_mma
MEDIUMpython/tutorials/gluon/02-layouts.py839# require reordering registers within a thread (which is free), you can use
Docstring Block Structure1 hit · 5 pts
SeverityFileLineSnippet
HIGH…/triton/experimental/gluon/language/amd/gfx1250/tdm.py161Update selected fields of a TDM descriptor; return a new descriptor SSA value. Each parameter is independently opti
Dead Code2 hits · 4 pts
SeverityFileLineSnippet
MEDIUMpython/test/unit/language/test_compile_errors.py171
MEDIUMpython/triton_kernels/triton_kernels/tensor.py98
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippet
LOWbin/triton-tensor-layout.cpp23// Example usage: