Repository Analysis

apache/tvm

Open Machine Learning Compiler Framework

16.9 Moderate AI signal View on GitHub
16.9
Adjusted Score
16.9
Raw Score
100%
Time Factor
2026-05-30
Last Push
13,402
Stars
Python
Language
693,471
Lines of Code
2259
Files
10899
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 35HIGH 115MEDIUM 548LOW 10201

Pattern Findings

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

Hyper-Verbose Identifiers4017 hits · 3710 pts
SeverityFileLineSnippet
LOWconftest.py64def pytest_collection_modifyitems(config, items):
LOWpython/tvm/topi/scatter.py28def _verify_scatter_nd_inputs(data, indices, updates):
LOWpython/tvm/topi/math.py686def fixed_point_multiply_per_axis(
LOWpython/tvm/topi/gpu/scan.py221def get_reduction_from_exclusive_scan(data, ex_scan_output, binop=tvm.tirx.generic.add):
LOWpython/tvm/topi/nn/winograd_util.py164def winograd_transform_matrices(tile_size, kernel_size, out_dtype):
LOWpython/tvm/topi/vision/nms_util.py245def collect_selected_indices_and_scores(
LOWpython/tvm/topi/vision/nms.py852def _collect_selected_indices_ir(
LOWpython/tvm/topi/vision/nms.py898def _collect_selected_indices_and_scores_ir(
LOWpython/tvm/topi/vision/nms.py944def all_class_non_max_suppression(
LOWpython/tvm/topi/image/resize.py28def can_convert_multiply_to_intdiv(origin_size, scaled_size):
LOWpython/tvm/topi/testing/adaptive_pool_python.py77def adaptive_pool_channel_first(np_data, out_size, pool_op, np_op):
LOWpython/tvm/topi/testing/adaptive_pool_python.py91def adaptive_pool_channel_last(np_data, out_size, pool_op, np_op):
LOWpython/tvm/topi/testing/nms_python.py37def non_max_suppression_python(
LOWpython/tvm/ir/instrument.py154def _wrap_class_pass_instrument(pi_cls):
LOWpython/tvm/ir/base.py211def get_first_structural_mismatch(lhs, rhs, map_free_vars=False, skip_tensor_content=False):
LOWpython/tvm/target/detect_target.py109def detect_target_from_device(dev: str | Device) -> Target:
LOWpython/tvm/runtime/params.py98def load_param_dict_from_file(path):
LOWpython/tvm/runtime/device.py87 def max_shared_memory_per_block(self):
LOWpython/tvm/runtime/module.py111 def _collect_from_import_tree(self, filter_func):
LOWpython/tvm/runtime/module.py234 def get_source_format_from_module(module):
LOWpython/tvm/runtime/disco/session.py587def _create_socket_session_local_workers(num_workers) -> Session:
LOWpython/tvm/s_tir/schedule/analysis.py69def get_tensorize_loop_mapping(
LOWpython/tvm/s_tir/schedule/analysis.py97def get_auto_tensorize_mapping_info(
LOWpython/tvm/s_tir/schedule/schedule.py79def _parse_error_render_level(error_render_level: str) -> int:
LOWpython/tvm/s_tir/schedule/schedule.py104def _get_sblock_default_dtype(block: SBlock) -> str:
LOWpython/tvm/s_tir/schedule/schedule.py1050 def matmul_after_reorder_block_iter_var(
LOWpython/tvm/s_tir/schedule/schedule.py1588 def before_reindex_cache_read(a: T.handle, b: T.handle) -> None:
LOWpython/tvm/s_tir/schedule/schedule.py1688 def before_reindex_cache_write(a: T.handle, b: T.handle) -> None:
LOWpython/tvm/s_tir/schedule/schedule.py2174 def before_reverse_compute_at(a: T.handle, c: T.handle) -> None:
LOWpython/tvm/s_tir/schedule/schedule.py3428 def two_elementwise_transformed_intermediate_buffer(a: T.handle, c: T.handle) -> None:
LOWpython/tvm/s_tir/schedule/schedule.py3513 def before_transform_block_layout(
LOWpython/tvm/s_tir/schedule/schedule.py3535 def after_transform_block_layout(
LOWpython/tvm/s_tir/schedule/schedule.py3599 def before_set_axis_separator(
LOWpython/tvm/s_tir/schedule/schedule.py3627 def after_set_axis_separators(
LOWpython/tvm/s_tir/schedule/schedule.py3940 def unsafe_hide_buffer_access(
LOWpython/tvm/s_tir/schedule/schedule.py4000 def before_annotate_buffer_access(
LOWpython/tvm/s_tir/schedule/schedule.py4029 def after_annotate_buffer_access(
LOWpython/tvm/s_tir/schedule/testing.py29def assert_structural_equal_ignore_global_symbol(
LOWpython/tvm/s_tir/analysis/__init__.py58def get_sblock_read_write_region(
LOWpython/tvm/s_tir/analysis/__init__.py145def calculate_allocated_bytes(
LOWpython/tvm/s_tir/analysis/__init__.py197def get_vtcm_compaction_passes() -> list[tvm.transform.Pass]:
LOWpython/tvm/s_tir/meta_schedule/logging.py179def _batch_parameterize_config(
LOWpython/tvm/s_tir/meta_schedule/logging.py239def get_loggers_from_work_dir(
LOWpython/tvm/s_tir/meta_schedule/trace_apply.py25def schedule_using_anchor_trace(sch: Schedule, anchor_trace: Trace, target: Target) -> None:
LOWpython/tvm/s_tir/meta_schedule/relax_integration.py105def extracted_tasks_to_tune_contexts(
LOWpython/tvm/s_tir/meta_schedule/utils.py131def get_global_func_with_default_on_worker(
LOWpython/tvm/s_tir/meta_schedule/utils.py168def get_global_func_on_rpc_session(
LOWpython/tvm/s_tir/meta_schedule/tune_context.py248 def generate_measure_candidates(self) -> list["MeasureCandidate"] | None:
LOW…/s_tir/meta_schedule/schedule/cuda/layout_transform.py135 def pad_dimension_to_at_least_number(loop: LoopRV, requested_size: int):
LOW…/s_tir/meta_schedule/schedule/cuda/layout_transform.py140 def pad_dimension_to_factor_of_tile_size(
LOW…/s_tir/meta_schedule/schedule/cuda/layout_transform.py239 def get_high_level_loop_structure(
LOW…/s_tir/meta_schedule/schedule/cuda/layout_transform.py503def cuda_layout_transform_schedule_rule(
LOW…s_tir/meta_schedule/space_generator/space_generator.py65 def _initialize_with_tune_context(self, context: "TuneContext") -> None:
LOW…s_tir/meta_schedule/space_generator/space_generator.py231 def _initialize_with_tune_context(self, context: "TuneContext") -> None:
LOWpython/tvm/s_tir/meta_schedule/cost_model/xgb_model.py684 def optional_xgboost_callback(cls):
LOWpython/tvm/s_tir/meta_schedule/postproc/postproc.py44 def _initialize_with_tune_context(self, context: "TuneContext") -> None:
LOWpython/tvm/s_tir/meta_schedule/postproc/postproc.py152 def _initialize_with_tune_context(self, context: "TuneContext") -> None:
LOWpython/tvm/s_tir/meta_schedule/testing/dummy_object.py56 def _initialize_with_tune_context(self, context: "TuneContext") -> None:
LOW…n/tvm/s_tir/meta_schedule/testing/validate_database.py421 def f_with_args_alloc_argument_common(
LOW…n/tvm/s_tir/meta_schedule/testing/validate_database.py448 def f_with_args_run_evaluator_common(
3957 more matches not shown…
Over-Commented Block1947 hits · 1896 pts
SeverityFileLineSnippet
LOW.asf.yaml1# Licensed to the Apache Software Foundation (ASF) under one
LOW.asf.yaml41
LOWconftest.py1# Licensed to the Apache Software Foundation (ASF) under one
LOW.markdownlint-cli2.yaml1# Licensed to the Apache Software Foundation (ASF) under one
LOWversion.py1# Licensed to the Apache Software Foundation (ASF) under one
LOW.pre-commit-config.yaml1# Licensed to the Apache Software Foundation (ASF) under one
LOWpyproject.toml1# Licensed to the Apache Software Foundation (ASF) under one
LOW.yamllint.yaml1# Licensed to the Apache Software Foundation (ASF) under one
LOWdocker/dev_common.sh1#!/bin/bash -e
LOWdocker/lint.sh1#!/bin/bash -e
LOWdocker/build.sh1#!/usr/bin/env bash
LOWdocker/build.sh21# Build a docker container and optionally execute command within a it
LOWdocker/build.sh41# DOCKERFILE_PATH: (Optional) Path to the Dockerfile used for docker build. If
LOWdocker/bash.sh1#!/usr/bin/env bash
LOWdocker/bash.sh21# Start a bash, mount REPO_MOUNT_POINT to be current directory.
LOWdocker/clear-stale-images.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_core.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_libtorch.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_dgl.sh1#!/bin/bash
LOWdocker/install/ubuntu_setup_tz.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_nodejs.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_tflite.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_googletest.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_vulkan.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_onnx.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_dnnl.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_aprofile_aem.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_xgboost.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_java.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_jax.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_sphinx.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_rocm.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_nnef.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_universal.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_cmake.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_tensorflow_aarch64.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_coreml.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_clang_format.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_emscripten.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_opencl.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_python_package.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_python.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_sccache.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_tensorflow.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_llvm.sh1#!/bin/bash
LOWdocker/install/ubuntu_install_cuda_python.sh1#!/bin/bash
LOWdocker/python/bootstrap/generate.sh1#!/bin/env bash
LOWdocker/utils/apt-install-and-clear.sh1#!/bin/bash -e
LOWdocker/utils/download-and-verify.sh1#!/bin/bash
LOWpython/tvm/error.py1# Licensed to the Apache Software Foundation (ASF) under one
LOWpython/tvm/__init__.py1# isort: skip_file
LOWpython/tvm/libinfo.py1# Licensed to the Apache Software Foundation (ASF) under one
LOWpython/tvm/ffi.py1# Licensed to the Apache Software Foundation (ASF) under one
LOWpython/tvm/base.py1# Licensed to the Apache Software Foundation (ASF) under one
LOWpython/tvm/base.py41#
LOWpython/tvm/topi/signal.py1# Licensed to the Apache Software Foundation (ASF) under one
LOWpython/tvm/topi/slice_scatter.py1# Licensed to the Apache Software Foundation (ASF) under one
LOWpython/tvm/topi/reduction.py1# Licensed to the Apache Software Foundation (ASF) under one
LOWpython/tvm/topi/sort.py1# Licensed to the Apache Software Foundation (ASF) under one
LOWpython/tvm/topi/einsum.py1# Licensed to the Apache Software Foundation (ASF) under one
1887 more matches not shown…
Unused Imports2209 hits · 1756 pts
SeverityFileLineSnippet
LOWpython/tvm/__init__.py26
LOWpython/tvm/__init__.py26
LOWpython/tvm/__init__.py26
LOWpython/tvm/__init__.py29
LOWpython/tvm/__init__.py29
LOWpython/tvm/__init__.py33
LOWpython/tvm/__init__.py34
LOWpython/tvm/__init__.py34
LOWpython/tvm/__init__.py34
LOWpython/tvm/__init__.py34
LOWpython/tvm/__init__.py34
LOWpython/tvm/__init__.py34
LOWpython/tvm/__init__.py35
LOWpython/tvm/__init__.py35
LOWpython/tvm/__init__.py35
LOWpython/tvm/__init__.py35
LOWpython/tvm/__init__.py36
LOWpython/tvm/__init__.py36
LOWpython/tvm/__init__.py42
LOWpython/tvm/__init__.py43
LOWpython/tvm/__init__.py44
LOWpython/tvm/__init__.py45
LOWpython/tvm/__init__.py49
LOWpython/tvm/__init__.py52
LOWpython/tvm/__init__.py55
LOWpython/tvm/__init__.py58
LOWpython/tvm/__init__.py61
LOWpython/tvm/__init__.py61
LOWpython/tvm/__init__.py64
LOWpython/tvm/__init__.py67
LOWpython/tvm/__init__.py70
LOWpython/tvm/__init__.py70
LOWpython/tvm/__init__.py78
LOWpython/tvm/__init__.py81
LOWpython/tvm/libinfo.py19
LOWpython/tvm/ffi.py21
LOWpython/tvm/base.py80
LOWpython/tvm/topi/__init__.py29
LOWpython/tvm/topi/__init__.py33
LOWpython/tvm/topi/__init__.py35
LOWpython/tvm/topi/__init__.py36
LOWpython/tvm/topi/__init__.py37
LOWpython/tvm/topi/__init__.py38
LOWpython/tvm/topi/__init__.py39
LOWpython/tvm/topi/__init__.py40
LOWpython/tvm/topi/__init__.py41
LOWpython/tvm/topi/__init__.py42
LOWpython/tvm/topi/__init__.py43
LOWpython/tvm/topi/__init__.py44
LOWpython/tvm/topi/__init__.py45
LOWpython/tvm/topi/__init__.py46
LOWpython/tvm/topi/__init__.py47
LOWpython/tvm/topi/__init__.py48
LOWpython/tvm/topi/__init__.py49
LOWpython/tvm/topi/__init__.py50
LOWpython/tvm/topi/__init__.py51
LOWpython/tvm/topi/__init__.py52
LOWpython/tvm/topi/__init__.py53
LOWpython/tvm/topi/__init__.py54
LOWpython/tvm/topi/__init__.py55
2149 more matches not shown…
Deep Nesting1811 hits · 1514 pts
SeverityFileLineSnippet
LOWversion.py144
LOWpython/tvm/libinfo.py249
LOWpython/tvm/topi/signal.py27
LOWpython/tvm/topi/signal.py131
LOWpython/tvm/topi/signal.py71
LOWpython/tvm/topi/signal.py160
LOWpython/tvm/topi/unique.py25
LOWpython/tvm/topi/sparse_reshape.py26
LOWpython/tvm/topi/sparse_reshape.py74
LOWpython/tvm/topi/utils.py176
LOWpython/tvm/topi/scatter.py57
LOWpython/tvm/topi/scatter.py98
LOWpython/tvm/topi/scan.py32
LOWpython/tvm/topi/scan.py117
LOWpython/tvm/topi/scatter_elements.py27
LOWpython/tvm/topi/scatter_elements.py99
LOWpython/tvm/topi/index_put.py27
LOWpython/tvm/topi/index_put.py91
LOWpython/tvm/topi/gpu/sort.py39
LOWpython/tvm/topi/gpu/sort.py85
LOWpython/tvm/topi/gpu/sort.py183
LOWpython/tvm/topi/gpu/sort.py1084
LOWpython/tvm/topi/gpu/sort.py257
LOWpython/tvm/topi/gpu/sort.py1122
LOWpython/tvm/topi/gpu/scan.py55
LOWpython/tvm/topi/gpu/scan.py221
LOWpython/tvm/topi/gpu/scan.py248
LOWpython/tvm/topi/gpu/scatter_elements.py30
LOWpython/tvm/topi/gpu/scatter_elements.py62
LOWpython/tvm/topi/gpu/scatter_nd.py31
LOWpython/tvm/topi/gpu/scatter_nd.py35
LOWpython/tvm/topi/nn/fifo_buffer.py29
LOWpython/tvm/topi/nn/bitserial_util.py29
LOWpython/tvm/topi/nn/utils.py118
LOWpython/tvm/topi/nn/utils.py167
LOWpython/tvm/topi/nn/utils.py215
LOWpython/tvm/topi/nn/utils.py274
LOWpython/tvm/topi/vision/nms_util.py87
LOWpython/tvm/topi/vision/nms_util.py126
LOWpython/tvm/topi/vision/nms_util.py288
LOWpython/tvm/topi/vision/nms.py39
LOWpython/tvm/topi/vision/nms.py182
LOWpython/tvm/topi/vision/nms.py664
LOWpython/tvm/topi/vision/nms.py706
LOWpython/tvm/topi/vision/nms.py778
LOWpython/tvm/topi/vision/nms.py852
LOWpython/tvm/topi/vision/nms.py898
LOWpython/tvm/topi/vision/nms.py944
LOWpython/tvm/topi/vision/nms.py670
LOWpython/tvm/topi/vision/nms.py724
LOWpython/tvm/topi/vision/nms.py781
LOWpython/tvm/topi/vision/nms.py824
LOWpython/tvm/topi/image/resize.py140
LOWpython/tvm/topi/image/resize.py178
LOWpython/tvm/topi/image/resize.py224
LOWpython/tvm/topi/image/resize.py373
LOWpython/tvm/topi/image/resize.py495
LOWpython/tvm/topi/image/resize.py746
LOWpython/tvm/topi/image/resize.py959
LOWpython/tvm/topi/testing/adaptive_pool_python.py91
1751 more matches not shown…
Decorative Section Separators465 hits · 1414 pts
SeverityFileLineSnippet
MEDIUMversion.py37# ---------------------------------------------------
MEDIUMversion.py51# ---------------------------------------------------
MEDIUMpython/tvm/base.py29# ----------------------------
MEDIUMpython/tvm/base.py31# ----------------------------
MEDIUMpython/tvm/base.py36# ----------------------------
MEDIUMpython/tvm/base.py38# ----------------------------
MEDIUMpython/tvm/target/tag_registry/cuda.py122# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py124# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py133# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py135# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py171# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py173# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py182# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py184# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py187# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py189# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py192# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py194# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py203# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py205# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py212# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py214# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py360# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py362# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py368# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py370# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py56# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py58# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py83# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py85# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py147# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py149# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py225# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py227# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py252# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py254# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py266# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py268# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py283# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py285# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py305# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py307# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py338# =====================================================================
MEDIUMpython/tvm/target/tag_registry/cuda.py340# =====================================================================
MEDIUMpython/tvm/tirx/layout.py528# ------------------------------------------------------------------
MEDIUMpython/tvm/tirx/layout.py530# ------------------------------------------------------------------
MEDIUMpython/tvm/tirx/layout.py557# ------------------------------------------------------------------
MEDIUMpython/tvm/tirx/layout.py559# ------------------------------------------------------------------
MEDIUMpython/tvm/tirx/layout.py616# ------------------------------------------------------------------
MEDIUMpython/tvm/tirx/layout.py618# ------------------------------------------------------------------
MEDIUMpython/tvm/tirx/lang/alloc_pool.py27# ---------------------------------------------------------------------------
MEDIUMpython/tvm/tirx/lang/alloc_pool.py29# ---------------------------------------------------------------------------
MEDIUMpython/tvm/tirx/lang/alloc_pool.py49# ---------------------------------------------------------------------------
MEDIUMpython/tvm/tirx/lang/alloc_pool.py51# ---------------------------------------------------------------------------
MEDIUMpython/tvm/tirx/lang/alloc_pool.py176# ---------------------------------------------------------------------------
MEDIUMpython/tvm/tirx/lang/alloc_pool.py178# ---------------------------------------------------------------------------
MEDIUMpython/tvm/tirx/lang/alloc_pool.py228# ---------------------------------------------------------------------------
MEDIUMpython/tvm/tirx/lang/alloc_pool.py230# ---------------------------------------------------------------------------
MEDIUMpython/tvm/tirx/lang/alloc_pool.py394# ---------------------------------------------------------------------------
MEDIUMpython/tvm/tirx/lang/alloc_pool.py396# ---------------------------------------------------------------------------
405 more matches not shown…
Cross-File Repetition100 hits · 500 pts
SeverityFileLineSnippet
HIGH…hon/tvm/s_tir/meta_schedule/cost_model/random_model.py0load the cost model from given file location. parameters ---------- path : str the file path.
HIGHpython/tvm/s_tir/meta_schedule/cost_model/cost_model.py0load the cost model from given file location. parameters ---------- path : str the file path.
HIGHpython/tvm/s_tir/meta_schedule/cost_model/cost_model.py0load the cost model from given file location. parameters ---------- path : str the file path.
HIGH…hon/tvm/s_tir/meta_schedule/cost_model/random_model.py0save the cost model to given file location. parameters ---------- path : str the file path.
HIGHpython/tvm/s_tir/meta_schedule/cost_model/cost_model.py0save the cost model to given file location. parameters ---------- path : str the file path.
HIGHpython/tvm/s_tir/meta_schedule/cost_model/cost_model.py0save the cost model to given file location. parameters ---------- path : str the file path.
HIGH…hon/tvm/s_tir/meta_schedule/cost_model/random_model.py0update the cost model given running results. parameters ---------- context : tunecontext, the tuning context. candidates
HIGHpython/tvm/s_tir/meta_schedule/cost_model/cost_model.py0update the cost model given running results. parameters ---------- context : tunecontext, the tuning context. candidates
HIGHpython/tvm/s_tir/meta_schedule/cost_model/cost_model.py0update the cost model given running results. parameters ---------- context : tunecontext, the tuning context. candidates
HIGHpython/tvm/contrib/mkl.py0create an extern op that compute matrix mult of a and rhs with crhslas this function serves as an example on how to call
HIGHpython/tvm/contrib/mkl.py0create an extern op that compute matrix mult of a and rhs with crhslas this function serves as an example on how to call
HIGHpython/tvm/contrib/cblas.py0create an extern op that compute matrix mult of a and rhs with crhslas this function serves as an example on how to call
HIGHpython/tvm/contrib/dnnl.py0create an extern op that compute matrix mult of a and rhs with crhslas this function serves as an example on how to call
HIGHpython/tvm/contrib/hipblas.py0create an extern op that compute matrix mult of a and rhs with cublas parameters ---------- lhs : tensor the left matrix
HIGHpython/tvm/contrib/cublaslt.py0create an extern op that compute matrix mult of a and rhs with cublas parameters ---------- lhs : tensor the left matrix
HIGHpython/tvm/contrib/cublas.py0create an extern op that compute matrix mult of a and rhs with cublas parameters ---------- lhs : tensor the left matrix
HIGHpython/tvm/contrib/hexagon/build.py0abstract method implementation. see description in hexagonlauncherrpc.
HIGHpython/tvm/contrib/hexagon/build.py0abstract method implementation. see description in hexagonlauncherrpc.
HIGHpython/tvm/contrib/hexagon/build.py0abstract method implementation. see description in hexagonlauncherrpc.
HIGHpython/tvm/contrib/hexagon/build.py0abstract method implementation. see description in hexagonlauncherrpc.
HIGHpython/tvm/contrib/hexagon/build.py0abstract method implementation. see description in hexagonlauncherrpc.
HIGHpython/tvm/contrib/hexagon/build.py0abstract method implementation. see description in hexagonlauncherrpc.
HIGHpython/tvm/contrib/hexagon/build.py0abstract method implementation. see description in hexagonlauncherrpc.
HIGHpython/tvm/contrib/hexagon/build.py0abstract method implementation. see description in hexagonlauncherrpc.
HIGHpython/tvm/contrib/hexagon/build.py0abstract method implementation. see description in hexagonlauncherrpc.
HIGHpython/tvm/contrib/hexagon/build.py0abstract method implementation. see description in hexagonlauncherrpc.
HIGHpython/tvm/contrib/hexagon/build.py0abstract method implementation. see description in hexagonlauncherrpc.
HIGHpython/tvm/contrib/hexagon/build.py0abstract method implementation. see description in hexagonlauncherrpc.
HIGHpython/tvm/relax/pipeline.py0get the default legalization passes for the given target.
HIGHpython/tvm/relax/pipeline.py0get the default legalization passes for the given target.
HIGHpython/tvm/relax/pipeline.py0get the default legalization passes for the given target.
HIGHpython/tvm/relax/frontend/nn/llm/_kernel_common.py0the rope mode of the paged kv cache. if it is none, the kv cache will not apply rope to q and k. if it is normal, rope w
HIGH…x/test_runtime_builtin_paged_attention_kv_cache_cpu.py0the rope mode of the paged kv cache. if it is none, the kv cache will not apply rope to q and k. if it is normal, rope w
HIGHdocs/how_to/tutorials/optimize_llm.py0the rope mode of the paged kv cache. if it is none, the kv cache will not apply rope to q and k. if it is normal, rope w
HIGHpython/tvm/relax/training/optimizer.py0use blockbuilder to construct an optimizer function that executes updates of the parameters and the optimizer state. `in
HIGHpython/tvm/relax/training/optimizer.py0use blockbuilder to construct an optimizer function that executes updates of the parameters and the optimizer state. `in
HIGHpython/tvm/relax/training/optimizer.py0use blockbuilder to construct an optimizer function that executes updates of the parameters and the optimizer state. `in
HIGHpython/tvm/relax/testing/transform.py0inner function for the dataflow inplace transformation exposed for testing.
HIGHpython/tvm/relax/testing/transform.py0inner function for the dataflow inplace transformation exposed for testing.
HIGHpython/tvm/relax/testing/transform.py0inner function for the dataflow inplace transformation exposed for testing.
HIGHpython/tvm/relax/testing/transform.py0inner function for the dataflow inplace transformation exposed for testing.
HIGHpython/tvm/tirx/operator/tile_primitive/ops.py0get the destination expression (output) of the operator.
HIGHpython/tvm/tirx/operator/tile_primitive/ops.py0get the destination expression (output) of the operator.
HIGHpython/tvm/tirx/operator/tile_primitive/ops.py0get the destination expression (output) of the operator.
HIGHpython/tvm/tirx/operator/tile_primitive/ops.py0get the destination expression (output) of the operator.
HIGHpython/tvm/tirx/operator/tile_primitive/ops.py0get the source expressions (inputs) of the operator.
HIGHpython/tvm/tirx/operator/tile_primitive/ops.py0get the source expressions (inputs) of the operator.
HIGHpython/tvm/tirx/operator/tile_primitive/ops.py0get the source expressions (inputs) of the operator.
HIGHpython/tvm/tirx/operator/tile_primitive/ops.py0get the source expressions (inputs) of the operator.
HIGHpython/tvm/tirx/operator/tile_primitive/ops.py0get the source expressions (inputs) of the operator.
HIGHpython/tvm/tirx/operator/tile_primitive/ops.py0get the source expressions (inputs) of the operator.
HIGHpython/tvm/tirx/operator/tile_primitive/ops.py0get the source expressions (inputs) of the operator.
HIGHpython/tvm/tirx/operator/tile_primitive/ops.py0get the source expressions (inputs) of the operator.
HIGHpython/tvm/tirx/operator/tile_primitive/ops.py0get the source expressions (inputs) of the operator.
HIGHpython/tvm/tirx/operator/tile_primitive/ops.py0get the source expressions (inputs) of the operator.
HIGHpython/tvm/tirx/operator/tile_primitive/ops.py0get the source expressions (inputs) of the operator.
HIGHpython/tvm/tirx/operator/tile_primitive/ops.py0get the source expressions (inputs) of the operator.
HIGHpython/tvm/tirx/operator/tile_primitive/ops.py0get the destination expressions (outputs) of the operator.
HIGHpython/tvm/tirx/operator/tile_primitive/ops.py0get the destination expressions (outputs) of the operator.
HIGHpython/tvm/tirx/operator/tile_primitive/ops.py0get the destination expressions (outputs) of the operator.
40 more matches not shown…
Hallucination Indicators35 hits · 385 pts
SeverityFileLineSnippet
CRITICAL…vm/tirx/operator/tile_primitive/cuda/copy_async/tma.py1189 Tx.ptx.cp_async.bulk.tensor.g2c(
CRITICAL…vm/tirx/operator/tile_primitive/cuda/copy_async/tma.py1201 Tx.ptx.cp_async.bulk.tensor.s2g(
CRITICAL…vm/tirx/operator/tile_primitive/cuda/copy_async/tma.py1209 Tx.ptx.cp_async.bulk.tensor.s2g_reduce(
CRITICAL…end/adreno/test_transform_fold_vdevice_scope_change.py29 mod = tvm.relax.backend.adreno.transform.FoldVDeviceScopeChange()(input)
CRITICAL…backend/adreno/test_transform_annotate_custom_scope.py95 mod = tvm.relax.backend.adreno.transform.AnnotateCustomMemoryScope(tgt)(mod)
CRITICAL…backend/adreno/test_transform_annotate_custom_scope.py107 mod = tvm.relax.backend.adreno.transform.FoldVDeviceScopeChange()(mod)
CRITICALtests/python/tirx/test_printer_tir_namespaces.py412 'Tx.ptx.cp_async.bulk.tensor.g2c(2, tm, 0, tm, 0, 1, Tx.uint64(0), 0, 0, 1, "")',
CRITICALtests/python/tirx/test_printer_tir_namespaces.py425 'Tx.ptx.cp_async.bulk.tensor.g2c_prefetch(2, tm, Tx.uint64(0), 0, 0, 0, "")',
CRITICALtests/python/tirx/test_printer_tir_namespaces.py429 'tm = Tx.handle()\nTx.ptx.cp_async.bulk.tensor.s2g(2, 0, tm, Tx.uint64(0), 0, 0, 0, "")',
CRITICALtests/python/tirx/test_parser_printer.py1897 Tx.ptx.cp_async.bulk.tensor.g2c(
CRITICALtests/python/tirx/test_parser_printer.py1918 Tx.ptx.cp_async.bulk.tensor.s2g(
CRITICALtests/python/tirx/test_parser_printer.py1938 Tx.ptx.cp_async.bulk.tensor.g2c_prefetch(
CRITICALtests/python/tirx/test_parser_printer.py1959 Tx.ptx.cp_async.bulk.tensor.s2g_reduce(
CRITICALtests/python/tirx/test_verifier.py263 Tx.ptx.cp_async.bulk.tensor.g2c(2, A_smem.data, bar.data, Tx.address_of(A_map), 0, 1, "", 0,
CRITICALtests/python/tirx/codegen/test_codegen_hopper.py679 Tx.ptx.cp_async.bulk.tensor.g2c(len(shape), A_smem.access_ptr(Buffer.WRITE, offs
CRITICALtests/python/tirx/codegen/test_codegen_hopper.py682 Tx.ptx.cp_async.bulk.tensor.g2c(len(shape), A_smem.access_ptr(Buffer.WRITE, offs
CRITICALtests/python/tirx/codegen/test_codegen_hopper.py685 Tx.ptx.cp_async.bulk.tensor.g2c(len(shape), A_smem.access_ptr(Buffer.WRITE, offs
CRITICALtests/python/tirx/codegen/test_codegen_hopper.py688 Tx.ptx.cp_async.bulk.tensor.g2c(len(shape), A_smem.access_ptr(Buffer.WRITE, offs
CRITICALtests/python/tirx/codegen/test_codegen_hopper.py697 Tx.ptx.cp_async.bulk.tensor.s2g(len(shape), A_smem.access_ptr("r", offset=0), Tx
CRITICALtests/python/tirx/codegen/test_codegen_hopper.py347 Tx.ptx.cp_async.bulk.tensor.g2c(len(shape), A_smem.data, Tx.address_of(bar), Tx.address_
CRITICALtests/python/tirx/codegen/test_codegen_hopper.py356 Tx.ptx.cp_async.bulk.tensor.s2g(len(shape), A_smem.access_ptr("r", offset=0), Tx.address
CRITICALtests/python/tirx/codegen/test_codegen_hopper.py509 Tx.ptx.cp_async.bulk.tensor.g2c(len(shape), A_smem.data, Tx.address_of(bar), Tx.address_
CRITICALtests/python/tirx/codegen/test_codegen_hopper.py518 Tx.ptx.cp_async.bulk.tensor.s2g(len(shape), A_smem.access_ptr("r", offset=0), Tx.address
CRITICALtests/python/tirx/codegen/test_codegen_hopper.py598 Tx.ptx.cp_async.bulk.tensor.g2c(len(shape), A_smem.data, Tx.address_of(bar), Tx.
CRITICALtests/python/tirx/codegen/test_codegen_hopper.py607 Tx.ptx.cp_async.bulk.tensor.s2g(len(shape), A_smem.access_ptr("r", offset=0), Tx
CRITICALtests/python/tirx/codegen/test_codegen_hopper.py758 Tx.ptx.cp_async.bulk.tensor.s2g(len(shape), A_smem.access_ptr("r", offset=0), Tx.address_of(A_ma
CRITICALtests/python/tirx/codegen/test_codegen_hopper.py847 Tx.ptx.cp_async.bulk.tensor.g2c(len(shapeA), A_smem.data, Tx.address_of(bar), Tx.address_of(A_ma
CRITICALtests/python/tirx/codegen/test_codegen_hopper.py848 Tx.ptx.cp_async.bulk.tensor.g2c(len(shapeB), B_smem.data, Tx.address_of(bar), Tx.address_of(B_ma
CRITICALtests/python/tirx/codegen/test_codegen_hopper.py1005 Tx.ptx.cp_async.bulk.tensor.g2c(len(shapeB), B_smem.data, Tx.address_of(bar), Tx.address_of(B_ma
CRITICALtests/python/tirx/codegen/test_codegen_cuda.py303 Tx.ptx.cp_async.bulk.tensor.g2c(
CRITICALtests/python/tirx/codegen/test_codegen_cuda.py315 Tx.ptx.cp_async.bulk.tensor.g2c(
CRITICALtests/python/tirx/codegen/test_codegen_cuda.py327 Tx.ptx.cp_async.bulk.tensor.s2g(
CRITICALtests/python/tirx/codegen/test_codegen_cuda.py331 Tx.ptx.cp_async.bulk.tensor.g2c_bar_addr(
CRITICALtests/python/tirx/codegen/test_codegen_cuda.py344 Tx.ptx.cp_async.bulk.tensor.g2c_bar_addr(
CRITICALtests/python/tirx/codegen/test_codegen_cuda.py357 Tx.ptx.cp_async.bulk.tensor.g2c_bar_addr(
Self-Referential Comments56 hits · 151 pts
SeverityFileLineSnippet
MEDIUMpython/tvm/topi/testing/poolnd_python.py163 # Create a padded array, and a boolean mask showing which values are padded values
MEDIUMpython/tvm/te/operation.py178 # The following code is equivalent to numpy.cumsum
MEDIUMpython/tvm/relax/base_py_module.py481 # Create a wrapper that handles both instance methods and static functions
MEDIUMpython/tvm/relax/relax_to_pyfunc_converter.py87 # Create a copy of the current IRModule
MEDIUMpython/tvm/relax/relax_to_pyfunc_converter.py128 # Create the Python function
MEDIUMpython/tvm/relax/frontend/tflite/tflite_frontend.py7593 # Define a tf.Module containing a tf.function with network definition
MEDIUMpython/tvm/relax/frontend/nn/core.py359 """This method provides an iterator over module parameters,
MEDIUMpython/tvm/relax/frontend/nn/core.py376 """This method provides an iterator over module parameters,
MEDIUMpython/tvm/relax/frontend/onnx/onnx_frontend.py3716 # Create a tensor of zeros then scatter our data through it.
MEDIUM…n/tvm/relax/frontend/torch/base_fx_graph_translator.py1413 # Create a placeholder for indices (empty tensor with same shape as output)
MEDIUM…n/tvm/relax/frontend/torch/base_fx_graph_translator.py1429 # Create a placeholder for indices (empty tensor with same shape as output)
MEDIUM…n/tvm/relax/frontend/torch/base_fx_graph_translator.py1445 # Create a placeholder for indices (empty tensor with same shape as output)
MEDIUMpython/tvm/relax/frontend/torch/fx_translator.py1230 # Define the module
MEDIUM…vm/relax/frontend/torch/exported_program_translator.py185 # This method is called for batch_norm in training mode
MEDIUM…vm/relax/frontend/torch/exported_program_translator.py2130 # Define the module
MEDIUMpython/tvm/relax/testing/nn.py228 # Define a linear layer
MEDIUMpython/tvm/relax/transform/transform.py1116 # Define the pass input IRModule
MEDIUMpython/tvm/relax/transform/transform.py1127 # Define the customized legalization function for "relax.add"
MEDIUMpython/tvm/tirx/stmt_functor.py493 # Create the data_or_idx parameter based on what's available
MEDIUMpython/tvm/tirx/expr.py244 # This class is not manipulated by C++. So use python's identity check function is sufficient
MEDIUMpython/tvm/tirx/expr.py284 # This class is not manipulated by C++. So use python's identity check function is sufficient
MEDIUM…tvm/tirx/operator/tile_primitive/trn/binary/default.py74 # Define the implementation function
MEDIUMci/scripts/github/github_tag_teams.py272 # Create the new PR/issue body
MEDIUMtests/python/driver/test_compile.py63 # Define a simple Relax program
MEDIUMtests/python/tirx-base/test_tir_expr_functor.py830 # Create a simple expression
MEDIUMtests/python/tirx-base/test_tir_expr_functor.py833 # Create a mutator that replaces 'n' with a constant
MEDIUMtests/python/tirx-base/test_tir_stmt_functor.py994 # Create a new IntImm with negated value
MEDIUMtests/python/runtime/test_executable.py107 # Create a temporary directory for the library
MEDIUMtests/python/runtime/test_executable.py181 # Create an executable
MEDIUMtests/python/runtime/test_executable.py237 # Create an executable
MEDIUMtests/python/s_tir/dlight/test_gpu_fallback.py203 # This function is identical, except that it is explicitly
MEDIUMtests/python/contrib/test_util.py77 # Creating a new TempDirectory should fail now
MEDIUM…ython/contrib/test_hexagon/test_benchmark_maxpool2d.py227 # Create the host-side directory for this benchmark run's files / logs...
MEDIUM…on/contrib/test_hexagon/test_benchmark_elemwise_add.py121 # The below code is commented is commented to avoid unreachable error
MEDIUM…on/contrib/test_hexagon/test_benchmark_elemwise_add.py187 # Create the host-side directory for this benchmark run's files / logs...
MEDIUM…on/contrib/test_hexagon/test_benchmark_elemwise_add.py218 # Create an actual Hexagon-native shared object file, initially stored on the
MEDIUM…on/contrib/test_hexagon/test_benchmark_elemwise_add.py244 # Create the target-side tensors to hold the primfunc's inputs and outputs...
MEDIUMtests/python/codegen/test_target_codegen_llvm.py50 # Create an intrinsic that returns void.
MEDIUMtests/python/tirx-transform/test_tir_functor.py266 # Create a simple for loop
MEDIUMtests/python/tirx-transform/test_tir_functor.py298 # Create an evaluate statement with an expression
MEDIUM…/tirx-analysis/test_tir_analysis_verify_well_formed.py446 # Create an undeclared buffer using an explicit data pointer that is NOT
MEDIUM…ime_builtin_paged_attention_kv_cache_mla_flashinfer.py407 # Create a mask similar to np.tril and np.triu.
MEDIUMtests/python/relax/test_pytorch_integration.py160 # Define a custom function
MEDIUMtests/python/relax/test_base_py_module.py115 # Create a simple IRModule without TIR functions for GPU testing
MEDIUMtests/python/relax/test_dlpack_integration.py213 # Create a simple IRModule
MEDIUM…st_runtime_builtin_paged_attention_kv_cache_mla_tir.py389 # Create a mask similar to np.tril and np.triu.
MEDIUMtests/python/tirx/transform/test_stmt_functor.py1006 # Create a new IntImm with negated value
MEDIUMtests/python/tirx/transform/test_expr_functor.py830 # Create a simple expression
MEDIUMtests/python/tirx/transform/test_expr_functor.py833 # Create a mutator that replaces 'n' with a constant
MEDIUMtests/scripts/task_config_build_gpu_other.sh19# This file is a compiler test to ensure that runtimes can compile
MEDIUMdocs/conf.py23# This file is execfile()d with the current directory set to its
MEDIUMdocs/how_to/tutorials/cross_compilation_and_rpc.py413# The following function shows how we run an OpenCL kernel remotely
MEDIUMdocs/how_to/tutorials/customize_opt.py121# Define a new pass for CUBLAS dispatch
MEDIUMdocs/how_to/tutorials/import_model.py307 # Define a simple TF module and convert to TFLite.
MEDIUMdocs/how_to/tutorials/optimize_llm.py530# Create the KVCache
MEDIUMdocs/get_started/tutorials/ir_module.py57# Create a dummy model
Excessive Try-Catch Wrapping104 hits · 114 pts
SeverityFileLineSnippet
LOWpython/tvm/ir/instrument.py338 except Exception: # pylint: disable=broad-exception-caught
LOWpython/tvm/ir/base.py35 except Exception:
LOWpython/tvm/target/tag_registry/metal.py30 except Exception: # pylint: disable=broad-except
MEDIUMpython/tvm/target/tag_registry/metal.py24def _register_metal_tag(name, max_threads, shared_mem, warp_size, mcpu):
LOWpython/tvm/runtime/_tensor.py114 except Exception:
LOWpython/tvm/s_tir/schedule/_type_checker.py350 except Exception:
LOW…hon/tvm/s_tir/meta_schedule/post_optimization/space.py237 except Exception: # pylint: disable=broad-except, invalid-name
LOW…hon/tvm/s_tir/meta_schedule/post_optimization/space.py251 except Exception: # pylint: disable=broad-except, invalid-name
LOWpython/tvm/s_tir/meta_schedule/runner/local_runner.py310 except Exception as exception: # pylint: disable=broad-except
LOWpython/tvm/s_tir/meta_schedule/runner/rpc_runner.py127 except Exception as exception: # pylint: disable=broad-except
MEDIUMpython/tvm/s_tir/meta_schedule/runner/rpc_runner.py119def result(self) -> RunnerResult:
LOW…n/tvm/s_tir/meta_schedule/testing/validate_database.py768 except Exception as e: # pylint: disable=broad-except, invalid-name
LOWpython/tvm/s_tir/meta_schedule/testing/tune_utils.py107 except Exception as exc: # pylint: disable=broad-except
LOWpython/tvm/s_tir/dlight/adreno/pool.py91 except Exception: # pylint: disable=broad-except
LOWpython/tvm/s_tir/dlight/adreno/fallback.py82 except Exception: # pylint: disable=broad-exception-caught
LOWpython/tvm/s_tir/dlight/adreno/fallback.py94 except Exception: # pylint: disable=broad-exception-caught
LOWpython/tvm/s_tir/dlight/analysis/common_analysis.py296 except Exception: # pylint: disable=broad-except
LOWpython/tvm/s_tir/dlight/analysis/common_analysis.py399 except Exception:
LOWpython/tvm/contrib/download.py123 except Exception as err:
LOWpython/tvm/script/parser/core/parser.py338 except Exception as err: # pylint: disable=broad-except
LOWpython/tvm/script/parser/core/parser.py629 except Exception as diag_err:
LOWpython/tvm/script/parser/core/parser.py667 except Exception as err: # pylint: disable=broad-except
MEDIUMpython/tvm/script/parser/core/parser.py59def context():
LOWpython/tvm/script/parser/core/entry.py142 except Exception as err: # pylint: disable=broad-exception-caught
LOWpython/tvm/script/parser/core/entry.py172 except Exception as error:
MEDIUMpython/tvm/script/parser/core/entry.py173 print(f"Error calling Python function {pyfunc.__name__}: {error}")
LOWpython/tvm/script/parser/core/evaluator.py268 except Exception as err: # pylint: disable=broad-except
LOWpython/tvm/script/parser/core/evaluator.py287 except Exception as err: # pylint: disable=broad-except
LOWpython/tvm/script/parser/core/evaluator.py496 except Exception as err: # pylint: disable=broad-except
LOWpython/tvm/script/parser/ir/entry.py105 except Exception: # pylint: disable=broad-exception-caught
LOWpython/tvm/support/popen_pool.py440 except Exception as exception:
MEDIUMpython/tvm/support/popen_pool.py122def __del__(self):
LOWpython/tvm/exec/popen_worker.py108 except Exception as exception:
LOWpython/tvm/relax/base_py_module.py147 except Exception as error:
LOWpython/tvm/relax/base_py_module.py155 except Exception as error:
LOWpython/tvm/relax/base_py_module.py449 except Exception as error:
LOWpython/tvm/relax/frontend/nn/exporter.py39 except Exception as exception:
MEDIUMpython/tvm/relax/frontend/onnx/onnx_frontend.py5510 print(f"Error converting operator {op_name}, with inputs: {inputs}")
LOWpython/tvm/relax/frontend/onnx/onnx_frontend.py5735 except Exception as exception: # pylint: disable=c-extension-no-member, broad-except
LOWpython/tvm/relax/frontend/torch/fx_translator.py1253 except Exception:
LOWpython/tvm/relax/op/_op_gradient.py70 except Exception as error:
LOWpython/tvm/relax/op/_op_gradient.py81 except Exception as error:
LOWpython/tvm/relax/script/parser/parser.py107 except Exception as err: # pylint: disable=broad-except
LOWpython/tvm/relax/script/parser/parser.py117 except Exception as err: # pylint: disable=broad-except
LOWpython/tvm/tirx/layout.py145 except Exception:
LOWpython/tvm/tirx/bench.py192 except Exception:
LOWpython/tvm/tirx/bench.py216 except Exception:
LOWpython/tvm/tirx/bench.py222 except Exception:
LOWpython/tvm/tirx/script/__init__.py57 except Exception:
MEDIUMpython/tvm/tirx/script/__init__.py54def _fn(*args, workspace=None, config=None, dispatch=None, **kwargs):
LOWpython/tvm/tirx/script/parser/parser.py407 except Exception: # pylint: disable=broad-except
LOWpython/tvm/tirx/script/parser/parser.py491 except Exception: # pylint: disable=broad-except
LOWpython/tvm/tirx/script/parser/parser.py638 except Exception: # pylint: disable=broad-except
LOWpython/tvm/tirx/script/parser/parser.py895 except Exception: # pylint: disable=broad-except
LOWpython/tvm/tirx/script/builder/ir.py2866 except Exception: # pragma: no cover
LOWpython/tvm/tirx/script/builder/ir.py2881 except Exception: # pragma: no cover
LOWpython/tvm/tirx/script/builder/ir.py3414 except Exception:
LOWpython/tvm/tirx/script/builder/ir.py3432 except Exception:
LOWpython/tvm/tirx/operator/intrinsics/_schema.py172 except Exception:
LOWpython/tvm/tirx/operator/intrinsics/_schema.py179 except Exception:
44 more matches not shown…
Verbosity Indicators57 hits · 95 pts
SeverityFileLineSnippet
LOWpython/tvm/topi/vision/nms.py220 # Step 1: Reorder data by sorted score
LOWpython/tvm/topi/vision/nms.py241 # Step 2: Apply NMS - greedy suppression
LOWpython/tvm/ir/transform.py295 The following code block decorates a module pass class.
LOWpython/tvm/s_tir/meta_schedule/runner/local_runner.py146 # Step 1: create the local runtime module
LOWpython/tvm/s_tir/meta_schedule/runner/local_runner.py149 # Step 2: Allocate input arguments
LOWpython/tvm/s_tir/meta_schedule/runner/local_runner.py157 # Step 3: Run time_evaluator
LOWpython/tvm/s_tir/meta_schedule/runner/rpc_runner.py394 # Step 3: Allocate input arguments
LOWpython/tvm/s_tir/meta_schedule/runner/rpc_runner.py402 # Step 4: Run time_evaluator
LOWpython/tvm/script/parser/ir/parser.py54 # Step 1: Check if this class inherits from BasePyModule
LOWpython/tvm/script/parser/ir/parser.py147 # We need to check if we're in a class that inherits from BasePyModule
LOWpython/tvm/relax/transform/transform.py1688 The following code block decorates a function pass class.
LOWpython/tvm/relax/transform/transform.py1832 The following code block decorates a dataflowblock pass class.
LOWpython/tvm/tirx/build.py183 # Step 0: Determine the target in environment
LOWpython/tvm/tirx/build.py191 # Step 1: Determine the target to search for tirx pipeline
LOWpython/tvm/tirx/build.py202 # Step 2: Determine the host target
LOWpython/tvm/tirx/build.py214 # Step 3: Bind the target to the input module
LOWpython/tvm/tirx/build.py217 # Step 4: Apply the tirx pipeline
LOWpython/tvm/tirx/build.py229 # Step 5: Get host and device modules
LOWpython/tvm/tirx/build.py232 # Step 6: Apply finalization passes
LOWpython/tvm/tirx/transform/function_pass.py110 The following code block decorates a function pass class.
LOWinclude/tvm/topi/nn/pooling.h572 // In the case of ceil_mode=True, we need to check if the last pooling window is valid.
LOWinclude/tvm/ir/config_schema.h125 // Step 1: validate/coerce and materialize options in declaration order
LOWinclude/tvm/ir/config_schema.h140 // Step 2: unknown-key policy
LOWinclude/tvm/ir/config_schema.h157 // Step 3: whole-object canonicalization (last)
LOWtests/python/relax/test_pytorch_integration.py279 # Step 1: TIR matmul
LOWtests/python/relax/test_pytorch_integration.py284 # Step 2: ReLU
LOWtests/python/relax/test_pytorch_integration.py289 # Step 3: Softmax via call_dps_packed
LOWtests/python/relax/test_pytorch_integration.py294 # Step 4: Identity function
LOWtests/python/relax/test_base_py_module_printer.py437 # We need to check if they exist in the IRModule's pyfuncs
LOWdocs/how_to/tutorials/cross_compilation_and_rpc.py498 # Step 1: Define and Export PyTorch Model
LOWdocs/how_to/tutorials/cross_compilation_and_rpc.py524 # Step 2: Convert to Relax and Prepare for Compilation
LOWdocs/how_to/tutorials/cross_compilation_and_rpc.py536 # Step 3: Cross-Compile for Target Device
LOWdocs/how_to/tutorials/cross_compilation_and_rpc.py590 # Step 4: Deploy to Remote Device via RPC
LOWdocs/how_to/tutorials/cross_compilation_and_rpc.py653 # Step 5: Run Inference on Remote Device
LOWdocs/how_to/tutorials/cross_compilation_and_rpc.py692 # Step 6: Performance Evaluation (Optional)
LOW…s/how_to/tutorials/mix_python_and_tvm_with_pymodule.py72# Step 1: Your First Hybrid Module
LOW…s/how_to/tutorials/mix_python_and_tvm_with_pymodule.py125# Step 2: Debugging — The Main Selling Point
LOW…s/how_to/tutorials/mix_python_and_tvm_with_pymodule.py189# Step 3: A Realistic Pipeline — Python, TIR, and Packed Functions
LOW…s/how_to/tutorials/mix_python_and_tvm_with_pymodule.py262# Step 4: Relax-to-Python Converter — Verify at Any Compilation Stage
LOW…s/how_to/tutorials/mix_python_and_tvm_with_pymodule.py334# Step 5: R.call_py_func — Python Callbacks in Compiled IR
LOW…s/how_to/tutorials/mix_python_and_tvm_with_pymodule.py385# Step 6: Cross-Level Calls and Symbolic Shapes
LOWdocs/how_to/tutorials/bring_your_own_codegen.py59# Step 1: Import the backend to register its patterns
LOWdocs/how_to/tutorials/bring_your_own_codegen.py84# Step 2: Define a model
LOWdocs/how_to/tutorials/bring_your_own_codegen.py105# Step 3: Partition the graph
LOWdocs/how_to/tutorials/bring_your_own_codegen.py133# Step 4: Run codegen
LOWdocs/how_to/tutorials/bring_your_own_codegen.py149 # Step 5: Build and run
LOWdocs/how_to/tutorials/bring_your_own_codegen.py169# Step 6: Conv2D + ReLU
LOWdocs/how_to/tutorials/export_and_load_executable.py247# # Step 1: Load the compiled library
LOWdocs/how_to/tutorials/export_and_load_executable.py250# # Step 2: Create Virtual Machine
LOWdocs/how_to/tutorials/export_and_load_executable.py254# # Step 3: Load parameters from the .npz file
LOWdocs/how_to/tutorials/export_and_load_executable.py259# # Step 4: Prepare input data
LOWdocs/how_to/tutorials/export_and_load_executable.py263# # Step 5: Run inference (pass input followed by all parameters)
LOWdocs/how_to/tutorials/export_and_load_executable.py266# # Step 6: Extract result (output may be tuple or single Tensor)
LOWdocs/how_to/tutorials/export_and_load_executable.py342# # Step 1: Cross-compile for ARM target (on local machine)
LOWdocs/how_to/tutorials/export_and_load_executable.py347# # Step 2: Connect to remote device RPC server
LOWdocs/how_to/tutorials/export_and_load_executable.py350# # Step 3: Upload the compiled library and parameters
LOWdocs/how_to/tutorials/export_and_load_executable.py354# # Step 4: Load and run on remote device
Redundant / Tautological Comments51 hits · 82 pts
SeverityFileLineSnippet
LOWpython/tvm/topi/sparse_reshape.py134 # Check if prev_shape and new_shape are equal
LOWpython/tvm/contrib/hexagon/build.py115 # Check if adb available via PATH
LOWpython/tvm/contrib/hexagon/build.py119 # Check if adb available via env vars or default directories
LOWpython/tvm/script/parser/ir/parser.py146 # Check if Python functions are allowed in this context
LOWpython/tvm/testing/plugin.py129 # Check if any explicit parametrizations exist, and apply one
LOWpython/tvm/relax/relax_to_pyfunc_converter.py419 # Check if it's a function parameter
LOWpython/tvm/relax/relax_to_pyfunc_converter.py424 # Check if it's a bound variable
LOWpython/tvm/relax/frontend/tflite/tflite_frontend.py847 # Check if the tensors are quantized. Parse if yes.
LOWpython/tvm/relax/frontend/tflite/tflite_frontend.py3250 # Check if the input tensor is quantized, call QNN op
LOW…n/tvm/relax/frontend/torch/base_fx_graph_translator.py163 # Check if this is a null_value expression
LOW…n/tvm/relax/frontend/torch/base_fx_graph_translator.py1957 # Check if all indices can be squeezed to 1D for sequential take
LOWpython/tvm/relax/frontend/torch/fx_translator.py105 # Check if input is integer type and convert to float32 if needed
LOWpython/tvm/relax/frontend/torch/fx_translator.py115 # Check if input is integer type and convert to float32 if needed
LOW…vm/relax/frontend/torch/exported_program_translator.py104 # Check if input is integer type and convert to float32 if needed
LOW…vm/relax/frontend/torch/exported_program_translator.py114 # Check if input is integer type and convert to float32 if needed
LOWpython/tvm/relax/backend/cuda/cutlass.py137 # Check if any dimensions are symbolic.
LOWpython/tvm/relax/backend/cuda/cudnn.py55 # Check if the data types of input and weights are supported by cuDNN BYOC
LOWpython/tvm/relax/script/parser/parser.py123 # Check if it calls into a func
LOWpython/tvm/relax/script/parser/parser.py147 # Check if it is a recursive function
LOWpython/tvm/tirx/stmt_functor.py737 # Check if anything changed
LOWpython/tvm/tirx/buffer.py351 # Check if all positional args are integers/PrimExprs with dtype int32 or int64 (the shape) # noqa: E501
LOWpython/tvm/tirx/script/builder/external_kernel.py155 # Check if NVSHMEM is used - requires cubin output for device library linking
LOWpython/tvm/tirx/lang/tile_scheduler.py378 # Check if we're in the full block region
LOW…thon/tvm/tirx/operator/tile_primitive/trn/dim_utils.py225 # Check if there is a direct mapping
LOWtests/lint/check_asf_header.py308 # Check if file should be skipped
LOWtests/lint/check_asf_header.py312 # Check if this file type is supported
LOWtests/python/contrib/test_example_npu.py98# Check if the example NPU runtime is available
LOWtests/python/codegen/test_target_codegen_aarch64.py615 # Check if the vscale_range() attribute exists
LOWtests/python/tvmscript/test_tvmscript_ir_builder_tir.py471 # Check if the generated ir is expected
LOWtests/python/tvmscript/test_tvmscript_ir_builder_tir.py50 # Check if the generated ir is expected
LOWtests/python/tvmscript/test_tvmscript_ir_builder_tir.py97 # Check if the generated ir is expected
LOWtests/python/tvmscript/test_tvmscript_ir_builder_tir.py126 # Check if the generated ir is expected
LOWtests/python/tvmscript/test_tvmscript_ir_builder_tir.py176 # Check if the generated ir is expected
LOWtests/python/tvmscript/test_tvmscript_ir_builder_tir.py220 # Check if the generated ir is expected
LOWtests/python/tvmscript/test_tvmscript_ir_builder_tir.py276 # Check if the generated ir is expected
LOWtests/python/tvmscript/test_tvmscript_ir_builder_tir.py296 # Check if the generated ir is expected
LOWtests/python/tvmscript/test_tvmscript_ir_builder_tir.py319 # Check if the generated ir is expected
LOWtests/python/tvmscript/test_tvmscript_ir_builder_tir.py333 # Check if the generated ir is expected
LOWtests/python/tvmscript/test_tvmscript_ir_builder_tir.py354 # Check if the generated ir is expected
LOWtests/python/tvmscript/test_tvmscript_ir_builder_tir.py388 # Check if the generated ir is expected
LOWtests/python/tvmscript/test_tvmscript_ir_builder_tir.py410 # Check if the generated ir is expected
LOWtests/python/tvmscript/test_tvmscript_ir_builder_tir.py426 # Check if the generated ir is expected
LOWtests/python/tvmscript/test_tvmscript_ir_builder_tir.py444 # Check if the generated ir is expected
LOWtests/python/tvmscript/test_tvmscript_ir_builder_tir.py505 # Check if the generated ir is expected
LOWtests/python/relax/test_tvmscript_pyfunc.py145 # Check if functions attribute exists
LOWtests/python/relax/test_tvmscript_pyfunc.py157 # Check if script method exists
LOWtests/python/relax/test_tvmscript_pyfunc.py169 # Check if inheritance flag exists (this might not be set in all implementations)
LOWtests/python/relax/test_tvmscript_pyfunc.py176 # Check if original class is preserved (this might not be set in all implementations)
LOWtests/python/relax/test_base_py_module.py73 # Check if target contains "cuda" instead of exact match
LOWtests/scripts/ci.py552 # Check if it should be a flag
LOWdocs/how_to/tutorials/customize_opt.py125 # Check if CUBLAS is enabled
Cross-Language Confusion11 hits · 52 pts
SeverityFileLineSnippet
HIGHpython/tvm/contrib/cutlass/gemm_profiler.py170 for (int i = 1; i < argc && i < 4; ++i) {
HIGHpython/tvm/relax/frontend/tflite/tflite_flexbuffer.py87 # Keys are strings here. The format is all strings separated by null, followed by back
HIGHpython/tvm/tirx/operator/intrinsics/cuda/header.py643 GmmaDescriptor(GmmaDescriptor && t) noexcept : desc_(t.desc_) {}
HIGHpython/tvm/tirx/operator/intrinsics/cuda/header.py652 GmmaDescriptor& operator=(GmmaDescriptor && t) noexcept {
HIGH…ython/s_tir/meta_schedule/test_meta_schedule_runner.py624 global repeated_args_before # pylint: disable=global-variable-undefined, invalid-name
HIGH…ython/s_tir/meta_schedule/test_meta_schedule_runner.py638 global repeated_args_before # pylint: disable=global-variable-undefined, invalid-name
HIGH…ython/s_tir/meta_schedule/test_meta_schedule_runner.py732 global repeated_args_before # pylint: disable=global-variable-undefined, invalid-name
HIGH…ython/s_tir/meta_schedule/test_meta_schedule_runner.py751 global repeated_args_before # pylint: disable=global-variable-undefined, invalid-name
HIGH…ython/s_tir/meta_schedule/test_meta_schedule_runner.py844 global repeated_args_before # pylint: disable=global-variable-undefined, invalid-name
HIGH…ython/s_tir/meta_schedule/test_meta_schedule_runner.py857 global repeated_args_before # pylint: disable=global-variable-undefined, invalid-name
HIGH…s/python/tirx-transform/test_tir_transform_simplify.py361 simplification that ``!(x || y) == !x && !y``.
AI Slop Vocabulary24 hits · 48 pts
SeverityFileLineSnippet
MEDIUMversion.py110 # Remove the v prefix, mainly to be robust
LOWpython/tvm/topi/nn/qnn.py67 # When disabled, just pass through the input values.
LOWpython/tvm/topi/nn/qnn.py157 # When disabled simply return the input tensor.
LOWpython/tvm/script/parser/core/diagnostics.py87 # Since `findsource` is an internal API of inspect, we just use it
LOWpython/tvm/testing/utils.py1369 # this use case can just return the decorated function.
LOWpython/tvm/relax/relax_to_pyfunc_converter.py642 # Simple fallback: just add the tensors
LOWpython/tvm/relax/frontend/onnx/onnx_frontend.py1942 # from other frameworks and not actually used in TVM. We'll just use
LOW…n/tvm/relax/frontend/torch/base_fx_graph_translator.py2291 # by the translator, and therefore we just return a copy of the input.
LOW…vm/relax/frontend/torch/exported_program_translator.py1785 "bernoulli.p": lambda node: self.env[node.args[0]], # Dropout: just return input
LOWpython/tvm/relax/training/loss.py364 # In other cases where ignore_index is not needed, just use the simpe product.
LOWpython/tvm/tirx/op.py2895 # mode 2, simply use it with multiple Exprs:
LOWtests/python/tirx-transform/test_tir_functor.py164 # For demonstration, just return the original for now
MEDIUMtests/python/relax/test_relax_to_pyfunc_converter.py354 """Test that operator mapping is comprehensive."""
MEDIUMtests/python/relax/test_base_py_module_printer.py359 """Test comprehensive error handling and validation."""
MEDIUMtests/python/relax/test_base_py_module_printer.py363 """Robust data processing with comprehensive error handling."""
MEDIUMdocs/how_to/tutorials/e2e_opt_model.py97# leverage MetaSchedule to tune the model and store the tuning logs to the database. We also
MEDIUMdocs/how_to/tutorials/export_and_load_executable.py327# for a comprehensive guide on:
MEDIUMdocs/how_to/tutorials/optimize_llm.py169# - QKV projection: We leverage the horizontal fusion on QKV projection and fuse them into one
MEDIUMdocs/how_to/tutorials/optimize_llm.py171# - Attention: We leverage the horizontal fusion on attention and fuse the QKV projection and
MEDIUMdocs/deep_dive/tensor_ir/tutorials/tir_creation.py262# The aforementioned lambda expression encapsulates the computation:
MEDIUM…cs/deep_dive/tensor_ir/tutorials/tir_transformation.py175# Alternatively, we can output the IRModule in conjunction with the historical trace.
MEDIUMdocs/get_started/tutorials/quick_start.py113# Apache TVM leverage ``pipeline`` to transform and optimize program.
MEDIUMdocs/get_started/tutorials/quick_start.py125# In this tutorial we only demonstrate the overall flow, by leverage ``zero`` optimization
LOWapps/ios_rpc/tests/ios_rpc_test.py59 # If we don't want to do metal and only use cpu, just set target to be target
Docstring Block Structure4 hits · 20 pts
SeverityFileLineSnippet
HIGHpython/tvm/topi/nn/pad.py28 Calculates the output shape of a tensor after applying padding. Args: data (tvm.te.Tensor): The input
HIGHpython/tvm/tirx/operator/intrinsics/cuda/utils.py40Validate that cta_group is 1 or 2 and return it as int. Args: cta_group: The cta_group value (can be int or
HIGHpython/tvm/tirx/operator/intrinsics/cuda/utils.py62Validate that value is within range and is a power of two. Args: value: The value to validate min_v
HIGH…irx/operator/tile_primitive/cuda/gemm_async/tcgen05.py296Schedule an asynchronous GEMM operation using tcgen05.mma (Blackwell Tensor Core). Computes C = A @ B (with optiona
Slop Phrases3 hits · 8 pts
SeverityFileLineSnippet
MEDIUMpython/tvm/relax/frontend/tflite/tflite_frontend.py7611 # Alternatively you can use tensorflow.keras.application wrapped arounf a tf.function
MEDIUMinclude/tvm/s_tir/transform.h201 * which is the three blocks as discussed above.
MEDIUMdocs/how_to/tutorials/export_and_load_executable.py319# you can use TVM's RPC mechanism to cross-compile, upload, and run the model
Overly Generic Function Names3 hits · 3 pts
SeverityFileLineSnippet
LOW…thon/tvm/contrib/hexagon/profiling/process_lwp_data.py178def process_data(data, func_info, so_ld_addr):
LOWtests/python/relax/test_tvmscript_printer_relax.py38def test_function():
LOWtests/python/relax/test_expr_functor.py540def test_function():
Dead Code1 hit · 2 pts
SeverityFileLineSnippet
MEDIUMtests/python/relax/test_tvmscript_parser.py748
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippet
LOW.claude/scripts/monitor_gpu.sh7# Usage: