Repository Analysis

ml-explore/mlx

MLX: An array framework for Apple silicon

2.8 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of ml-explore/mlx, a C++ project with 27,543 GitHub stars. SynthScan v2.0 examined 194,324 lines of code across 652 source files, recording 550 pattern matches distributed across 13 syntactic categories. The overall adjusted score of 2.8 places this repository in the Likely human-written 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).

2.8
Adjusted Score
2.8
Raw Score
100%
Time Factor
2026-07-13
Last Push
27.5K
Stars
C++
Language
194.3K
Lines of Code
652
Files
550
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 8MEDIUM 15LOW 527

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 550 distinct pattern matches across 13 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 Identifiers189 hits · 168 pts
SeverityFileLineSnippetContext
LOWsetup.py17def cuda_toolkit_major_version():CODE
LOWpython/tests/test_fast_sdpa.py120 def test_sdpa_vector_kv_transposed_head_seq(self):CODE
LOWpython/tests/test_fast_sdpa.py307 def test_sdpa_vector_value_dims(self):CODE
LOWpython/tests/test_fast_sdpa.py448 def test_sdpa_long_masked_sequence(self):CODE
LOWpython/tests/test_fast_sdpa.py501 def test_sdpa_noncontiguous_inputs(self):CODE
LOWpython/tests/test_fast_sdpa.py556 def test_sdpa_attention_sinks(self):CODE
LOWpython/tests/test_losses.py79 def test_binary_cross_entropy(self):CODE
LOWpython/tests/test_losses.py138 def _test_tiny_probs_as_inputs():CODE
LOWpython/tests/test_losses.py430 def test_cosine_similarity_loss(self):CODE
LOWpython/tests/test_fast.py187 def test_rope_dims_validation(self):CODE
LOWpython/tests/test_fast.py405 def test_rope_with_large_offset(self):CODE
LOWpython/tests/test_fast.py528 def test_layer_norm_dim_check(self):CODE
LOWpython/tests/test_fast.py625 def test_slice_into_layer_norm(self):CODE
LOWpython/tests/test_fast.py676 def test_layer_norm_grad_no_bias(self):CODE
LOWpython/tests/test_fast.py712 def test_layer_norm_grad_no_params(self):CODE
LOWpython/tests/test_fast.py723 def test_layer_norm_grad_params(self):CODE
LOWpython/tests/test_fast.py869 def test_custom_kernel_strides(self):STRING
LOWpython/tests/test_fast.py923 def test_custom_kernel_helper(self):STRING
LOWpython/tests/test_fast.py969 def test_custom_kernel_attributes(self):STRING
LOWpython/tests/test_fast.py995 def test_custom_kernel_caching(self):STRING
LOWpython/tests/test_fast.py1030 def test_custom_metal_kernel_math_mode(self):STRING
LOWpython/tests/test_fast.py1091 def test_custom_kernel_mixed_dtypes(self):STRING
LOWpython/tests/test_array.py260 def test_list_not_equals_array(self):CODE
LOWpython/tests/test_array.py283 def test_tuple_not_equals_array(self):CODE
LOWpython/tests/test_array.py293 def test_obj_inequality_array(self):CODE
LOWpython/tests/test_array.py453 def test_construction_from_lists(self):CODE
LOWpython/tests/test_array.py509 def test_double_keeps_precision(self):CODE
LOWpython/tests/test_array.py517 def test_construction_from_lists_of_mlx_arrays(self):CODE
LOWpython/tests/test_array.py676 def test_array_repr_precision(self):CODE
LOWpython/tests/test_array.py805 def test_array_np_dtype_conversion(self):CODE
LOWpython/tests/test_array.py837 def test_array_from_noncontiguous_np(self):CODE
LOWpython/tests/test_array.py844 def test_array_np_shape_dim_check(self):CODE
LOWpython/tests/test_array.py896 def test_dtype_python_scalar_promotion(self):CODE
LOWpython/tests/test_array.py1551 def test_array_at_slice_update_extensive(self):CODE
LOWpython/tests/test_array.py1806 def test_np_array_conversion_copies_by_default(self):CODE
LOWpython/tests/test_array.py1888 def test_buffer_protocol_ref_counting(self):CODE
LOWpython/tests/test_array.py1898 def test_array_view_ref_counting(self):CODE
LOWpython/tests/test_array.py2045 def test_inplace_preserves_ids(self):CODE
LOWpython/tests/test_array.py2060 def test_load_from_pickled_np(self):CODE
LOWpython/tests/test_array.py2143 def test_dlpack_cpu_dtype_mapping(self):CODE
LOWpython/tests/test_array.py2209 def test_from_dlpack_cpu_strided(self):CODE
LOWpython/tests/test_array.py2240 def test_torch_mps_dlpack_import(self):CODE
LOWpython/tests/test_array.py2254 def test_torch_mps_array_copies_dlpack_input(self):CODE
LOWpython/tests/test_array.py2265 def test_torch_mps_asarray_copy_true_copies_dlpack_input(self):CODE
LOWpython/tests/test_array.py2276 def test_torch_mps_dlpack_zero_copy_shares_updates(self):CODE
LOWpython/tests/test_array.py2291 def test_torch_mps_dlpack_matching_dtype_argument_shares_updates(self):CODE
LOWpython/tests/test_array.py2303 def test_torch_mps_dlpack_different_dtype_argument_copies(self):CODE
LOWpython/tests/test_array.py2321 def test_torch_mps_dlpack_data_offset(self):CODE
LOWpython/tests/test_array.py2329 def test_torch_mps_dlpack_strided_view(self):CODE
LOWpython/tests/test_array.py2358 def test_torch_mps_dlpack_stepped_view(self):CODE
LOWpython/tests/test_array.py2376 def test_torch_mps_dlpack_broadcast_stride(self):CODE
LOWpython/tests/test_array.py2403 def test_torch_mps_array_operand(self):CODE
LOWpython/tests/test_array.py2414 def test_mlx_dlpack_exports_mps_tensor_to_torch(self):CODE
LOWpython/tests/test_array.py2426 def test_mlx_dlpack_exports_mps_tensor_to_torch_tensor(self):CODE
LOWpython/tests/test_array.py2438 def test_mlx_dlpack_export_torch_update_writes_mlx_buffer(self):CODE
LOWpython/tests/test_array.py2453 def test_from_dlpack_torch_mps_copy_none_shares_updates(self):CODE
LOWpython/tests/test_array.py2468 def test_from_dlpack_torch_mps_copy_false_shares_updates(self):CODE
LOWpython/tests/test_array.py2479 def test_from_dlpack_torch_mps_copy_true_copies(self):CODE
LOWpython/tests/test_array.py2551 def test_setitem_with_boolean_mask(self):CODE
LOWpython/tests/test_array.py2588 def test_array_namespace_asarray(self):CODE
129 more matches not shown…
Over-Commented Block123 hits · 123 pts
SeverityFileLineSnippetContext
LOWsetup.py261 install_requires = []COMMENT
LOWpython/src/ops.cpp1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWpython/src/utils.h1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWpython/src/distributed.cpp1// Copyright © 2024 Apple Inc.COMMENT
LOWpython/src/transforms.cpp1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWpython/src/fast.cpp1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWpython/src/convert.cpp1// Copyright © 2024 Apple Inc.COMMENT
LOWpython/src/load.h1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWpython/src/fft.cpp1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWpython/src/array.cpp1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWpython/src/export.cpp1// Copyright © 2024 Apple Inc.COMMENT
LOWpython/src/buffer.h1// Copyright © 2024 Apple Inc.COMMENT
LOWpython/src/load.cpp1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWpython/src/metal.cpp1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWtests/allocator_tests.cpp1// Copyright © 2023-2026 Apple Inc.COMMENT
LOWtests/random_tests.cpp281 key = array({0u, 0u, 0u}, {3, 1});COMMENT
LOWtests/gpu_tests.cpp641 // LayerNormVJP::eval_gpu (mlx/backend/metal/normalization.cpp).COMMENT
LOWtests/autograd_tests.cpp1// Copyright © 2023 Apple Inc.COMMENT
LOWexamples/extensions/axpby/axpby.cpp1// Copyright © 2023-2025 Apple Inc.COMMENT
LOWmlx/mlx.h1// Copyright © 2023 Apple Inc.COMMENT
LOWmlx/mlx.h21#include "mlx/random.h"COMMENT
LOWmlx/ops.cpp1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWmlx/utils.h1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWmlx/transforms.cpp1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWmlx/transforms.cpp1021 // We use the passed vjp function or compute it from the inputs andCOMMENT
LOWmlx/threadpool.h1// This code was modified from https://github.com/progschj/ThreadPoolCOMMENT
LOWmlx/threadpool.h21// 3. This notice may not be removed or altered from any sourceCOMMENT
LOWmlx/small_vector.h1// Copyright © 2025 Apple Inc.COMMENT
LOWmlx/small_vector.h21// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHTCOMMENT
LOWmlx/small_vector.h41#elseCOMMENT
LOWmlx/small_vector.h81// Minimal SmallVector implementation. Uses inline storage first, switches toCOMMENT
LOWmlx/scheduler.h1// Copyright © 2023 Apple Inc.COMMENT
LOWmlx/api.h1// Copyright © 2024 Apple Inc.COMMENT
LOWmlx/api.h21#define MLX_API __declspec(dllexport)COMMENT
LOWmlx/export.cpp1// Copyright © 2024 Apple Inc.COMMENT
LOWmlx/compile.cpp1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWmlx/compile.cpp801 // Go through the tape in reverse order and check for fusable sub-graphsCOMMENT
LOWmlx/stream.cpp1// Copyright © 2026 Apple Inc.COMMENT
LOWmlx/primitives.cpp1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWmlx/primitives.cpp5701 // - tm = (K + block_size - 1) // block_size; KP = tk * block_size;COMMENT
LOWmlx/array.h1// Copyright © 2023 Apple Inc.COMMENT
LOWmlx/graph_utils.cpp1// Copyright © 2023 Apple Inc.COMMENT
LOWmlx/einsum.cpp1// Copyright © 2024 Apple Inc.COMMENT
LOWmlx/distributed/jaccl/lib/jaccl/mesh_impl.h81 buff++;COMMENT
LOWmlx/distributed/jaccl/lib/examples/allreduce_bench.cpp1// Copyright © 2025 Apple Inc.COMMENT
LOWmlx/distributed/jaccl/lib/examples/allreduce_bench.cpp21//COMMENT
LOWmlx/distributed/jaccl/lib/examples/CMakeLists.txt1cmake_minimum_required(VERSION 3.24)COMMENT
LOWmlx/distributed/nccl/nccl.cpp1// NCCL distributed support currently requires Unix socket APIsCOMMENT
LOWmlx/distributed/mpi/mpi_declarations.h1// Copyright © 2024 Apple Inc.COMMENT
LOWmlx/distributed/ring/ring.cpp1// Copyright © 2024 Apple Inc.COMMENT
LOWmlx/io/load.h1// Copyright © 2023 Apple Inc.COMMENT
LOWmlx/io/safetensors.cpp1// Copyright © 2023 Apple Inc.COMMENT
LOWmlx/io/safetensors.cpp21#define ST_BOOL "BOOL"COMMENT
LOWmlx/io/load.cpp1// Copyright © 2023-2026 Apple Inc.COMMENT
LOWmlx/backend/gpu/primitives.cpp1// Copyright © 2025 Apple Inc.COMMENT
LOWmlx/backend/metal/quantized.cpp1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWmlx/backend/metal/distributed.cpp1// Copyright © 2024 Apple Inc.COMMENT
LOWmlx/backend/metal/device.h1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWmlx/backend/metal/matmul.cpp1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWmlx/backend/metal/compiled.cpp1// Copyright © 2023-2024 Apple Inc.COMMENT
63 more matches not shown…
Unused Imports151 hits · 111 pts
SeverityFileLineSnippetContext
LOWpython/tests/test_fast_sdpa.py8CODE
LOWpython/tests/test_linalg.py5CODE
LOWpython/tests/test_conv_transpose.py5CODE
LOWpython/tests/test_tree.py3CODE
LOWpython/tests/test_losses.py3CODE
LOWpython/tests/test_double.py4CODE
LOWpython/tests/test_double.py5CODE
LOWpython/tests/test_array.py4CODE
LOWpython/tests/test_optimizers.py18CODE
LOWpython/tests/test_nn.py5CODE
LOWpython/tests/test_quantized.py3CODE
LOWpython/tests/test_blas.py4CODE
LOWpython/tests/test_blas.py5CODE
LOWpython/tests/test_threads.py4CODE
LOWpython/tests/test_reduce.py3CODE
LOWpython/tests/test_bf16.py3CODE
LOWpython/tests/test_bf16.py5CODE
LOWpython/tests/test_einsum.py3CODE
LOWpython/tests/test_graph.py4CODE
LOWpython/tests/test_init.py3CODE
LOWpython/tests/test_constants.py3CODE
LOWpython/tests/test_vmap.py4CODE
LOWpython/tests/test_eval.py4CODE
LOWpython/tests/test_random.py4CODE
LOWpython/tests/test_conv.py6CODE
LOWpython/mlx/nn/__init__.py3CODE
LOWpython/mlx/nn/__init__.py3CODE
LOWpython/mlx/nn/__init__.py4CODE
LOWpython/mlx/nn/__init__.py5CODE
LOWpython/mlx/nn/__init__.py5CODE
LOWpython/mlx/nn/__init__.py5CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
91 more matches not shown…
Deep Nesting46 hits · 46 pts
SeverityFileLineSnippetContext
LOWpython/tests/test_fast_sdpa.py364CODE
LOWpython/tests/test_fast_sdpa.py653CODE
LOWpython/tests/test_linalg.py13CODE
LOWpython/tests/test_linalg.py88CODE
LOWpython/tests/test_upsample.py21CODE
LOWpython/tests/test_fast.py383CODE
LOWpython/tests/test_double.py115CODE
LOWpython/tests/test_array.py1812CODE
LOWpython/tests/test_export_import.py501CODE
LOWpython/tests/test_export_import.py513CODE
LOWpython/tests/test_fft.py62CODE
LOWpython/tests/test_blas.py311CODE
LOWpython/tests/test_blas.py488CODE
LOWpython/tests/test_blas.py1242CODE
LOWpython/tests/mpi_test_distributed.py31CODE
LOWpython/tests/test_reduce.py12CODE
LOWpython/tests/test_reduce.py29CODE
LOWpython/tests/test_reduce.py50CODE
LOWpython/tests/test_reduce.py86CODE
LOWpython/tests/test_reduce.py156CODE
LOWpython/tests/test_bf16.py127CODE
LOWpython/tests/test_ops.py1639CODE
LOWpython/tests/test_ops.py1706CODE
LOWpython/tests/test_ops.py1801CODE
LOWpython/tests/test_ops.py2450CODE
LOWpython/tests/test_autograd.py823CODE
LOWpython/tests/test_load.py41CODE
LOWpython/tests/test_load.py91CODE
LOWpython/tests/test_load.py132CODE
LOWpython/tests/test_load.py385CODE
LOWpython/tests/test_load.py423CODE
LOWpython/mlx/nn/layers/quantized.py22CODE
LOWpython/mlx/nn/layers/quantized.py69CODE
LOWpython/mlx/nn/layers/base.py619CODE
LOWpython/mlx/nn/layers/base.py656CODE
LOWpython/mlx/nn/layers/base.py304CODE
LOWpython/mlx/nn/layers/base.py325CODE
LOWpython/mlx/_distributed_utils/config.py337CODE
LOWpython/mlx/_distributed_utils/config.py486CODE
LOWpython/mlx/_distributed_utils/config.py515CODE
LOWpython/mlx/_distributed_utils/launch.py170CODE
LOWpython/mlx/_distributed_utils/launch.py457CODE
LOWpython/mlx/optimizers/optimizers.py31CODE
LOWpython/mlx/optimizers/optimizers.py53CODE
LOWexamples/python/qqmm.py22CODE
LOWbenchmarks/python/hadamard_bench.py22CODE
Docstring Block Structure4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHpython/mlx/nn/losses.py31 Computes the cross entropy loss. Args: logits (array): The unnormalized logits. targets (arraySTRING
HIGHpython/mlx/nn/losses.py127 Computes the binary cross entropy loss. By default, this function takes the pre-sigmoid logits, which results STRING
HIGHpython/mlx/nn/losses.py569 Calculate the margin ranking loss that loss given inputs :math:`x_1`, :math:`x_2` and a label :math:`y` (contaiSTRING
HIGHpython/mlx/nn/layers/linear.py80Return a quantized approximation of this layer. If ``quantize_input`` is ``False``, returns a :obj:`QuantizedLiSTRING
Cross-Language Confusion4 hits · 16 pts
SeverityFileLineSnippetContext
HIGHpython/mlx/_distributed_utils/launch.py159 script += "if ps -p $pid >/dev/null; then "CODE
HIGHpython/mlx/_distributed_utils/common.py51 {"ssh": "hostname1", "ips": ["123.123.123.1"], "rdma": [null, "rdma_en2", "rdma_en3"]},STRING
HIGHpython/mlx/_distributed_utils/common.py52 {"ssh": "hostname2", "ips": ["123.123.123.2"], "rdma": ["rdma_en2", null, "rdma_en3"]},STRING
HIGHpython/mlx/_distributed_utils/common.py54 {"ssh": "hostnameN", "ips": ["123.123.123.N"], "rdma": ["rdma_en2", "rdma_en3", null]},STRING
Excessive Try-Catch Wrapping11 hits · 15 pts
SeverityFileLineSnippetContext
MEDIUMpython/tests/test_compile.py82def worker():CODE
LOWpython/tests/test_compile.py88 except Exception as e:CODE
LOWpython/tests/test_threads.py75 except Exception as e:CODE
LOWpython/tests/test_threads.py87 except Exception as e:CODE
LOWpython/tests/test_threads.py99 except Exception as e:CODE
MEDIUMpython/tests/test_threads.py66def grad_worker():CODE
MEDIUMpython/tests/test_threads.py78def compile_worker():CODE
MEDIUMpython/tests/test_threads.py90def vmap_worker():CODE
LOWpython/mlx/_distributed_utils/common.py85 except Exception as e:CODE
LOWbenchmarks/python/masked_scatter.py36 except Exception:CODE
LOWbenchmarks/python/masked_scatter.py45 except Exception:CODE
Dead Code7 hits · 14 pts
SeverityFileLineSnippetContext
MEDIUMpython/tests/test_einsum.py192CODE
MEDIUMpython/tests/test_einsum.py193CODE
MEDIUMpython/tests/test_einsum.py195CODE
MEDIUMpython/tests/test_einsum.py196CODE
MEDIUMpython/tests/test_einsum.py197CODE
MEDIUMpython/tests/test_einsum.py198CODE
MEDIUMpython/tests/test_einsum.py199CODE
Self-Referential Comments3 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMpython/mlx/utils.py162 # Create the function to update the destination. We are taking advantage ofCOMMENT
MEDIUMpython/mlx/_distributed_utils/config.py256 # Create a reverse index to be able to map uuids to (host, port) quicklyCOMMENT
MEDIUMpython/src/stream.cpp175 # Create a context manager for the default device and stream.COMMENT
Redundant / Tautological Comments5 hits · 8 pts
SeverityFileLineSnippetContext
LOWsetup.py147 # Set CMAKE_BUILD_PARALLEL_LEVEL to control the parallel build levelCOMMENT
LOWpython/tests/test_constants.py12 # Check if mlx constants match expected valuesCOMMENT
LOWpython/tests/test_constants.py25 # Check if mlx constants are availableCOMMENT
LOWpython/mlx/extension.py53 # Set CMAKE_BUILD_PARALLEL_LEVEL to control the parallel build levelCOMMENT
LOWpython/mlx/_distributed_utils/launch.py267 # Check if all are running and terminate otherwiseCOMMENT
AI Structural Patterns5 hits · 5 pts
SeverityFileLineSnippetContext
LOWpython/tests/test_quantized.py946CODE
LOWpython/tests/test_blas.py1060CODE
LOWpython/tests/test_conv.py701CODE
LOWpython/mlx/nn/layers/transformer.py314CODE
LOWpython/mlx/optimizers/optimizers.py742CODE
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMmlx/distributed/jaccl/lib/jaccl/rdma.h337 // Twice has proven to be more robust to initialization issues.COMMENT
Modern Structural Boilerplate1 hit · 1 pts
SeverityFileLineSnippetContext
LOWpython/mlx/nn/layers/base.py569 def _set_training_mode(self, mode: bool) -> None:CODE