Repository Analysis

openxla/xla

A machine learning compiler for GPUs, CPUs, and ML accelerators

9.7 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of openxla/xla, a C++ project with 4,385 GitHub stars. SynthScan v2.0 examined 410,512 lines of code across 2834 source files, recording 3502 pattern matches distributed across 17 syntactic categories. The overall adjusted score of 9.7 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).

9.7
Adjusted Score
9.7
Raw Score
100%
Time Factor
2026-07-14
Last Push
4.4K
Stars
C++
Language
410.5K
Lines of Code
2.8K
Files
3.5K
Pattern Hits
2026-07-14
Scan Date
0.00
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 9MEDIUM 203LOW 3290

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 3502 distinct pattern matches across 17 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.

Over-Commented Block3076 hits · 3051 pts
SeverityFileLineSnippetContext
LOWconfigure.py1#!/usr/bin/env python3COMMENT
LOWxla/literal_pool.h21#include <vector>COMMENT
LOWxla/shape_partition.h21#include <vector>COMMENT
LOWxla/shape_partition.h41// [0, 1), [1, 2), [2, 3), [3, 4), [4, 5) [5, 8)COMMENT
LOWxla/printer.h21#include <string>COMMENT
LOWxla/literal_comparison.h21COMMENT
LOWxla/literal_comparison.h61 const LiteralSlice& expected, const LiteralSlice& actual,COMMENT
LOWxla/literal_comparison.h81// tuple which contains a complex/floating-point tensor, Near() is equivalent toCOMMENT
LOWxla/executable_run_options.h101// Callback used by the GPU backend only. This is an "one-sided" version ofCOMMENT
LOWxla/executable_run_options.h141 // e.g., virtual GPUs. If there is only one logical device on a physicalCOMMENT
LOWxla/text_literal_reader.h21#include "absl/status/statusor.h"COMMENT
LOWxla/array4d.h21#include <initializer_list>COMMENT
LOWxla/array4d.h41//COMMENT
LOWxla/shape_tree.h21#include <memory>COMMENT
LOWxla/shape_tree.h41// XLA Shape and holds a value of type T for each subshape.COMMENT
LOWxla/shape_tree.h61// efficiency, you can construct it with a const Shape* to avoid copies. In thisCOMMENT
LOWxla/fp_util.h21#include <algorithm>COMMENT
LOWxla/shape_layout.h21#include "absl/status/status.h"COMMENT
LOWxla/shape_layout.h41 // Assigns the layouts in this ShapeLayout to the Layout fields of the givenCOMMENT
LOWxla/lit.cfg.py1# Copyright 2019 The OpenXLA Authors.COMMENT
LOWxla/sh_test_with_runfiles.py1# Copyright 2025 The OpenXLA Authors.COMMENT
LOWxla/permutation_util.h21#include <cstddef>COMMENT
LOWxla/debug_options_flags.h21#include "absl/log/log.h"COMMENT
LOWxla/debug_options_flags.h61};COMMENT
LOWxla/debug_options_flags.h81// `debug_options_flags.cc`COMMENT
LOWxla/debug_options_flags.h101// Checks whether the pass fuel was explicitly set.COMMENT
LOWxla/debug_options_flags.h121// before the program exits, we'll print a warning.COMMENT
LOWxla/metric_table_report.h21COMMENT
LOWxla/metric_table_report.h41// * 10.51% %convolution.202COMMENT
LOWxla/metric_table_report.h81 void SetShowAllEntries();COMMENT
LOWxla/tuple_tree.h21#include <initializer_list>COMMENT
LOWxla/tuple_tree.h161// is defined by the nesting of tuples.COMMENT
LOWxla/parse_flags_from_env.h21// non-whitespace in the variable value is not '-'), a file named by thatCOMMENT
LOWxla/parse_flags_from_env.h41// Examples:COMMENT
LOWxla/literal.h21#include <complex>COMMENT
LOWxla/literal.h41#include "absl/strings/string_view.h"COMMENT
LOWxla/literal.h121 }COMMENT
LOWxla/literal.h141COMMENT
LOWxla/literal.h301 template <typename NativeT>COMMENT
LOWxla/literal.h321COMMENT
LOWxla/literal.h341 // This casts value to the type of literal, then compares using ==, with theCOMMENT
LOWxla/literal.h461 absl::StatusOr<Literal> ConvertToShape(const Shape& dest_shape) const;COMMENT
LOWxla/literal.h481 // literal, but conforms to new_layout; e.g. a literal matrix that was in {0,COMMENT
LOWxla/literal.h501 Literal ToStatic() const;COMMENT
LOWxla/literal.h521COMMENT
LOWxla/literal.h541 // f32[3x2] with times=4 will produce a f32[4x3x2] with the 3x2 from thisCOMMENT
LOWxla/literal.h561 // Note: It's an antipattern to use this method then immediately callCOMMENT
LOWxla/literal.h921COMMENT
LOWxla/literal.h1021 func, const_cast<xla::LiteralBase::Piece*>(this), &index);COMMENT
LOWxla/literal.h1341 // Overloads of Set for array literals. CHECKs if the literal is notCOMMENT
LOWxla/literal.h1421 //COMMENT
LOWxla/literal.h1741 return false;COMMENT
LOWxla/shape.h21#include <cstdint>COMMENT
LOWxla/shape.h41#include "xla/util.h"COMMENT
LOWxla/shape.h81 // Precondition:COMMENT
LOWxla/shape.h181 // shapes are traversed recursively.COMMENT
LOWxla/shape.h241 // Precondition:COMMENT
LOWxla/shape.h301 }COMMENT
LOWxla/shape.h321 // Like set_dimensions, but sets the index-th minor dimension instead ofCOMMENT
LOWxla/shape.h561COMMENT
3016 more matches not shown…
Decorative Section Separators167 hits · 516 pts
SeverityFileLineSnippetContext
MEDIUMconfigure.py15# ==============================================================================COMMENT
MEDIUMxla/python_api/types_.py14# ======================================COMMENT
MEDIUMxla/python_api/xla_literal.py14# ======================================COMMENT
MEDIUMxla/python_api/xla_literal_test.py14# ======================================COMMENT
MEDIUMxla/python_api/xla_shape.py14# ======================================COMMENT
MEDIUMxla/python_api/xla_shape_test.py14# ======================================COMMENT
MEDIUM…ols/buffer_debug_log/check_thunk_output_consistency.py14# ==============================================================================COMMENT
MEDIUMxla/tools/buffer_debug_log/checksum_mismatch_report.py14# ==============================================================================COMMENT
MEDIUM…ools/buffer_debug_log/checksum_mismatch_report_test.py14# ==============================================================================COMMENT
MEDIUMxla/tools/benchmarks/json_to_tensorboard.py14# ============================================================================COMMENT
MEDIUMxla/tools/benchmarks/test_json_to_tensorboard.py14# ============================================================================COMMENT
MEDIUMxla/tools/benchmarks/registries/default_registry.yml14# ============================================================================COMMENT
MEDIUM…/tools/benchmarks/bap/hlo_workload_executor/action.yml14# ============================================================================COMMENT
MEDIUMxla/tools/benchmarks/baseline/postsubmit_baseline.yml14# ============================================================================COMMENT
MEDIUMxla/tools/benchmarks/baseline/nightly_baseline.yml14# ============================================================================COMMENT
MEDIUMxla/tools/benchmarks/baseline/presubmit_baseline.yml14# ============================================================================COMMENT
MEDIUM…a/tools/multihost_hlo_runner/python_hlo_runner_test.py14# ==============================================================================COMMENT
MEDIUMxla/python/xla_transform_test.py14# ==============================================================================COMMENT
MEDIUMxla/python/xla_client.py14# ==============================================================================COMMENT
MEDIUMxla/python/xla_compiler_test.py14# ==============================================================================COMMENT
MEDIUMxla/python/xla_hlo_test.py14# ==============================================================================COMMENT
MEDIUMxla/python/status_casters_test.py14# ==============================================================================COMMENT
MEDIUMxla/python/profile_data_test.py14# ==============================================================================COMMENT
MEDIUMxla/python/xla_extension.py14# ==============================================================================COMMENT
MEDIUMxla/python/profiler/profile_data_test.py14# ==============================================================================COMMENT
MEDIUMxla/tsl/util/filewrapper_testdata_generator.py14# ==============================================================================COMMENT
MEDIUMxla/tsl/lib/io/zip_writer_integration_test.py14# ==============================================================================COMMENT
MEDIUMxla/tsl/builddata/workspace_status_command.sh15# ==============================================================================COMMENT
MEDIUMxla/backends/gpu/codegen/tools/ncu_rep.py14# ==============================================================================COMMENT
MEDIUMxla/backends/gpu/codegen/tools/ncu_rep_test.py14# ==============================================================================COMMENT
MEDIUMxla/backends/gpu/codegen/tools/ncu_rep_lib.py14# ==============================================================================COMMENT
MEDIUM…ackends/cpu/codegen/computation_kernel_emitter_test.py14# ==============================================================================COMMENT
MEDIUMxla/backends/cpu/codegen/scatter_kernel_emitter_test.py14# ==============================================================================COMMENT
MEDIUMxla/backends/cpu/codegen/fusion_emitter_test.py14# ==============================================================================COMMENT
MEDIUMxla/backends/cpu/codegen/tiled/tiled_kernel_test.py14# ==============================================================================COMMENT
MEDIUMxla/backends/cpu/codegen/dot/dot_kernel_emitter_test.py14# ==============================================================================COMMENT
MEDIUM…u/codegen/elemental/concatenate_kernel_emitter_test.py14# ==============================================================================COMMENT
MEDIUMxla/backends/cpu/benchmarks/e2e/keras/setup.sh15# ==============================================================================COMMENT
MEDIUMxla/backends/cpu/benchmarks/e2e/keras/benchmark.py14# ==============================================================================COMMENT
MEDIUMxla/backends/cpu/benchmarks/e2e/keras/run.sh15# ==============================================================================COMMENT
MEDIUMxla/backends/cpu/benchmarks/e2e/keras/config.sh15# ==============================================================================COMMENT
MEDIUMxla/backends/cpu/benchmarks/e2e/keras/cleanup.sh15# ==============================================================================COMMENT
MEDIUMxla/backends/cpu/benchmarks/e2e/gemma2/flax_2b/setup.sh15# ==============================================================================COMMENT
MEDIUM…ackends/cpu/benchmarks/e2e/gemma2/flax_2b/benchmark.py14# ==============================================================================COMMENT
MEDIUMxla/backends/cpu/benchmarks/e2e/gemma2/flax_2b/run.sh15# ==============================================================================COMMENT
MEDIUM…a/backends/cpu/benchmarks/e2e/gemma2/flax_2b/config.sh15# ==============================================================================COMMENT
MEDIUM…backends/cpu/benchmarks/e2e/gemma2/pytorch_2b/setup.sh15# ==============================================================================COMMENT
MEDIUM…ends/cpu/benchmarks/e2e/gemma2/pytorch_2b/benchmark.py14# ==============================================================================COMMENT
MEDIUM…a/backends/cpu/benchmarks/e2e/gemma2/pytorch_2b/run.sh15# ==============================================================================COMMENT
MEDIUM…ackends/cpu/benchmarks/e2e/gemma2/pytorch_2b/config.sh15# ==============================================================================COMMENT
MEDIUMxla/backends/cpu/testlib/__init__.py14# ==============================================================================COMMENT
MEDIUM…/backends/cpu/testlib/elemental_kernel_emitter_test.py14# ==============================================================================COMMENT
MEDIUMxla/backends/cpu/testlib/kernel_runner_test.py14# ==============================================================================COMMENT
MEDIUMxla/backends/cpu/testlib/utilities.py14# ==============================================================================COMMENT
MEDIUMxla/tests/generate_complex_unary_op_samples.py14# ============================================================================COMMENT
MEDIUMxla/mlir_hlo/CMakeLists.txt37#-------------------------------------------------------------------------------COMMENT
MEDIUMxla/mlir_hlo/CMakeLists.txt39#-------------------------------------------------------------------------------COMMENT
MEDIUMxla/mlir_hlo/CMakeLists.txt43#-------------------------------------------------------------------------------COMMENT
MEDIUMxla/mlir_hlo/CMakeLists.txt45#-------------------------------------------------------------------------------COMMENT
MEDIUMxla/mlir_hlo/CMakeLists.txt86#-------------------------------------------------------------------------------COMMENT
107 more matches not shown…
Hyper-Verbose Identifiers117 hits · 109 pts
SeverityFileLineSnippetContext
LOWconfigure.py89def _get_cuda_compute_capabilities_or_die() -> list[str]:CODE
LOWconfigure.py254 def get_relevant_paths_and_versions(self, config: "XLAConfigOptions"):CODE
LOW…ols/buffer_debug_log/check_thunk_output_consistency.py33def parse_binary_or_text_proto(data: bytes, proto_type):CODE
LOWxla/tools/buffer_debug_log/checksum_mismatch_report.py182def _find_inconsistent_output_checksums(CODE
LOWxla/tools/buffer_debug_log/checksum_mismatch_report.py210def _find_inconsistent_thunks(CODE
LOW…ools/buffer_debug_log/checksum_mismatch_report_test.py25 def test_from_protos_loads_metadata(self):CODE
LOW…ools/buffer_debug_log/checksum_mismatch_report_test.py71 def test_from_protos_finds_mismatches_in_single_proto(self):STRING
LOW…ools/buffer_debug_log/checksum_mismatch_report_test.py129 def test_from_protos_finds_mismatches_in_multiple_protos(self):STRING
LOW…ools/buffer_debug_log/checksum_mismatch_report_test.py180 def test_from_protos_does_not_include_consistent_executions(self):STRING
LOW…a/tools/multihost_hlo_runner/python_hlo_runner_test.py28def _register_transformer_engine_custom_calls():CODE
LOWxla/python/xla_transform_test.py23 def test_register_hlo_xla_transform(self):CODE
LOWxla/python/xla_transform_test.py34 def test_core_assignment_unimplemented_on_cpu(self):CODE
LOWxla/python/xla_client.py129def current_source_info_metadata(op_type=None, op_name=None, skip_frames=1):CODE
LOWxla/python/xla_client.py164def window_padding_type_to_pad_values(CODE
LOWxla/python/xla_client.py263def make_dot_dimension_numbers(CODE
LOWxla/python/xla_client.py319def make_convolution_dimension_numbers(CODE
LOWxla/python/xla_client.py435def _make_replica_group_proto(replica_group):CODE
LOWxla/python/xla_client.py452def get_backend_config_string(instruction_proto, module_proto=None) -> str:CODE
LOWxla/python/profile_data_test.py22 def test_find_plane_with_name(self):CODE
LOWxla/python/profile_data_test.py160 def test_visit_event_missing_metadata(self):STRING
LOWxla/python/profile_data_test.py196 def test_create_profile_data_from_file(self):STRING
LOWxla/python/profiler/profile_data_test.py23 def test_find_plane_with_name(self):CODE
LOWxla/python/profiler/profile_data_test.py161 def test_visit_event_missing_metadata(self):STRING
LOWxla/python/profiler/profile_data_test.py197 def test_create_profile_data_from_file(self):STRING
LOWxla/tsl/lib/io/zip_writer_integration_test.py27 def test_generated_zip_validity(self):CODE
LOWxla/backends/gpu/codegen/tools/ncu_rep_test.py23 def test_get_metrics_by_kernel(self):CODE
LOWxla/backends/gpu/codegen/tools/ncu_rep_test.py47 def test_aggregate_kernel_metrics(self):CODE
LOWxla/backends/gpu/codegen/tools/ncu_rep_test.py107 def test_write_metrics_markdown(self):CODE
LOW…ackends/cpu/codegen/computation_kernel_emitter_test.py30def create_trivial_add_computation(CODE
LOWxla/backends/cpu/codegen/scatter_kernel_emitter_test.py28def create_sclar_add_computation(CODE
LOWxla/backends/cpu/codegen/scatter_kernel_emitter_test.py204 def test_out_of_bounds_scatter(self):CODE
LOWxla/backends/cpu/codegen/fusion_emitter_test.py206 def test_constant_with_layout(self):STRING
LOWxla/backends/cpu/codegen/tiled/tiled_kernel_test.py261 def test_dot_fusion_single_tile(self):STRING
LOWxla/backends/cpu/codegen/tiled/tiled_kernel_test.py399 def test_reduction_outer_inner(self):STRING
LOWxla/backends/cpu/codegen/tiled/tiled_kernel_test.py432 def test_reduction_unsigned_add(self):STRING
LOWxla/backends/cpu/codegen/tiled/tiled_kernel_test.py464 def test_broadcast_in_dim_inner(self):STRING
LOWxla/backends/cpu/codegen/tiled/tiled_kernel_test.py489 def test_broadcast_in_dim_outer(self):STRING
LOWxla/backends/cpu/codegen/dot/dot_kernel_emitter_test.py132 def test_matrix_multiplication(self, emitter_type, shapes, dtype):CODE
LOW…ackends/cpu/benchmarks/e2e/gemma2/flax_2b/benchmark.py52def benchmark_generation_time(output_token_len):CODE
LOW…ackends/cpu/benchmarks/e2e/gemma2/flax_2b/benchmark.py73def display_benchmark_results(timer_list, metric_name):CODE
LOW…ends/cpu/benchmarks/e2e/gemma2/pytorch_2b/benchmark.py60def benchmark_generation_time(output_token_len):CODE
LOW…ends/cpu/benchmarks/e2e/gemma2/pytorch_2b/benchmark.py85def display_benchmark_results(timer_list, metric_name):CODE
LOW…/backends/cpu/testlib/elemental_kernel_emitter_test.py120 def test_elemental_kernel_emitter(CODE
LOW…/backends/cpu/testlib/elemental_kernel_emitter_test.py206 def test_elemental_comparision_kernel_emitter(self, op_def, shape, dtype):CODE
LOWxla/backends/cpu/testlib/kernel_runner_test.py28 def test_llvm_ir_kernel_runner(self):CODE
LOWxla/mlir_hlo/tests/python/attributes.py39def test_comparison_direction_attr():CODE
LOWxla/mlir_hlo/tests/python/attributes.py47def test_comparison_type_attr():CODE
LOWxla/mlir_hlo/tests/python/attributes.py55def test_conv_dimension_numbers():CODE
LOWxla/mlir_hlo/tests/python/attributes.py81def test_dequantize_mode_attr():CODE
LOWxla/mlir_hlo/tests/python/attributes.py89def test_dot_dimension_numbers():CODE
LOWxla/mlir_hlo/tests/python/attributes.py124def test_gather_dimension_numbers():CODE
LOWxla/mlir_hlo/tests/python/attributes.py148def test_output_operand_alias():CODE
LOWxla/mlir_hlo/tests/python/attributes.py178def test_rng_distribution_attr():CODE
LOWxla/mlir_hlo/tests/python/attributes.py186def test_scatter_dimension_numbers():CODE
LOWxla/codegen/testlib/kernel_runner_test.py55 def test_output_same_as_input(self):CODE
LOWxla/hlo/tools/generate_hlo_test_checks.py186def _format_function_declaration_file_check(line_text: str) -> str:CODE
LOWxla/hlo/tools/generate_hlo_test_checks.py467 def _prefix_lines_with_check_directives(CODE
LOWxla/hlo/tools/generate_hlo_test_checks.py508 def _replace_symbol_names_with_regex_captures(CODE
LOWxla/hlo/tools/generate_hlo_test_checks.py1007 def transform_and_overwrite_file(CODE
LOWxla/hlo/tools/tests/generate_hlo_test_checks_test.py38 def test_parallel_mode_generates_expected_output_file(self):CODE
57 more matches not shown…
AI Slop Vocabulary30 hits · 80 pts
SeverityFileLineSnippetContext
MEDIUMxla/pjrt/cpu/abstract_cpu_buffer.h57// robust by using setting the AsyncValue in the destructor.COMMENT
MEDIUM…/distributed/coordination/coordination_service_agent.h176 // The agent does not need to be connected to utilize the key-value store.COMMENT
MEDIUM…a/pjrt/distributed/coordination/coordination_service.h191 // connected to utilize the distributed key-value store.COMMENT
MEDIUMxla/python_api/xla_literal_test.py53# To facilitate iteration over different test cases, we collect similar arrayCOMMENT
MEDIUMxla/python/ifrt_proxy/server/ifrt_backend.h52// service to interact with a variety of backend runtime system it can utilize.COMMENT
MEDIUMxla/python/ifrt/client.h155 // robust cleanup, it is strongly recommended to capture RAII objects in theCOMMENT
MEDIUMxla/python/ifrt/ir/program_interpreter.h58// 1. It allows us to leverage the static information available in the programCOMMENT
MEDIUMxla/tsl/framework/cancellation.h124 // is robust to `callback` being invoked asynchronously (e.g. fromCOMMENT
MEDIUMxla/tsl/lib/gtl/int_type.h24// other operations from other similar integer-like types. Essentially, theCOMMENT
MEDIUMxla/tsl/lib/gtl/int_type.h133// The following bad usage is permissible although discouraged. Essentially, itCOMMENT
MEDIUM…uted_runtime/coordination/coordination_service_agent.h191 // The agent does not need to be connected to utilize the key-value store.COMMENT
MEDIUM…istributed_runtime/coordination/coordination_service.h191 // connected to utilize the distributed key-value store.COMMENT
MEDIUMxla/backends/gpu/runtime/while_loop.h49// storage. Essentially we keep a thread local stack of `WhileLoopState` entriesCOMMENT
MEDIUMxla/backends/gpu/transforms/splitk_rewriter.h29// Rewrites dot instructions that don't fully utilize cores but have a long KCOMMENT
MEDIUMxla/hlo/tools/hlo_diff/matchers/gumgraph_matcher.h49// output types, ensuring seamless integration and compatibility within anyCOMMENT
MEDIUMxla/service/compiler.h196 // Note: The default implementation of the API here does not utilize the givenCOMMENT
MEDIUMxla/service/hlo_runner_interface.h238 // Note: The default implementation of the API here does not utilize the givenCOMMENT
MEDIUMxla/service/hlo_runner_interface.h263 // Note: The default implementation of the API here does not utilize the givenCOMMENT
MEDIUMxla/service/batchnorm_expander.h30// big operation into smaller operations helps leverage our generic fusionCOMMENT
MEDIUMxla/service/local_service.h39// Service implementation that extends the XLA Service to leverage runningCOMMENT
MEDIUMxla/service/hlo_graph_dumper.h35// Fundamentally all graphs are rendered using the DOT language, but they can beCOMMENT
MEDIUMxla/service/spmd/spmd_partitioner_util_internal.h38// NOTE: If provided sharding does not utilize all the partitions, we skipCOMMENT
MEDIUMxla/service/heap_simulator/allocation_block.h75// composed of slices. In such cases, the repacker can utilizeCOMMENT
LOWtools/ci_build/gpu_build/parallel_gpu_execute.sh41 # If the file path is already fully specified, simply return it.COMMENT
LOWtools/ci_build/gpu_build/parallel_gpu_execute.sh44 # If the file exists in the $TEST_SRCDIR then just use it.COMMENT
LOWbuild_tools/ci/parallel_gpu_execute.sh41 # If the file path is already fully specified, simply return it.COMMENT
LOWbuild_tools/ci/parallel_gpu_execute.sh44 # If the file exists in the $TEST_SRCDIR then just use it.COMMENT
LOWbuild_tools/rocm/parallel_gpu_execute.sh50 # If the file path is already fully specified, simply return it.COMMENT
LOWbuild_tools/rocm/parallel_gpu_execute.sh53 # If the file exists in the $TEST_SRCDIR then just use it.COMMENT
MEDIUM.github/workflows/benchmarks/run_comparison.sh25echo "CONFIG_ID for baseline lookup: $CONFIG_ID" # This is now the comprehensive IDCODE
Structural Annotation Overuse23 hits · 38 pts
SeverityFileLineSnippetContext
LOWxla/online_topsort.h492 // Step 1: test order: if w is already higher than v in the lexicographicalCOMMENT
LOWxla/online_topsort.h502 // Step 2: search backwards from v, until we either find `w`, which means weCOMMENT
LOWxla/online_topsort.h526 // Step 3: search forwards from w, following outgoing edges only from nodesCOMMENT
LOWxla/online_topsort.h539 // Step 4: update indices.COMMENT
LOWxla/online_topsort.h552 // Step 5: add the edge.COMMENT
LOWxla/tsl/platform/test.h76// NOTE: This function is not thread-safe.COMMENT
LOWxla/tsl/profiler/utils/xplane_utils.h248// NOTE: This class assumes that the ancestors are ordered with respect to theCOMMENT
LOWxla/tsl/distributed_runtime/rpc/grpc_call.h255 // NOTE: This method must be called before this call is enqueued on aCOMMENT
LOWxla/hlo/ir/tile_assignment.h175// NOTE: This class is immutable.COMMENT
LOWxla/hlo/builder/lib/matrix.h118// NOTE: This function is meant for testing, there is no need to call itCOMMENT
LOWxla/service/mapped_ptr_container_sorter.h369 // Step 1: build a set of the ptrs in unordered_containerCOMMENT
LOWxla/service/mapped_ptr_container_sorter.h376 // Step 2: for mapped elements (in unordered_container), create a map fromCOMMENT
LOWxla/service/mapped_ptr_container_sorter.h398 // Step 3: create sorted unordered element indicesCOMMENT
LOWdocs/pjrt/pjrt_integration.md8### Step 1: Implement [PJRT C API interface](https://github.com/openxla/xla/blob/71a4e6e6e4e9f0f8b8f25c07a32ad489aff1923COMMENT
LOWdocs/pjrt/pjrt_integration.md38### Step 2: Implement GetPjRtApiCOMMENT
LOWdocs/pjrt/pjrt_integration.md50### Step 3: Test C API implementationsCOMMENT
LOWdocs/pjrt/pjrt_integration.md56### Step 1: Set up JAXCOMMENT
LOWdocs/pjrt/pjrt_integration.md76### Step 2: Use jax\_plugins namespace or set up entry\_pointCOMMENT
LOWdocs/pjrt/pjrt_integration.md104### Step 3: Implement an initialize() methodCOMMENT
LOW.github/workflows/benchmarks/README.md33### Step 1: Prepare Your Benchmark ArtifactCOMMENT
LOW.github/workflows/benchmarks/README.md42### Step 2: Define the Benchmark ConfigurationCOMMENT
LOW.github/workflows/benchmarks/README.md113### Step 3: Establish a BaselineCOMMENT
LOW.github/workflows/benchmarks/README.md186### Step 4: Create a Pull RequestCOMMENT
Docstring Block Structure6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHconfigure.py62Finds executable and resolves symlinks or raises RuntimeError. Resolving symlinks is sometimes necessary for finding STRING
HIGHxla/hlo/tools/generate_hlo_test_checks.py219Passes `input_stream` through an optimizer; output is another stream. Args: input_stream: An iterator over the liSTRING
HIGHxla/hlo/tools/generate_hlo_test_checks.py301Returns the next item in the sub-stream corresponding to `target_buffer`. Args: target_buffer: The queue backSTRING
HIGHbuild_tools/configure/configure.py62Finds executable and resolves symlinks or raises RuntimeError. Resolving symlinks is sometimes necessary for finding STRING
HIGHbuild_tools/ci/clang_tidy_diff.py306Parses a Bazel BEP JSON file and returns a list of paths to .clang-tidy.yaml files. Args: bep_path: Path to the BSTRING
HIGH.github/workflows/github_api.py39Helper method to make a request and raise an HTTPError if one occurred. Arguments: verb: The HTTP verb to useSTRING
Self-Referential Comments9 hits · 27 pts
SeverityFileLineSnippetContext
MEDIUMxla/backends/cpu/benchmarks/e2e/gemma2/flax_2b/setup.sh26 # Create a virtual environmentCOMMENT
MEDIUM…backends/cpu/benchmarks/e2e/gemma2/pytorch_2b/setup.sh27 # Create a virtual environmentCOMMENT
MEDIUMtools/ci_build/gpu_build/parallel_gpu_execute.sh27# This function is used below in rlocation to check that a path is absoluteCOMMENT
MEDIUMbuild_tools/ci/parallel_gpu_execute.sh27# This function is used below in rlocation to check that a path is absoluteCOMMENT
MEDIUMbuild_tools/rocm/parallel_gpu_execute.sh36# This function is used below in rlocation to check that a path is absoluteCOMMENT
MEDIUM.github/workflows/postsubmit_benchmark.yml142 # Create the output directory; scripts will assume it existsCOMMENT
MEDIUM.github/workflows/presubmit_benchmark.yml136 # Create the output directory - scripts will assume it existsCOMMENT
MEDIUM.github/workflows/nightly_benchmarks.yml117 # Create the output directory; scripts will assume it existsCOMMENT
MEDIUM.github/workflows/benchmarks/prepare_artifact.sh26# Create the directory HERE, inside this script, right before using it.COMMENT
Example Usage Blocks16 hits · 24 pts
SeverityFileLineSnippetContext
LOWxla/debug_options_flags.h132// Example usage:COMMENT
LOWxla/reference_util.h599 // Example usage:COMMENT
LOWxla/tsl/util/sorted_range.h29// Example usage:COMMENT
LOWxla/tsl/util/sorted_range.h49// Example usage:COMMENT
LOWxla/tsl/util/fixed_option_set_flag.h47// Example usage:COMMENT
LOWxla/tsl/platform/debug_me_context.h47// Example usage:COMMENT
LOWxla/tsl/platform/errors.h201// Example usage:COMMENT
LOWxla/tsl/platform/cloud/compute_engine_metadata_client.h50 /// Example usage:COMMENT
LOWxla/tsl/lib/gtl/value_or_die.h21// Example usage:COMMENT
LOWxla/tsl/lib/monitoring/collection_registry.h500// Example usage:COMMENT
LOWxla/tests/xla_test_backend_predicates.h118// Example usage:COMMENT
LOWxla/hlo/analysis/shape_tracker.h41// Example usage:COMMENT
LOWxla/hlo/ir/hlo_computation.h180 // Example usage:COMMENT
LOWxla/service/pattern_matcher.h3211// Example usage:COMMENT
LOWxla/service/cpu/ir_function.h46// Example usage:COMMENT
LOWxla/stream_executor/kernel_symbol_registry.h85// Example usage:COMMENT
Deep Nesting20 hits · 20 pts
SeverityFileLineSnippetContext
LOWconfigure.py319CODE
LOWxla/python/xla_hlo_test.py30CODE
LOWxla/python/xla_hlo_test.py246CODE
LOWxla/python/xla_hlo_test.py440CODE
LOWxla/python/xla_hlo_test.py491CODE
LOWxla/tsl/lib/io/zip_writer_integration_test.py27CODE
LOWxla/backends/cpu/benchmarks/e2e/keras/benchmark.py110CODE
LOWxla/tests/generate_complex_unary_op_samples.py53CODE
LOWxla/hlo/tools/generate_hlo_test_checks.py300CODE
LOWxla/service/fusion_explorer/viewer_server.py159CODE
LOWxla/service/fusion_explorer/viewer_server.py43CODE
LOWthird_party/py/setup_py_nvidia_dependencies_util.py46CODE
LOWthird_party/mkl_dnn/gen_gpu_kernel_list.py133CODE
LOWthird_party/gpus/find_cuda_config.py223CODE
LOWbuild_tools/lint/check_dwyu.py134CODE
LOWbuild_tools/lint/check_dwyu.py171CODE
LOWbuild_tools/configure/configure.py319CODE
LOWbuild_tools/ci/clang_tidy_diff.py305CODE
LOWbuild_tools/ci/clang_tidy_diff.py349CODE
LOW.github/workflows/benchmarks/compare_with_baseline.py84CODE
Synthetic Comment Markers3 hits · 20 pts
SeverityFileLineSnippetContext
HIGHxla/packed_literal_reader.h33// Reads packed data from a metadata-less file as requested by a user (who mustCOMMENT
HIGHdocs/contributing.md186### AI-generated contributionsCOMMENT
HIGHdocs/contributing.md205 their PRs in detail regardless of whether it was generated by AI or not.CODE
Verbosity Indicators8 hits · 15 pts
SeverityFileLineSnippetContext
LOWxla/online_topsort.h492 // Step 1: test order: if w is already higher than v in the lexicographicalCOMMENT
LOWxla/online_topsort.h502 // Step 2: search backwards from v, until we either find `w`, which means weCOMMENT
LOWxla/online_topsort.h526 // Step 3: search forwards from w, following outgoing edges only from nodesCOMMENT
LOWxla/online_topsort.h539 // Step 4: update indices.COMMENT
LOWxla/online_topsort.h552 // Step 5: add the edge.COMMENT
LOWxla/service/mapped_ptr_container_sorter.h369 // Step 1: build a set of the ptrs in unordered_containerCOMMENT
LOWxla/service/mapped_ptr_container_sorter.h376 // Step 2: for mapped elements (in unordered_container), create a map fromCOMMENT
LOWxla/service/mapped_ptr_container_sorter.h398 // Step 3: create sorted unordered element indicesCOMMENT
Excessive Try-Catch Wrapping8 hits · 12 pts
SeverityFileLineSnippetContext
LOW…ols/buffer_debug_log/check_thunk_output_consistency.py94 except Exception as e:CODE
LOW…ols/buffer_debug_log/check_thunk_output_consistency.py104 except Exception as e:CODE
MEDIUMxla/backends/cpu/benchmarks/e2e/keras/benchmark.py74 print(f"Error: max_len {max_len} should be >= 1")CODE
LOWxla/service/fusion_explorer/viewer_server.py177 except Exception as e: # pylint: disable=broad-exception-caughtCODE
MEDIUMxla/service/fusion_explorer/viewer_server.py178 print(f"Error extracting database: {e}")CODE
LOWxla/service/fusion_explorer/viewer_server.py185 except Exception: # pylint: disable=broad-exception-caughtCODE
LOWxla/service/fusion_explorer/viewer_server.py209 except Exception as e: # pylint: disable=broad-exception-caughtCODE
LOW.github/workflows/pr_size_check.py77 except Exception as e: # pylint: disable=broad-exceptCODE
Unused Imports12 hits · 12 pts
SeverityFileLineSnippetContext
LOWxla/python/xla_client.py24CODE
LOWxla/python/xla_client.py34CODE
LOWxla/python/xla_client.py36CODE
LOWxla/python/xla_client.py37CODE
LOWxla/python/xla_extension.py18CODE
LOWxla/python/xla_extension.py20CODE
LOWxla/mlir_hlo/tests/python/smoketest.py19CODE
LOWxla/mlir_hlo/tests/python/smoketest.py20CODE
LOWxla/mlir_hlo/bindings/python/mlir/dialects/mhlo.py19CODE
LOWxla/mlir_hlo/bindings/python/mlir/dialects/mhlo.py20CODE
LOWxla/hlo/tools/generate_hlo_test_checks.py91CODE
LOWbuild_tools/ci/clang_tidy_diff.py25CODE
Redundant / Tautological Comments3 hits · 4 pts
SeverityFileLineSnippetContext
LOWxla/python/xla_hlo_test.py234 # Check if we can find expected opcodes in the main computation.STRING
LOW.github/workflows/postsubmit_benchmark.yml213 # Check if the results file existsCOMMENT
LOW.github/workflows/nightly_benchmarks.yml181 # Check if the results file existsCOMMENT
Modern AI Meta-Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMbuild_tools/ci/run_clang_tidy.sh76# TODO(sohaibiftikhar): Move the bash orchestration to python.COMMENT
Modern Structural Boilerplate2 hits · 2 pts
SeverityFileLineSnippetContext
LOWbuild_tools/ci/clang_tidy_diff.py174def _set_log_level(log_level: str) -> None:CODE
LOWbuild_tools/ci/clang_tidy_diff.py184 def _set_level(level: int) -> None:CODE
AI Structural Patterns1 hit · 1 pts
SeverityFileLineSnippetContext
LOWxla/backends/cpu/codegen/dot/dot_kernel_emitter_test.py47CODE