Repository Analysis

taichi-dev/taichi

Productive, portable, and performant GPU programming in Python.

6.5 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of taichi-dev/taichi, a C++ project with 28,296 GitHub stars. SynthScan v2.0 examined 304,444 lines of code across 1374 source files, recording 1742 pattern matches distributed across 19 syntactic categories. The overall adjusted score of 6.5 places this repository in the Low AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

6.5
Adjusted Score
6.5
Raw Score
100%
Time Factor
2026-07-06
Last Push
28.3K
Stars
C++
Language
304.4K
Lines of Code
1.4K
Files
1.7K
Pattern Hits
2026-07-14
Scan Date
0.01
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 10MEDIUM 114LOW 1618

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 1742 distinct pattern matches across 19 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers680 hits · 664 pts
SeverityFileLineSnippetContext
LOWsetup.py176def cmake_install_manifest_filter(manifest_files):CODE
LOWmisc/ci_setup.py85def get_default_directory_name():CODE
LOWmisc/fetch_active_contributors.py4def print_active_contributors():CODE
LOWmisc/generate_c_api.py229def resolve_inline_symbols_to_names(module: Module, line: str):CODE
LOWmisc/generate_c_api.py250def get_human_readable_field_name(x: EntryBase, field_name: str):CODE
LOWpython/taichi/_main.py136 def support_choice_with_dot_py(choice):CODE
LOWpython/taichi/_main.py612 def _display_benchmark_regression(xd, yd, args):CODE
LOWpython/taichi/_main.py709 def _get_benchmark_baseline_dir():CODE
LOWpython/taichi/_main.py713 def _get_benchmark_output_dir():CODE
LOWpython/taichi/_version_check.py93def start_version_check_thread():CODE
LOWpython/taichi/_kernels.py56def ndarray_matrix_to_ext_arr(CODE
LOWpython/taichi/_kernels.py162def ext_arr_to_ndarray_matrix(CODE
LOWpython/taichi/_kernels.py229def arr_vulkan_layout_to_arr_normal_layout(vk_arr: ndarray_type.ndarray(), normal_arr: ndarray_type.ndarray()):CODE
LOWpython/taichi/_kernels.py240def arr_vulkan_layout_to_field_normal_layout(vk_arr: ndarray_type.ndarray(), normal_field: template()):CODE
LOWpython/taichi/ui/window.py177 def get_depth_buffer_as_numpy(self):CODE
LOWpython/taichi/ui/window.py189 def get_image_buffer_as_numpy(self):CODE
LOWpython/taichi/ui/scene.py52def gen_normals_kernel_indexed(vertices: template(), indices: template(), normals: template(), weights: template()):CODE
LOWpython/taichi/_snode/fields_builder.py152 def _allocate_adjoint_checkbit(self):CODE
LOWpython/taichi/types/ndarray_type.py17def _make_matrix_dtype_from_element_shape(element_dim, element_shape, primitive_dtype):CODE
LOWpython/taichi/_ti_module/cppgen.py136def generate_kernel_args_builder(kernel: sr.Kernel) -> List[str]:CODE
LOWpython/taichi/_ti_module/cppgen.py168def generate_graph_args_builder(graph: sr.Graph) -> List[str]:CODE
LOWpython/taichi/_ti_module/cppgen.py200def generate_module_content_repr(m: GfxRuntime140, module_name: str, cgraph_kernel_names: Set[str]) -> List[str]:CODE
LOWpython/taichi/_lib/utils.py188def try_get_loaded_libc_version():CODE
LOWpython/taichi/lang/field.py259 def _initialize_host_accessors(self):CODE
LOWpython/taichi/lang/matrix.py40def _generate_swizzle_patterns(key_group: str, required_length=4):CODE
LOWpython/taichi/lang/matrix.py64 def make_valid_attribs_checker(key_group):CODE
LOWpython/taichi/lang/matrix.py1176 def _get_dynamic_index_stride(self):CODE
LOWpython/taichi/lang/matrix.py1181 def _calc_dynamic_index_stride(self):CODE
LOWpython/taichi/lang/matrix.py1515 def _instantiate_in_python_scope(self, entries):CODE
LOWpython/taichi/lang/matrix.py1623 def _instantiate_in_python_scope(self, entries):CODE
LOWpython/taichi/lang/exception.py58def handle_exception_from_cpp(exc):CODE
LOWpython/taichi/lang/kernel_impl.py867 def set_arg_sparse_matrix_builder(indices, v):CODE
LOWpython/taichi/lang/snode.py161 def _allocate_adjoint_checkbit(self):CODE
LOWpython/taichi/lang/snode.py271 def _num_dynamically_allocated(self):CODE
LOWpython/taichi/lang/snode.py282 def _offset_bytes_in_parent_cell(self):CODE
LOWpython/taichi/lang/mesh.py216 def _initialize_host_accessors(self):CODE
LOWpython/taichi/lang/mesh.py333 def set_patch_max_element_num(self, element_type: MeshElementType, max_element_num: int):CODE
LOWpython/taichi/lang/_ndarray.py132 def _ndarray_matrix_from_numpy(self, arr, as_vector):CODE
LOWpython/taichi/lang/_ndarray.py222 def _initialize_host_accessor(self):CODE
LOWpython/taichi/lang/_wrap_inspect.py27def _find_source_with_custom_getfile_func(func, obj):CODE
LOWpython/taichi/lang/source_builder.py116 def bitcode_func_call_wrapper(*args):CODE
LOWpython/taichi/lang/source_builder.py130 def external_func_call_wrapper(args=[], outputs=[]):CODE
LOWpython/taichi/lang/impl.py121def begin_frontend_struct_for(ast_builder, group, loop_range):CODE
LOWpython/taichi/lang/impl.py343 def initialize_fields_builder(self, builder):CODE
LOWpython/taichi/lang/impl.py362 def get_num_compiled_functions(self):CODE
LOWpython/taichi/lang/impl.py411 def _finalize_root_fb_for_aot():CODE
LOWpython/taichi/lang/impl.py435 def _check_gradient_field_not_placed(self, gradient_type):CODE
LOWpython/taichi/lang/impl.py457 def _check_matrix_field_member_shape(self):CODE
LOWpython/taichi/lang/impl.py466 def _calc_matrix_field_dynamic_index_stride(self):CODE
LOWpython/taichi/lang/impl.py486 def _register_signal_handlers(self):CODE
LOWpython/taichi/lang/impl.py863def ti_format_list_to_content_entries(raw):CODE
LOWpython/taichi/lang/impl.py1181def get_cuda_compute_capability():CODE
LOWpython/taichi/lang/struct.py491 def _initialize_host_accessors(self):CODE
LOWpython/taichi/lang/ast/ast_transformer.py56def boundary_type_cast_warning(expression):CODE
LOWpython/taichi/lang/ast/ast_transformer.py504 def canonicalize_formatted_string(raw_string, *raw_args, **raw_keywords):CODE
LOWpython/taichi/lang/ast/ast_transformer.py945 def build_attribute_if_is_dynamic_snode_method(ctx, node):CODE
LOWpython/taichi/lang/ast/ast_transformer.py1356 def build_grouped_ndrange_for(ctx, node):CODE
LOWpython/taichi/lang/ast/ast_transformer.py1633 def ti_format_list_to_assert_msg(raw):CODE
LOWpython/taichi/lang/ast/ast_transformer_utils.py205 def non_static_control_flow_guard(self):CODE
LOWpython/taichi/lang/ast/ast_transformer_utils.py230 def is_in_non_static_control_flow(self):CODE
620 more matches not shown…
Over-Commented Block445 hits · 399 pts
SeverityFileLineSnippetContext
LOWmisc/baselines/containers.cpp41 return 0;COMMENT
LOWpython/taichi/tools/np2ply.py101 y (`numpy.array(float)`): y-coordinates of the vertices.COMMENT
LOWpython/taichi/tools/np2ply.py141 # TODO active and refactor later if user feedback indicates the necessity for a compact the input listCOMMENT
LOWpython/taichi/tools/np2ply.py201 self.add_vertex_channel("green", "float", g)COMMENT
LOWpython/taichi/lang/kernel_impl.py1041 _logging.warn("""opt_level = 1 is enforced to enable gradient computation.""")COMMENT
LOWpython/taichi/lang/_wrap_inspect.py1# Taichi's custom inspect module.COMMENT
LOWpython/taichi/lang/impl.py561COMMENT
LOWpython/taichi/lang/ast/checkers.py81 super().generic_visit(node)COMMENT
LOWpython/taichi/lang/ast/checkers.py101 # super().generic_visit(node)COMMENT
LOWpython/taichi/lang/ast/ast_transformer.py981 #COMMENT
LOW…hi/examples/machine_learning/differential_evolution.py281# f.append(imageio.imread("./3dimg/" + i))COMMENT
LOWpython/taichi/examples/features/io/export_mesh.py1import numpy as npCOMMENT
LOWci/scripts/release_test.sh1#!/usr/bin/env bashCOMMENT
LOWci/scripts/release_test.sh161 python "${match}" &COMMENT
LOWtests/python/test_quant_array_vectorization.py101 assign_vectorized(1, -1)COMMENT
LOWtests/python/test_quant_array_vectorization.py121# | Before | always (0, 1) | often (0, 1), sometimes (1, 0) | OK |COMMENT
LOWtests/python/test_quant_array_vectorization.py141# block.dense(ti.ij, (N // n_blocks, N // (bits * n_blocks))).quant_array(ti.j, bits, max_num_bits=bits).place(z)COMMENT
LOWtests/python/test_quant_array_vectorization.py161# num_active_neighbors += ti.cast(x[i + 1, j - 1], ti.u32)COMMENT
LOWtests/python/test_quant_array_vectorization.py181# y[i, j] = (num_active_neighbors == 3) or (num_active_neighbors == 2 and x[i, j] == 1)COMMENT
LOWtests/cpp/backends/amdgpu_device_test.cpp1#include "gtest/gtest.h"COMMENT
LOWtests/cpp/llvm/llvm_offline_cache_test.cpp1#include "gtest/gtest.h"COMMENT
LOWtests/cpp/codegen/refine_coordinates_test.cpp1#ifdef TI_WITH_LLVMCOMMENT
LOWtests/cpp/transforms/make_block_local_test.cpp21 void initialize(int pointer_size, int block_size) {COMMENT
LOWtests/cpp/transforms/extract_constant_test.cpp41 // <i32> $5 = const [1]COMMENT
LOWtests/cpp/program/graph_test.cpp1#include "gtest/gtest.h"COMMENT
LOWtests/cpp/aot/dx12/aot_save_load_test.cpp1#include "gtest/gtest.h"COMMENT
LOWtests/cpp/aot/llvm/mpm88_graph_aot_test.cpp1#include "gtest/gtest.h"COMMENT
LOWtests/cpp/aot/llvm/field_cgraph_test.cpp1#include "gtest/gtest.h"COMMENT
LOWtests/cpp/aot/llvm/dynamic_aot_test.cpp1#include "gtest/gtest.h"COMMENT
LOWtests/cpp/aot/llvm/graph_aot_test.cpp1#include "gtest/gtest.h"COMMENT
LOWtests/cpp/aot/llvm/kernel_aot_test.cpp1#include "gtest/gtest.h"COMMENT
LOWtests/cpp/aot/llvm/kernel_return_aot_test.cpp1#include "gtest/gtest.h"COMMENT
LOWtests/cpp/aot/llvm/bitmasked_aot_test.cpp1#include "gtest/gtest.h"COMMENT
LOWtests/cpp/aot/llvm/field_aot_test.cpp1#include "gtest/gtest.h"COMMENT
LOWdocs/lang/articles/visualization/export_results.md301# |COMMENT
LOWdocs/lang/articles/visualization/ggui.md281COMMENT
LOWdocs/lang/articles/visualization/ggui.md301# The TranslationMatrix is:COMMENT
LOWdocs/lang/articles/math/sparse_matrix.md61C = A + ACOMMENT
LOWdocs/lang/articles/math/sparse_matrix.md81E = A * 3.0COMMENT
LOWdocs/lang/articles/math/sparse_matrix.md101F = A.transpose()COMMENT
LOWdocs/lang/articles/math/sparse_matrix.md121H = E * ACOMMENT
LOWdocs/lang/articles/get-started/cloth_simulation.md221def substep():COMMENT
LOW.github/workflows/release.yml121 env:COMMENT
LOW.github/workflows/release.yml141 # submodules: 'recursive'COMMENT
LOW.github/workflows/pull_request.yml21 python misc/ci_check_pr_title.py "$PR_TITLE"COMMENT
LOW.github/workflows/testing.yml121 # include:COMMENT
LOW.github/workflows/testing.yml141 # unset-git-caching-proxyCOMMENT
LOW.github/workflows/testing.yml161 # env:COMMENT
LOW.github/workflows/testing.yml601 # needs: check_filesCOMMENT
LOW.github/workflows/testing.yml621 # if: ${{ needs.check_files.outputs.run_job != 'false' }}COMMENT
LOW.github/workflows/testing.yml641 # -v $TAICHI_WHEEL_DIR:/home/dev/taichi/dist \COMMENT
LOW.github/workflows/testing.yml661 # -DTI_WITH_VULKAN:BOOL=ONCOMMENT
LOW.github/workflows/testing.yml681 # runs-on: [self-hosted, Linux, cn]COMMENT
LOW.github/workflows/testing.yml701 # run: >-COMMENT
LOW.github/workflows/testing.yml721 # registry.botmaster.tgr/taichi-build-cuda:${{ env.CI_IMAGE_VERSION }} \COMMENT
LOW.github/workflows/testing.yml741 # -DTI_WITH_LLVM:BOOL=OFFCOMMENT
LOW.github/workflows/testing.yml761 # permissions:COMMENT
LOW.github/workflows/testing.yml781 # prepare-build-cache;COMMENT
LOW.github/workflows/testing.yml801 # env:COMMENT
LOW.github/workflows/testing.yml821COMMENT
385 more matches not shown…
Decorative Section Separators66 hits · 255 pts
SeverityFileLineSnippetContext
MEDIUMpython/taichi/_logging.py79# ------------------------COMMENT
MEDIUMpython/taichi/_logging.py84# ------------------------COMMENT
MEDIUMpython/taichi/_logging.py89# ------------------------COMMENT
MEDIUMpython/taichi/_logging.py94# ------------------------COMMENT
MEDIUMpython/taichi/_logging.py99# ------------------------COMMENT
MEDIUMpython/taichi/_logging.py104# ------------------------COMMENT
MEDIUMpython/taichi/_logging.py109# ------------------------COMMENT
MEDIUMpython/taichi/ui/ui.py12# ----------------------COMMENT
MEDIUMpython/taichi/types/primitive_types.py3# ========================================COMMENT
MEDIUMpython/taichi/types/primitive_types.py6# ----------------------------------------COMMENT
MEDIUMpython/taichi/types/primitive_types.py12# ----------------------------------------COMMENT
MEDIUMpython/taichi/types/primitive_types.py18# ----------------------------------------COMMENT
MEDIUMpython/taichi/types/primitive_types.py24# ----------------------------------------COMMENT
MEDIUMpython/taichi/types/primitive_types.py30# ----------------------------------------COMMENT
MEDIUMpython/taichi/types/primitive_types.py36# ----------------------------------------COMMENT
MEDIUMpython/taichi/types/primitive_types.py41# ----------------------------------------COMMENT
MEDIUMpython/taichi/types/primitive_types.py43# ========================================COMMENT
MEDIUMpython/taichi/types/primitive_types.py46# ----------------------------------------COMMENT
MEDIUMpython/taichi/types/primitive_types.py52# ----------------------------------------COMMENT
MEDIUMpython/taichi/types/primitive_types.py58# ----------------------------------------COMMENT
MEDIUMpython/taichi/types/primitive_types.py64# ----------------------------------------COMMENT
MEDIUMpython/taichi/types/primitive_types.py70# ----------------------------------------COMMENT
MEDIUMpython/taichi/types/primitive_types.py76# ----------------------------------------COMMENT
MEDIUMpython/taichi/types/primitive_types.py82# ----------------------------------------COMMENT
MEDIUMpython/taichi/types/primitive_types.py88# ----------------------------------------COMMENT
MEDIUMpython/taichi/types/primitive_types.py94# ----------------------------------------COMMENT
MEDIUMpython/taichi/types/primitive_types.py100# ----------------------------------------COMMENT
MEDIUMpython/taichi/types/primitive_types.py106# ----------------------------------------COMMENT
MEDIUMpython/taichi/types/primitive_types.py112# ----------------------------------------COMMENT
MEDIUMpython/taichi/types/primitive_types.py118# ----------------------------------------COMMENT
MEDIUMpython/taichi/types/primitive_types.py124# ----------------------------------------COMMENT
MEDIUMpython/taichi/types/primitive_types.py130# ----------------------------------------COMMENT
MEDIUMpython/taichi/types/primitive_types.py136# ----------------------------------------COMMENT
MEDIUMpython/taichi/types/primitive_types.py142# ----------------------------------------COMMENT
MEDIUMpython/taichi/types/primitive_types.py148# ----------------------------------------COMMENT
MEDIUMpython/taichi/types/primitive_types.py154# ----------------------------------------COMMENT
MEDIUMpython/taichi/lang/misc.py20# ----------------------COMMENT
MEDIUMpython/taichi/lang/misc.py25# ----------------------COMMENT
MEDIUMpython/taichi/lang/misc.py30# ----------------------COMMENT
MEDIUMpython/taichi/lang/misc.py36# ----------------------COMMENT
MEDIUMpython/taichi/lang/misc.py42# ----------------------COMMENT
MEDIUMpython/taichi/lang/misc.py47# ----------------------COMMENT
MEDIUMpython/taichi/lang/misc.py52# ----------------------COMMENT
MEDIUMpython/taichi/lang/misc.py57# ----------------------COMMENT
MEDIUMpython/taichi/lang/misc.py62# ----------------------COMMENT
MEDIUMpython/taichi/lang/misc.py67# ----------------------COMMENT
MEDIUMpython/taichi/lang/misc.py72# ----------------------COMMENT
MEDIUMpython/taichi/lang/misc.py77# ----------------------COMMENT
MEDIUMpython/taichi/lang/misc.py82# ----------------------COMMENT
MEDIUMpython/taichi/lang/misc.py87# ----------------------COMMENT
MEDIUMpython/taichi/lang/misc.py92# ----------------------COMMENT
MEDIUMpython/taichi/lang/misc.py97# ----------------------COMMENT
MEDIUMpython/taichi/lang/misc.py99# ----------------------COMMENT
MEDIUMpython/taichi/lang/misc.py104# ----------------------COMMENT
MEDIUMpython/taichi/lang/misc.py109# ----------------------COMMENT
MEDIUMpython/taichi/lang/misc.py114# ----------------------COMMENT
MEDIUMpython/taichi/lang/misc.py119# ----------------------COMMENT
MEDIUMpython/taichi/lang/misc.py124# ----------------------COMMENT
MEDIUMpython/taichi/lang/misc.py129# ----------------------COMMENT
MEDIUMpython/taichi/lang/misc.py134# ----------------------COMMENT
6 more matches not shown…
Deep Nesting212 hits · 199 pts
SeverityFileLineSnippetContext
LOWmisc/taichi_json.py102CODE
LOWmisc/taichi_json.py261CODE
LOWmisc/taichi_json.py337CODE
LOWmisc/copyright.py233CODE
LOWmisc/make_changelog.py30CODE
LOWmisc/generate_unity_language_binding.py105CODE
LOWmisc/benchmark_parallel_compilation.py27CODE
LOWmisc/ci_setup.py143CODE
LOWmisc/generate_c_api.py65CODE
LOWmisc/generate_c_api.py150CODE
LOWmisc/generate_c_api.py250CODE
LOWpython/taichi/_main.py612CODE
LOWpython/taichi/_version_check.py12CODE
LOWpython/taichi/_kernels.py56CODE
LOWpython/taichi/_kernels.py162CODE
LOWpython/taichi/_kernels.py184CODE
LOWpython/taichi/_kernels.py204CODE
LOWpython/taichi/_kernels.py299CODE
LOWpython/taichi/_funcs.py343CODE
LOWpython/taichi/_funcs.py630CODE
LOWpython/taichi/ui/staging_buffer.py169CODE
LOWpython/taichi/ui/staging_buffer.py226CODE
LOWpython/taichi/ui/staging_buffer.py272CODE
LOWpython/taichi/ui/gui.py396CODE
LOWpython/taichi/tools/image.py93CODE
LOWpython/taichi/_ti_module/module.py71CODE
LOWpython/taichi/_ti_module/cppgen.py136CODE
LOWpython/taichi/_ti_module/cppgen.py168CODE
LOWpython/taichi/linalg/sparse_cg.py22CODE
LOWpython/taichi/linalg/matrixfree_cg.py19CODE
LOWpython/taichi/linalg/matrixfree_cg.py140CODE
LOWpython/taichi/linalg/matrixfree_cg.py97CODE
LOWpython/taichi/linalg/matrixfree_cg.py255CODE
LOWpython/taichi/graph/_graph.py93CODE
LOWpython/taichi/graph/_graph.py72CODE
LOWpython/taichi/_lib/utils.py213CODE
LOWpython/taichi/lang/matrix.py250CODE
LOWpython/taichi/lang/matrix.py382CODE
LOWpython/taichi/lang/matrix.py816CODE
LOWpython/taichi/lang/matrix.py1389CODE
LOWpython/taichi/lang/matrix.py1569CODE
LOWpython/taichi/lang/common_ops.py267CODE
LOWpython/taichi/lang/misc.py323CODE
LOWpython/taichi/lang/kernel_impl.py163CODE
LOWpython/taichi/lang/kernel_impl.py253CODE
LOWpython/taichi/lang/kernel_impl.py318CODE
LOWpython/taichi/lang/kernel_impl.py384CODE
LOWpython/taichi/lang/kernel_impl.py571CODE
LOWpython/taichi/lang/kernel_impl.py685CODE
LOWpython/taichi/lang/kernel_impl.py710CODE
LOWpython/taichi/lang/argpack.py197CODE
LOWpython/taichi/lang/argpack.py287CODE
LOWpython/taichi/lang/argpack.py365CODE
LOWpython/taichi/lang/snode.py114CODE
LOWpython/taichi/lang/mesh.py109CODE
LOWpython/taichi/lang/mesh.py179CODE
LOWpython/taichi/lang/mesh.py275CODE
LOWpython/taichi/lang/mesh.py180CODE
LOWpython/taichi/lang/matrix_ops_utils.py71CODE
LOWpython/taichi/lang/matrix_ops_utils.py117CODE
152 more matches not shown…
Unused Imports157 hits · 154 pts
SeverityFileLineSnippetContext
LOWmisc/copyright.py16CODE
LOWmisc/generate_ir_design_doc.py4CODE
LOWmisc/ci_setup.py163CODE
LOWmisc/count_tags.py1CODE
LOWmisc/count_tags.py2CODE
LOWpython/taichi/__init__.py1CODE
LOWpython/taichi/__init__.py4CODE
LOWpython/taichi/__init__.py5CODE
LOWpython/taichi/__init__.py6CODE
LOWpython/taichi/__init__.py7CODE
LOWpython/taichi/__init__.py10CODE
LOWpython/taichi/__init__.py13CODE
LOWpython/taichi/__init__.py13CODE
LOWpython/taichi/__init__.py13CODE
LOWpython/taichi/__init__.py13CODE
LOWpython/taichi/__init__.py13CODE
LOWpython/taichi/__init__.py13CODE
LOWpython/taichi/__init__.py13CODE
LOWpython/taichi/__init__.py13CODE
LOWpython/taichi/__init__.py13CODE
LOWpython/taichi/__init__.py14CODE
LOWpython/taichi/__init__.py14CODE
LOWpython/taichi/__init__.py14CODE
LOWpython/taichi/__init__.py14CODE
LOWpython/taichi/__init__.py17CODE
LOWpython/taichi/ui/ui.py4CODE
LOWpython/taichi/ui/ui.py5CODE
LOWpython/taichi/ui/ui.py6CODE
LOWpython/taichi/ui/ui.py7CODE
LOWpython/taichi/ui/ui.py8CODE
LOWpython/taichi/ui/ui.py9CODE
LOWpython/taichi/ui/__init__.py8CODE
LOWpython/taichi/ui/__init__.py9CODE
LOWpython/taichi/_snode/__init__.py1CODE
LOWpython/taichi/tools/__init__.py8CODE
LOWpython/taichi/tools/__init__.py9CODE
LOWpython/taichi/tools/__init__.py10CODE
LOWpython/taichi/tools/__init__.py11CODE
LOWpython/taichi/tools/__init__.py12CODE
LOWpython/taichi/types/__init__.py11CODE
LOWpython/taichi/types/__init__.py12CODE
LOWpython/taichi/types/__init__.py13CODE
LOWpython/taichi/types/__init__.py14CODE
LOWpython/taichi/types/__init__.py15CODE
LOWpython/taichi/types/__init__.py16CODE
LOWpython/taichi/types/__init__.py17CODE
LOWpython/taichi/_ti_module/__init__.py1CODE
LOWpython/taichi/ad/__init__.py1CODE
LOWpython/taichi/linalg/__init__.py3CODE
LOWpython/taichi/linalg/__init__.py4CODE
LOWpython/taichi/linalg/__init__.py5CODE
LOWpython/taichi/linalg/__init__.py6CODE
LOWpython/taichi/graph/__init__.py1CODE
LOWpython/taichi/algorithms/__init__.py1CODE
LOWpython/taichi/_lib/__init__.py1CODE
LOWpython/taichi/math/mathimpl.py11CODE
LOWpython/taichi/math/mathimpl.py11CODE
LOWpython/taichi/math/mathimpl.py11CODE
LOWpython/taichi/math/mathimpl.py11CODE
LOWpython/taichi/math/mathimpl.py11CODE
97 more matches not shown…
Dead Code31 hits · 62 pts
SeverityFileLineSnippetContext
MEDIUMmisc/ci_setup.py263CODE
MEDIUMtests/python/test_internal_func.py24CODE
MEDIUMtests/python/test_internal_func.py27CODE
MEDIUMtests/python/test_loop_grad.py39CODE
MEDIUMtests/python/test_loop_grad.py41CODE
MEDIUMtests/python/test_loop_grad.py42CODE
MEDIUMtests/python/test_loop_grad.py44CODE
MEDIUMtests/python/test_loop_grad.py45CODE
MEDIUMtests/python/test_loop_grad.py48CODE
MEDIUMtests/python/test_loop_grad.py55CODE
MEDIUMtests/python/test_loop_grad.py57CODE
MEDIUMtests/python/test_loop_grad.py59CODE
MEDIUMtests/python/test_loop_grad.py61CODE
MEDIUMtests/python/test_loop_grad.py63CODE
MEDIUMtests/python/test_offload.py8CODE
MEDIUMtests/python/test_offload.py10CODE
MEDIUMtests/python/test_offload.py11CODE
MEDIUMtests/python/test_offload.py12CODE
MEDIUMtests/python/test_offload.py14CODE
MEDIUMtests/python/test_offload.py15CODE
MEDIUMtests/python/test_offload.py16CODE
MEDIUMtests/python/test_offload.py17CODE
MEDIUMtests/python/test_offload.py20CODE
MEDIUMtests/python/test_offload.py26CODE
MEDIUMtests/python/test_offload.py28CODE
MEDIUMtests/python/test_offload.py29CODE
MEDIUMtests/python/test_offload.py31CODE
MEDIUMtests/python/test_new_allocator.py73CODE
MEDIUMtests/python/test_new_allocator.py75CODE
MEDIUMtests/python/test_new_allocator.py78CODE
MEDIUMtests/python/test_new_allocator.py82CODE
Modern Structural Boilerplate54 hits · 53 pts
SeverityFileLineSnippetContext
LOWpython/taichi/_logging.py120__all__ = [CODE
LOWpython/taichi/experimental.py13__all__ = ["real_func"]CODE
LOWpython/taichi/_version_check.py101__all__ = []CODE
LOWpython/taichi/_funcs.py704__all__ = ["randn", "polar_decompose", "eig", "sym_eig", "svd", "solve"]CODE
LOWpython/taichi/ui/gui.py1012__all__ = [CODE
LOWpython/taichi/_snode/__init__.py3__all__ = ["FieldsBuilder"]CODE
LOWpython/taichi/tools/np2ply.py362__all__ = ["PLYWriter"]CODE
LOWpython/taichi/tools/diagnose.py122__all__ = []CODE
LOWpython/taichi/tools/vtk.py34__all__ = ["write_vtk"]CODE
LOWpython/taichi/tools/video.py259__all__ = ["VideoManager"]CODE
LOWpython/taichi/tools/image.py127__all__ = ["imread", "imresize", "imshow", "imwrite"]CODE
LOWpython/taichi/types/primitive_types.py175__all__ = [CODE
LOWpython/taichi/types/texture_type.py83__all__ = ["texture", "rw_texture"]CODE
LOWpython/taichi/types/ndarray_type.py139__all__ = ["ndarray"]CODE
LOWpython/taichi/types/compound_types.py88__all__ = ["matrix", "vector", "struct", "argpack"]CODE
LOWpython/taichi/types/utils.py11__all__ = ["is_signed", "is_integral", "is_real", "is_tensor"]CODE
LOWpython/taichi/types/quant.py81__all__ = ["int", "fixed", "float"]CODE
LOWpython/taichi/types/annotations.py44__all__ = ["template", "sparse_matrix_builder"]CODE
LOWpython/taichi/ad/_ad.py521__all__ = [CODE
LOWpython/taichi/linalg/sparse_matrix.py300__all__ = ["SparseMatrix", "SparseMatrixBuilder"]CODE
LOWpython/taichi/graph/_graph.py289__all__ = ["GraphBuilder", "Graph", "Arg", "ArgKind"]CODE
LOWpython/taichi/algorithms/_algorithms.py115__all__ = ["parallel_sort", "PrefixSumExecutor"]CODE
LOWpython/taichi/math/mathimpl.py820__all__ = [CODE
LOWpython/taichi/math/_complex.py203__all__ = ["cconj", "cdiv", "cexp", "cinv", "clog", "cmul", "cpow", "csqrt"]CODE
LOWpython/taichi/lang/field.py462__all__ = ["BitpackedFields", "Field", "ScalarField"]CODE
LOWpython/taichi/lang/matrix.py1875__all__ = ["Matrix", "Vector", "MatrixField", "MatrixNdarray", "VectorNdarray"]CODE
LOWpython/taichi/lang/misc.py766__all__ = [CODE
LOWpython/taichi/lang/_ndrange.py149__all__ = ["ndrange"]CODE
LOWpython/taichi/lang/exception.py70__all__ = [CODE
LOWpython/taichi/lang/kernel_impl.py1245__all__ = ["data_oriented", "func", "kernel", "pyfunc", "real_func"]CODE
LOWpython/taichi/lang/enums.py47__all__ = ["Layout", "AutodiffMode", "SNodeGradType", "Format", "DeviceCapability"]CODE
LOWpython/taichi/lang/runtime_ops.py11__all__ = ["sync"]CODE
LOWpython/taichi/lang/util.py378__all__ = []CODE
LOWpython/taichi/lang/argpack.py410__all__ = ["ArgPack"]CODE
LOWpython/taichi/lang/snode.py474__all__ = [CODE
LOWpython/taichi/lang/__init__.py20__all__ = [CODE
LOWpython/taichi/lang/any_array.py97__all__ = []CODE
LOWpython/taichi/lang/mesh.py685__all__ = ["Mesh", "MeshInstance"]CODE
LOWpython/taichi/lang/ops.py1451__all__ = [CODE
LOWpython/taichi/lang/_ndarray.py340__all__ = ["Ndarray", "ScalarNdarray"]CODE
LOWpython/taichi/lang/_wrap_inspect.py187__all__ = ["getsourcelines", "getsourcefile"]CODE
LOWpython/taichi/lang/source_builder.py148__all__ = []CODE
LOWpython/taichi/lang/impl.py1195__all__ = [CODE
LOWpython/taichi/lang/struct.py852__all__ = ["Struct", "StructField", "dataclass"]CODE
LOWpython/taichi/lang/expr.py170__all__ = []CODE
LOWpython/taichi/lang/simt/subgroup.py156__all__ = [CODE
LOWpython/taichi/lang/simt/__init__.py3__all__ = ["warp", "subgroup", "block", "grid"]CODE
LOWpython/taichi/lang/simt/warp.py78__all__ = [CODE
LOWpython/taichi/profiler/memory_profiler.py13__all__ = ["print_memory_profiler_info"]CODE
LOWpython/taichi/profiler/kernel_profiler.py582__all__ = [CODE
LOWpython/taichi/profiler/scoped_profiler.py34__all__ = ["print_scoped_profiler_info", "clear_scoped_profiler_info"]CODE
LOWpython/taichi/profiler/kernel_metrics.py258__all__ = ["CuptiMetric", "get_predefined_cupti_metrics"]CODE
LOWpython/taichi/sparse/_sparse_grid.py75__all__ = ["grid", "usage"]CODE
LOWtests/test_utils.py326__all__ = [CODE
Cross-Language Confusion8 hits · 42 pts
SeverityFileLineSnippetContext
HIGH…aichi/examples/real_func/algorithm/marching_squares.py134 return edges.length()CODE
HIGH…aichi/examples/real_func/algorithm/marching_squares.py157 for k in range(edges.length()):CODE
HIGHpython/taichi/examples/algorithm/marching_squares.py134 return edges.length()CODE
HIGHpython/taichi/examples/algorithm/marching_squares.py157 for k in range(edges.length()):CODE
HIGH…mples/algorithm/circle-packing/circle_packing_image.py86 return circles.length()CODE
HIGHpython/taichi/examples/rendering/oit_renderer.py98 for i in range(spheres.length()):CODE
HIGH.github/workflows/scripts/ti_build/ios.py106 # obj file path -> (defined, undefined)COMMENT
HIGH.github/workflows/scripts/ti_build/ios.py117 OBJECT_SYMBOLS[sp] = (set(defined), set(undefined))CODE
Excessive Try-Catch Wrapping31 hits · 39 pts
SeverityFileLineSnippetContext
LOWmisc/ci_setup.py166 except Exception as e:CODE
LOWpython/taichi/ui/utils.py82 except Exception:CODE
LOWpython/taichi/tools/diagnose.py27 except Exception as e:CODE
LOWpython/taichi/tools/diagnose.py43 except Exception as e:CODE
LOWpython/taichi/tools/diagnose.py55 except Exception as e:CODE
LOWpython/taichi/tools/diagnose.py76 except Exception as e:CODE
LOWpython/taichi/tools/diagnose.py83 except Exception as e:CODE
LOWpython/taichi/tools/diagnose.py90 except Exception as e:CODE
LOWpython/taichi/tools/diagnose.py97 except Exception as e:CODE
LOWpython/taichi/tools/diagnose.py104 except Exception as e:CODE
LOWpython/taichi/tools/diagnose.py111 except Exception as e:CODE
MEDIUMpython/taichi/tools/diagnose.py37def try_print(tag, expr):CODE
LOWpython/taichi/_lib/utils.py47 except Exception as e:CODE
LOWpython/taichi/_lib/utils.py184 except Exception:CODE
LOWpython/taichi/_lib/utils.py246 except Exception:CODE
MEDIUMpython/taichi/_lib/utils.py66def locale_encode(path):CODE
LOWpython/taichi/lang/misc.py738 except Exception as e:CODE
LOWpython/taichi/lang/kernel_impl.py972 except Exception as e:CODE
LOWpython/taichi/lang/ast/ast_transformer.py997 except Exception as e:CODE
LOWpython/taichi/lang/ast/ast_transformer_utils.py28 except Exception as e:CODE
LOWtests/python/test_offline_cache.py178 except Exception as e:CODE
LOWtests/cpp/conftest.py145 except Exception:CODE
LOWdocs/conftest.py301 except Exception:STRING
MEDIUMscripts/run_clang_tidy.py68 print("Error: could not find compilation database.")CODE
MEDIUMscripts/run_clang_tidy.py371 print("Error exporting fixes.\n", file=sys.stderr)CODE
MEDIUMscripts/run_clang_tidy.py380 print("Error applying fixes.\n", file=sys.stderr)CODE
LOW.github/workflows/scripts/sync-cache.py98 except Exception:CODE
MEDIUM.github/workflows/scripts/sync-cache.py93def probe(url):CODE
LOW.github/workflows/scripts/ti_build/dep.py74 except Exception:CODE
LOW.github/workflows/scripts/ti_build/dep.py81 except Exception:CODE
LOW.github/workflows/scripts/ti_build/dep.py127 except Exception:CODE
Verbosity Indicators15 hits · 25 pts
SeverityFileLineSnippetContext
LOWexternal/include/catch.hpp12661 // No children have started. We need to check if they _can_COMMENT
LOWtaichi/transforms/make_mesh_block_local.cpp409 // Step 0: simplify l2g + g2r -> l2rCOMMENT
LOWtaichi/transforms/make_mesh_block_local.cpp412 // Step 1: A analyzer to determine which mapping should be localizedCOMMENT
LOWtaichi/transforms/make_mesh_block_local.cpp416 // Step 1: use Mesh BLS analyzer to gather which mesh attributes user declaredCOMMENT
LOWtaichi/transforms/make_mesh_block_local.cpp499 // Step 3: Cache the mappings and the attributesCOMMENT
LOWtaichi/transforms/make_mesh_thread_local.cpp59 // Step 1:COMMENT
LOWtaichi/transforms/make_mesh_thread_local.cpp95 // Step 2:COMMENT
LOWtaichi/transforms/make_thread_local.cpp140 // Step 1:COMMENT
LOWtaichi/transforms/make_thread_local.cpp177 // Step 2:COMMENT
LOWtaichi/transforms/make_thread_local.cpp188 // Step 3:COMMENT
LOWtaichi/transforms/make_block_local.cpp218 // Step 1:COMMENT
LOWtaichi/transforms/make_block_local.cpp246 // Step 2:COMMENT
LOWtaichi/transforms/make_block_local.cpp343 // Step 3:COMMENT
LOWtaichi/program/sparse_matrix.cpp396 // Step 1: Sort coo firstCOMMENT
LOWtaichi/program/sparse_matrix.cpp426 // Step 2: coo to csrCOMMENT
Self-Referential Comments9 hits · 22 pts
SeverityFileLineSnippetContext
MEDIUMmisc/test_memory_pool.py1# This file is not part of standard tests since it uses too much GPU memoryCOMMENT
MEDIUMpython/taichi/linalg/sparse_solver.py50 """This method is equivalent to calling both `analyze_pattern` and then `factorize`.STRING
MEDIUMpython/taichi/lang/matrix.py103 # Create a function for value capturingCOMMENT
MEDIUMpython/taichi/lang/mesh.py301# Define the instance of the Mesh Type, stores the field (type and data) infoCOMMENT
MEDIUMpython/taichi/lang/mesh.py440# Define the Mesh Type, stores the field type infoCOMMENT
MEDIUMpython/taichi/lang/_wrap_inspect.py2# This module is used by Taichi's ast transformer to parse the source code.COMMENT
MEDIUMpython/taichi/lang/ast/ast_transformer.py810 # Create a copy for non-template arguments,COMMENT
MEDIUMpython/taichi/examples/simulation/odop_solar.py19 def random_vector(radius): # Create a random vector in circleCODE
MEDIUMpython/taichi/profiler/kernel_profiler.py136 """This function is not exposed to user now.STRING
Structural Annotation Overuse6 hits · 11 pts
SeverityFileLineSnippetContext
LOWtaichi/transforms/make_mesh_block_local.cpp409 // Step 0: simplify l2g + g2r -> l2rCOMMENT
LOWtaichi/transforms/make_mesh_block_local.cpp412 // Step 1: A analyzer to determine which mapping should be localizedCOMMENT
LOWtaichi/transforms/make_mesh_block_local.cpp416 // Step 1: use Mesh BLS analyzer to gather which mesh attributes user declaredCOMMENT
LOWtaichi/transforms/make_mesh_block_local.cpp499 // Step 3: Cache the mappings and the attributesCOMMENT
LOWtaichi/program/sparse_matrix.cpp396 // Step 1: Sort coo firstCOMMENT
LOWtaichi/program/sparse_matrix.cpp426 // Step 2: coo to csrCOMMENT
AI Structural Patterns11 hits · 11 pts
SeverityFileLineSnippetContext
LOWpython/taichi/ui/scene.py190CODE
LOWpython/taichi/ui/scene.py270CODE
LOWpython/taichi/ui/scene.py553CODE
LOWpython/taichi/ui/scene.py633CODE
LOWpython/taichi/lang/matrix.py55CODE
LOWpython/taichi/lang/matrix.py816CODE
LOWpython/taichi/lang/argpack.py118CODE
LOWpython/taichi/lang/snode.py232CODE
LOWpython/taichi/lang/_texture.py85CODE
LOWpython/taichi/lang/ast/ast_transformer_utils.py146CODE
LOWpython/taichi/sparse/_sparse_grid.py72CODE
AI Slop Vocabulary5 hits · 10 pts
SeverityFileLineSnippetContext
LOWpython/taichi/_funcs.py68 # if A is a zero matrix we simply return the pair (I, A)COMMENT
LOWpython/taichi/lang/kernel_impl.py401 # Taichi kernel will cache the extracted arguments, thus we can't simply return the original argument.COMMENT
LOWpython/taichi/lang/ast/ast_transformer.py771 # so we simply call "impl.expr_init_func(data)" to perform:COMMENT
MEDIUMpython/taichi/examples/autodiff/diff_sph/diff_sph.py2# Here we utilize SPH to simulate a fountain, who tries to hit a target given by the user.COMMENT
MEDIUMtaichi/ui/gui/android.cpp5// can leverage for rendering of 2D elements (circle, rectangle, ...)COMMENT
Docstring Block Structure2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHpython/taichi/sparse/_sparse_grid.py11Creates a 2D/3D sparse grid with each element is a struct. The struct is placed on a bitmasked snode. Args: STRING
HIGHpython/taichi/sparse/_sparse_grid.py46 Get the usage of the sparse grid, which is in [0,1] Args: x(struct field): the sparse grid to be checkSTRING
Overly Generic Function Names5 hits · 6 pts
SeverityFileLineSnippetContext
LOWtests/python/test_offline_cache.py259 def helper():CODE
LOWtests/python/test_offline_cache.py338 def helper():CODE
LOWtests/python/test_offline_cache.py372 def helper():CODE
LOWtests/python/test_offline_cache.py395 def helper():CODE
LOWtests/python/test_offline_cache.py464 def helper():CODE
TODO Padding3 hits · 4 pts
SeverityFileLineSnippetContext
LOWtests/python/test_ad_snode_grad_type.py50# TODO: Add test for `adjoint_checkbit` after #5801 merged.COMMENT
LOWtaichi/transforms/cfg_optimization.cpp30 // TODO: implement cfg->dead_instruction_elimination()COMMENT
LOWtaichi/transforms/check_out_of_bound.cpp40 // TODO: implement bound check here for other situations.COMMENT
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippetContext
LOWci/scripts/release_test.sh290 # make sure to clean up the temp dir on exitCOMMENT
Redundant / Tautological Comments1 hit · 1 pts
SeverityFileLineSnippetContext
LOWpython/taichi/lang/misc.py361 # Check if installed version meets the requirements.COMMENT