AI Slop Code RIsk Monitor

openxla/xla

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

9.8 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for openxla/xla, a C++ project with 4,580 GitHub stars. SynthScan examined 441,521 lines of code across 2991 source files, recording 3841 pattern matches distributed across 19 syntactic categories. The legacy adjusted pattern signal is 9.8 (Moderate pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

9.8
Adjusted Signal
9.8
Raw Pattern Score
100%
Time Factor
2026-10-11
Last Push
4.6K
Stars
C++
Language
441.5K
Lines of Code
3.0K
Files
3.8K
Pattern Hits
2026-10-12
Scan Date
0.01
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 34.7/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 3644 finding(s).

Hallucinated Dependency & Supply Chain Risk 0.2/100 · LOW

Are imports declared and package/API names verified? 13 finding(s).

Agent Over-Engineering Ratio 8.8/100 · LOW

Are wrappers, guards, and repeated structures necessary? 438 finding(s).

PR Review Velocity Impact 38.8/100 · MEDIUM

Which changes need focused human review? 3841 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 1HIGH 18MEDIUM 199LOW 3623

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 3841 distinct pattern matches across 19 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Over-Commented Block3263 hits · 3238 pts
SeverityFileLineSnippetContext
LOWbazel_downloader.cfg1# Copyright 2026 The OpenXLA Authors. All Rights Reserved.COMMENT
LOWconfigure.py1#!/usr/bin/env python3COMMENT
LOW.pre-commit-config.yaml1# Copyright 2026 The OpenXLA Authors. All Rights Reserved.COMMENT
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.h141 // values are: 0 to # of devices - 1. These are the logical device ordinals,COMMENT
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/status/status_macros.h"COMMENT
LOWxla/literal.h121 int64_t total_size_bytes() const;COMMENT
LOWxla/literal.h161COMMENT
LOWxla/literal.h281 std::optional<double> GetAsDouble(COMMENT
LOWxla/literal.h321COMMENT
LOWxla/literal.h341 // are considered equal to true/false; other values are not considered equalCOMMENT
LOWxla/literal.h481 std::unique_ptr<Literal> CloneToUnique() const;COMMENT
LOWxla/literal.h501COMMENT
LOWxla/literal.h521 // This literal must be an array.COMMENT
LOWxla/literal.h541 // start_indices and limit_indices must be the rank of the literal, and theCOMMENT
LOWxla/literal.h561 // See comments on ArrayValueState for detailed explanation.COMMENT
LOWxla/literal.h841 private:COMMENT
LOWxla/literal.h1341COMMENT
LOWxla/literal.h1381COMMENT
LOWxla/literal.h1461 absl::Status Populate(Generator&& generator);COMMENT
LOWxla/literal.h1601 // allocated in this literal for the subshape at dest_shape_index isCOMMENT
LOWxla/literal.h1681COMMENT
LOWxla/literal.h1781}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
3203 more matches not shown…
Decorative Section Separators163 hits · 504 pts
SeverityFileLineSnippetContext
MEDIUMbazel_downloader.cfg14# ==============================================================================COMMENT
MEDIUMconfigure.py15# ==============================================================================COMMENT
MEDIUM.pre-commit-config.yaml14# ============================================================================COMMENT
MEDIUMxla/pjrt/distributed/testdata/mtls/generate.sh15# ==============================================================================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/hlo_workload_executor/action.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
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
MEDIUM⚡xla/mlir_hlo/CMakeLists.txt37#-------------------------------------------------------------------------------COMMENT
MEDIUM⚡xla/mlir_hlo/CMakeLists.txt39#-------------------------------------------------------------------------------COMMENT
MEDIUM⚡xla/mlir_hlo/CMakeLists.txt43#-------------------------------------------------------------------------------COMMENT
MEDIUM⚡xla/mlir_hlo/CMakeLists.txt45#-------------------------------------------------------------------------------COMMENT
MEDIUMxla/mlir_hlo/CMakeLists.txt86#-------------------------------------------------------------------------------COMMENT
MEDIUMxla/mlir_hlo/CMakeLists.txt88#-------------------------------------------------------------------------------COMMENT
MEDIUM⚡xla/mlir_hlo/CMakeLists.txt132#-------------------------------------------------------------------------------COMMENT
103 more matches not shown…
Hyper-Verbose Identifiers253 hits · 250 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.py131def current_source_info_metadata(op_type=None, op_name=None, skip_frames=1):CODE
LOWxla/python/xla_client.py166def window_padding_type_to_pad_values(CODE
LOWxla/python/xla_client.py265def make_dot_dimension_numbers(CODE
LOWxla/python/xla_client.py321def make_convolution_dimension_numbers(CODE
LOWxla/python/xla_client.py437def _make_replica_group_proto(replica_group):CODE
LOWxla/python/xla_client.py454def 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.py274 def test_dot_fusion_single_tile(self):STRING
LOWxla/backends/cpu/codegen/tiled/tiled_kernel_test.py412 def test_reduction_outer_inner(self):STRING
LOWxla/backends/cpu/codegen/tiled/tiled_kernel_test.py445 def test_reduction_unsigned_add(self):STRING
LOWxla/backends/cpu/codegen/tiled/tiled_kernel_test.py477 def test_broadcast_in_dim_inner(self):STRING
LOWxla/backends/cpu/codegen/tiled/tiled_kernel_test.py502 def test_broadcast_in_dim_outer(self):STRING
LOWxla/backends/cpu/codegen/dot/dot_kernel_emitter_test.py131 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
LOWxla/backends/cpu/testlib/kernel_runner_test.py28 def test_llvm_ir_kernel_runner(self):CODE
LOW⚡xla/mlir_hlo/tests/python/attributes.py39def test_comparison_direction_attr():CODE
LOW⚡xla/mlir_hlo/tests/python/attributes.py47def test_comparison_type_attr():CODE
LOW⚡xla/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
LOWxla/hlo/tools/tests/generate_hlo_test_checks_test.py62 def test_sequential_mode_generates_expected_output_file(self):CODE
LOWxla/hlo/tools/tests/generate_hlo_test_checks_test.py83 def test_custom_input_file_placeholder_string(self):CODE
193 more matches not shown…
AI Slop Vocabulary31 hits · 84 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.h181 // 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/tools/hlo_dump/hlo_lexer.h32// 2. The HTML dumper needs to be robust to malformed or partial HLO textCOMMENT
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.h177 // 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/conv_fp8_fallback.h54// rewriting the convolution earlier is not robust because inserted convertsCOMMENT
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
Empty Error Handlers8 hits · 40 pts
SeverityFileLineSnippetContext
HIGHxla/sh_test_with_runfiles.py109except FileNotFoundError:CODE
HIGHxla/sh_test_with_runfiles.py51except FileExistsError:CODE
HIGH…ols/buffer_debug_log/check_thunk_output_consistency.py37except message.DecodeError:CODE
HIGH…odegen/intrinsic/accuracy/generate_golden_baselines.py145except ValueError:CODE
HIGH…a/benchmarks/jax_microbenchmarks/jax_profiler_utils.py122except ValueError:CODE
HIGHxla/service/fusion_explorer/viewer_server.py201except webbrowser.Error:CODE
HIGHxla/service/fusion_explorer/viewer_server.py214except KeyboardInterrupt:CODE
HIGHxla/service/fusion_explorer/viewer_server.py66except sqlite3.OperationalError:CODE
Structural Annotation Overuse22 hits · 36 pts
SeverityFileLineSnippetContext
LOW⚡xla/online_topsort.h513 // Step 1: test order: if w is already higher than v in the lexicographicalCOMMENT
LOW⚡xla/online_topsort.h523 // Step 2: search backwards from v, until we either find `w`, which means weCOMMENT
LOWxla/online_topsort.h547 // Step 3: search forwards from w, following outgoing edges only from nodesCOMMENT
LOWxla/online_topsort.h565 // Step 4: update indices.COMMENT
LOWxla/online_topsort.h581 // Step 5: add the edge.COMMENT
LOWxla/tsl/platform/test.h77// 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.h180// 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
LOW⚡xla/service/mapped_ptr_container_sorter.h370 // Step 1: build a set of the ptrs in unordered_containerCOMMENT
LOW⚡xla/service/mapped_ptr_container_sorter.h377 // Step 2: for mapped elements (in unordered_container), create a map fromCOMMENT
LOWxla/service/mapped_ptr_container_sorter.h399 // 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.md130### Step 1: Prepare Your Benchmark ArtifactCOMMENT
LOW.github/workflows/benchmarks/README.md148### Step 2: Define the Benchmark Configuration in `benchmark_registry.pbtxt`COMMENT
LOW.github/workflows/benchmarks/README.md163### Step 3: Establish Baselines & ThresholdsCOMMENT
Docstring Block Structure7 hits · 35 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.py308Parses a Bazel BEP JSON file and returns a list of paths to .clang-tidy.yaml files. Args: bep_path: Path to the BSTRING
HIGHbuild_tools/ci/change_detector.py83Validates that ref is a safe Git revision string and cannot inject flags. Args: ref: Git commit SHA or ref name tSTRING
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
Deep Nesting29 hits · 29 pts
SeverityFileLineSnippetContext
LOWconfigure.py319CODE
LOWxla/sh_test_with_runfiles.py25CODE
LOWxla/python/xla_hlo_test.py30CODE
LOWxla/python/xla_hlo_test.py246CODE
LOWxla/python/xla_hlo_test.py459CODE
LOWxla/python/xla_hlo_test.py510CODE
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/benchmarks/benchmark_configs.py57CODE
LOW…a/benchmarks/jax_microbenchmarks/jax_profiler_utils.py81CODE
LOWxla/benchmarks/core/benchmark.py125CODE
LOWxla/benchmarks/core/flag_utils.py53CODE
LOWxla/benchmarks/core/flag_utils.py118CODE
LOWxla/benchmarks/dma_microbenchmarks/memory_base.py66CODE
LOWxla/benchmarks/collectives/collectives_benchmark.py146CODE
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.py165CODE
LOWbuild_tools/configure/configure.py319CODE
LOWbuild_tools/ci/build.py958CODE
LOWbuild_tools/ci/bazel_diff.py304CODE
LOWbuild_tools/ci/bazel_diff.py433CODE
LOWbuild_tools/ci/clang_tidy_diff.py307CODE
LOWbuild_tools/ci/clang_tidy_diff.py351CODE
Example Usage Blocks17 hits · 26 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.h499// Example usage:COMMENT
LOWxla/tests/xla_test_backend_predicates.h119// Example usage:COMMENT
LOWxla/hlo/analysis/shape_tracker.h42// Example usage:COMMENT
LOWxla/hlo/ir/hlo_computation.h180 // Example usage:COMMENT
LOWxla/service/pattern_matcher.h3244// Example usage:COMMENT
LOWxla/service/cpu/ir_function.h46// Example usage:COMMENT
LOWxla/stream_executor/kernel_symbol_registry.h85// Example usage:COMMENT
LOW…stream_executor/gpu/scoped_command_buffer_annotation.h28// Example usage:COMMENT
Self-Referential Comments7 hits · 21 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
MEDIUM…arks/dma_microbenchmarks/chip_to_chip_dma_benchmark.py35 # Create a mesh with 2 devices, each on a different chip.COMMENT
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/benchmarks/prepare_artifact.sh26# Create the directory HERE, inside this script, right before using it.COMMENT
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.md201### AI-generated contributionsCOMMENT
HIGHdocs/contributing.md220 their PRs in detail regardless of whether it was generated by AI or not.CODE
Verbosity Indicators8 hits · 15 pts
SeverityFileLineSnippetContext
LOW⚡xla/online_topsort.h513 // Step 1: test order: if w is already higher than v in the lexicographicalCOMMENT
LOW⚡xla/online_topsort.h523 // Step 2: search backwards from v, until we either find `w`, which means weCOMMENT
LOWxla/online_topsort.h547 // Step 3: search forwards from w, following outgoing edges only from nodesCOMMENT
LOWxla/online_topsort.h565 // Step 4: update indices.COMMENT
LOWxla/online_topsort.h581 // Step 5: add the edge.COMMENT
LOW⚡xla/service/mapped_ptr_container_sorter.h370 // Step 1: build a set of the ptrs in unordered_containerCOMMENT
LOW⚡xla/service/mapped_ptr_container_sorter.h377 // Step 2: for mapped elements (in unordered_container), create a map fromCOMMENT
LOWxla/service/mapped_ptr_container_sorter.h399 // Step 3: create sorted unordered element indicesCOMMENT
Excessive Try-Catch Wrapping10 hits · 14 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
LOW…a/benchmarks/jax_microbenchmarks/jax_profiler_utils.py75 except Exception as e: # pylint: disable=broad-exceptCODE
LOW…a/benchmarks/jax_microbenchmarks/jax_profiler_utils.py134 except Exception: # pylint: disable=broad-exceptCODE
LOW⚡xla/service/fusion_explorer/viewer_server.py177 except Exception as e: # pylint: disable=broad-exception-caughtCODE
MEDIUM⚡xla/service/fusion_explorer/viewer_server.py178 print(f"Error extracting database: {e}")CODE
LOW⚡xla/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
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippetContext
CRITICALxla/backends/gpu/tests/gpu_pjrt_codegen_test.h114 return "void @llvm.nvvm.barrier.cta.sync.aligned.all(i32 0)";CODE
Modern AI Meta-Vocabulary2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMxla/tools/hlo_isolation/hlo_inf_nan_intent_analyzer.h48// numerical guardrails) rather than genuine numerical errors.COMMENT
MEDIUMbuild_tools/ci/run_clang_tidy.sh79# TODO(sohaibiftikhar): Move the bash orchestration to python.COMMENT
Modern Structural Boilerplate3 hits · 2 pts
SeverityFileLineSnippetContext
LOWbuild_tools/lint/generate_compile_commands.py53def _setup_external_symlink(xla_src_root: pathlib.Path) -> None:STRING
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
Redundant / Tautological Comments1 hit · 0 pts
SeverityFileLineSnippetContext
LOWxla/python/xla_hlo_test.py234 # Check if we can find expected opcodes in the main computation.STRING