Repository Analysis

NVIDIA/apex

A PyTorch Extension: Tools for easy mixed precision and distributed training in Pytorch

8.7 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of NVIDIA/apex, a Python project with 8,986 GitHub stars. SynthScan v2.0 examined 53,749 lines of code across 243 source files, recording 404 pattern matches distributed across 16 syntactic categories. The overall adjusted score of 8.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).

8.7
Adjusted Score
8.7
Raw Score
100%
Time Factor
2026-07-31
Last Push
9.0K
Stars
Python
Language
53.7K
Lines of Code
243
Files
404
Pattern Hits
2026-08-02
Scan Date
0.05
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

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

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 12MEDIUM 14LOW 378

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 404 distinct pattern matches across 16 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 Identifiers147 hits · 156 pts
SeverityFileLineSnippetContext
LOWsetup.py65def get_cuda_bare_metal_version(cuda_dir):CODE
LOWsetup.py74def check_cuda_torch_binary_vs_bare_metal(cuda_dir):CODE
LOWsetup.py102def check_cudnn_version_and_warn(global_option: str, required_cudnn_version: int) -> bool:CODE
LOWapex/__init__.py21def check_cudnn_version_and_warn(global_option: str, required_cudnn_version: int) -> bool:CODE
LOWapex/_autocast_utils.py22def _cast_if_autocast_enabled(*args):CODE
LOWapex/normalization/fused_layer_norm.py80 def fused_layer_norm_affine_fwd(CODE
LOWapex/normalization/fused_layer_norm.py101 def fused_layer_norm_affine_fwd_fake(CODE
LOWapex/normalization/fused_layer_norm.py125 def fused_layer_norm_affine_bwd(CODE
LOWapex/normalization/fused_layer_norm.py150 def fused_layer_norm_affine_bwd_fake(CODE
LOWapex/normalization/fused_layer_norm.py166 def _fused_layer_norm_affine_backward(ctx, grad_output, grad_mean, grad_invvar):CODE
LOWapex/normalization/fused_layer_norm.py182 def _fused_layer_norm_affine_setup_context(ctx, inputs, output):CODE
LOWapex/normalization/fused_layer_norm.py241 def fused_rms_norm_affine_fwd(CODE
LOWapex/normalization/fused_layer_norm.py260 def fused_rms_norm_affine_fwd_fake(CODE
LOWapex/normalization/fused_layer_norm.py289 def fused_rms_norm_affine_bwd(CODE
LOWapex/normalization/fused_layer_norm.py310 def fused_rms_norm_affine_bwd_fake(CODE
LOWapex/normalization/fused_layer_norm.py323 def _fused_rms_norm_affine_backward(ctx, grad_output, grad_invvar):CODE
LOWapex/normalization/fused_layer_norm.py337 def _fused_rms_norm_affine_setup_context(ctx, inputs, output):CODE
LOWapex/normalization/fused_layer_norm.py449 def fused_layer_norm_fwd_fake(CODE
LOWapex/normalization/fused_layer_norm.py490 def fused_layer_norm_bwd_fake(CODE
LOWapex/normalization/fused_layer_norm.py502 def _fused_layer_norm_backward(ctx, grad_output, grad_mean, grad_invvar):CODE
LOWapex/normalization/fused_layer_norm.py515 def _fused_layer_norm_setup_context(ctx, inputs, output):CODE
LOWapex/normalization/fused_layer_norm.py653 def _fused_rms_norm_setup_context(ctx, inputs, output):CODE
LOWapex/normalization/fused_layer_norm.py690def mixed_dtype_fused_layer_norm_affine(CODE
LOWapex/normalization/fused_layer_norm.py716def mixed_dtype_fused_rms_norm_affine(CODE
LOWapex/contrib/sparsity/asp.py269 def init_optimizer_for_pruning(cls, optimizer):CODE
LOWapex/contrib/sparsity/asp.py444 def set_permutation_saving_params(CODE
LOWapex/contrib/sparsity/permutation_lib.py1999 def trace_and_print_raw_fx_graph(cls, model, print_tabular=False, generate_python_code=False):CODE
LOWapex/contrib/sparsity/permutation_lib.py196 def set_permutation_saving_params(CODE
LOWapex/contrib/sparsity/permutation_lib.py214 def set_permutation_params_from_asp(cls, model, sparse_parameters, all_parameters, verbosity):CODE
LOWapex/contrib/sparsity/permutation_lib.py566 def check_graph_for_unpermuted_nodes(cls, fx_graph):CODE
LOWapex/contrib/sparsity/permutation_lib.py624 def find_sparse_parameters_for_node(cls, node_name):CODE
LOWapex/contrib/sparsity/permutation_lib.py661 def find_permutation_for_matrix_group(cls, matrix_group):CODE
LOWapex/contrib/sparsity/permutation_lib.py808 def find_sibling_group_permutation(cls, fx_graph, sibling_group_id):CODE
LOWapex/contrib/sparsity/permutation_lib.py1152 def init_grouped_conv_permutation_flags(fx_graph, node_name, node_groups, verbosity):CODE
LOWapex/contrib/sparsity/permutation_lib.py1491 def enforce_dimension_agreement(cls, fx_graph):CODE
LOWapex/contrib/sparsity/permutation_lib.py1543 def make_sibling_coparent_groups(cls, fx_graph):CODE
LOWapex/contrib/sparsity/permutation_lib.py1596 def propagate_permutation_flags(cls, fx_graph):CODE
LOW…arsity/permutation_search_kernels/exhaustive_search.py36def generate_unique_combinations(CODE
LOW…arsity/permutation_search_kernels/exhaustive_search.py76def generate_all_unique_combinations(C, M, must_use_all_groups=False):CODE
LOW…arsity/permutation_search_kernels/exhaustive_search.py102def predict_unique_combinations(C, M):CODE
LOW…arsity/permutation_search_kernels/exhaustive_search.py166def apply_stripe_group_permutation(sgp, stripes, group_width, permutation):CODE
LOW…ib/sparsity/permutation_search_kernels/channel_swap.py30def stripes_and_swap_idx_to_columns(stripe0, stripe1, idx):CODE
LOW…ib/sparsity/permutation_search_kernels/channel_swap.py41def columns_to_stripes_and_swap_idx(col0, col1):CODE
LOW…tion_search_kernels/call_permutation_search_kernels.py6def accelerated_search_for_good_permutation(matrix_group, options=None, verbosity=0):CODE
LOW…ty/permutation_search_kernels/permutation_utilities.py127def magnitude_after_pruning_rows(matrix, rate=0.5):CODE
LOW…ty/permutation_search_kernels/permutation_utilities.py144def try_permutations_on_matrix(matrix, permutations):CODE
LOWapex/contrib/test/xentropy/test_label_smoothing.py68 def _test_label_smoothing_function(self, dtype):CODE
LOWapex/contrib/test/xentropy/test_label_smoothing.py107 def test_label_smoothing_perf(self):CODE
LOWapex/contrib/test/layer_norm/test_fast_layer_norm.py272 def test_compat_with_autocast(self):CODE
LOW…contrib/test/optimizers/test_distributed_fused_lamb.py73 def test_distributed_fused_lamb(self, no_copy, opt_kwargs):CODE
LOWapex/contrib/test/optimizers/test_dist_adam.py270 def test_matches_pytorch_no_overlap(self):CODE
LOWapex/contrib/test/optimizers/test_dist_adam.py276 def test_matches_pytorch_sync_every_step(self):CODE
LOWapex/contrib/test/optimizers/test_dist_adam.py279 def test_matches_pytorch_contiguous_buffers(self):CODE
LOWapex/contrib/test/optimizers/test_dist_adam.py341 def test_matches_pytorch_multi_dtypes(self):CODE
LOWapex/contrib/test/optimizers/test_dist_adam.py374 def test_matches_pytorch_scaled_state(self):CODE
LOWapex/contrib/test/optimizers/test_dist_adam.py386 def test_matches_pytorch_nccl_ub(self):CODE
LOWapex/contrib/test/optimizers/test_dist_adam.py785 def test_checkpoint_scaled_state(self):CODE
LOWapex/contrib/test/optimizers/test_dist_adam.py806 def test_bucket_low_utilization_warning(self):CODE
LOWapex/contrib/test/bottleneck/test_bottleneck_module.py119def apply_to_different_bottleneck(gt, bottleneck):CODE
LOWapex/contrib/test/bottleneck/test_bottleneck_module.py151def spatial_parallel_bottleneck(C, dtype, explicit_nhwc, gt_bottleneck, spatial_parallel_args):CODE
87 more matches not shown…
Unused Imports79 hits · 78 pts
SeverityFileLineSnippetContext
LOWapex/__init__.py1CODE
LOWapex/__init__.py14CODE
LOWapex/__init__.py15CODE
LOWapex/distributed_testing/__init__.py3CODE
LOWapex/distributed_testing/__init__.py3CODE
LOWapex/distributed_testing/__init__.py3CODE
LOWapex/distributed_testing/_ucc_util.py6CODE
LOWapex/normalization/__init__.py1CODE
LOWapex/normalization/__init__.py1CODE
LOWapex/normalization/__init__.py1CODE
LOWapex/normalization/__init__.py1CODE
LOWapex/fused_dense/__init__.py1CODE
LOWapex/multi_tensor_apply/multi_tensor_apply.py7CODE
LOWapex/contrib/index_mul_2d/__init__.py1CODE
LOWapex/contrib/sparsity/__init__.py1CODE
LOWapex/contrib/sparsity/__init__.py2CODE
LOWapex/contrib/sparsity/permutation_lib.py2034CODE
LOW…arsity/permutation_search_kernels/exhaustive_search.py1CODE
LOW…ib/sparsity/permutation_search_kernels/channel_swap.py1CODE
LOW…tion_search_kernels/call_permutation_search_kernels.py2CODE
LOW…ontrib/sparsity/permutation_search_kernels/__init__.py1CODE
LOW…ontrib/sparsity/permutation_search_kernels/__init__.py2CODE
LOW…contrib/sparsity/permutation_tests/permutation_test.py7CODE
LOWapex/contrib/groupbn/__init__.py4CODE
LOWapex/contrib/cudnn_gbn/__init__.py1CODE
LOWapex/contrib/xentropy/__init__.py1CODE
LOWapex/contrib/torchsched/backend.py3CODE
LOWapex/contrib/torchsched/__init__.py3CODE
LOWapex/contrib/torchsched/inductor/wrapper.py12CODE
LOWapex/contrib/torchsched/inductor/event.py12CODE
LOWapex/contrib/torchsched/inductor/graph.py3CODE
LOWapex/contrib/torchsched/inductor/__init__.py3CODE
LOWapex/contrib/torchsched/inductor/scheduler.py3CODE
LOWapex/contrib/torchsched/inductor/scheduler.py16CODE
LOWapex/contrib/torchsched/inductor/scheduler.py17CODE
LOWapex/contrib/torchsched/inductor/scheduler.py33CODE
LOWapex/contrib/torchsched/inductor/_utils.py1CODE
LOWapex/contrib/torchsched/passes/__init__.py3CODE
LOWapex/contrib/torchsched/passes/__init__.py5CODE
LOWapex/contrib/torchsched/passes/pre_grad_passes.py3CODE
LOWapex/contrib/torchsched/ops/layer_norm.py8CODE
LOWapex/contrib/layer_norm/__init__.py1CODE
LOWapex/contrib/nccl_allocator/__init__.py1CODE
LOWapex/contrib/optimizers/__init__.py1CODE
LOWapex/contrib/optimizers/__init__.py2CODE
LOWapex/contrib/optimizers/__init__.py3CODE
LOWapex/contrib/bottleneck/__init__.py1CODE
LOWapex/contrib/bottleneck/__init__.py1CODE
LOWapex/contrib/bottleneck/__init__.py2CODE
LOWapex/contrib/bottleneck/__init__.py2CODE
LOWapex/contrib/bottleneck/__init__.py2CODE
LOWapex/contrib/bottleneck/__init__.py2CODE
LOWapex/contrib/conv_bias_relu/__init__.py1CODE
LOWapex/contrib/conv_bias_relu/__init__.py1CODE
LOWapex/contrib/conv_bias_relu/__init__.py1CODE
LOWapex/contrib/conv_bias_relu/__init__.py1CODE
LOWapex/contrib/group_norm/__init__.py1CODE
LOWapex/contrib/clip_grad/__init__.py1CODE
LOWapex/contrib/transducer/__init__.py1CODE
LOWapex/contrib/transducer/__init__.py2CODE
19 more matches not shown…
Deep Nesting76 hits · 60 pts
SeverityFileLineSnippetContext
LOWapex/contrib/sparsity/asp.py39CODE
LOWapex/contrib/sparsity/asp.py314CODE
LOWapex/contrib/sparsity/asp.py390CODE
LOWapex/contrib/sparsity/permutation_lib.py341CODE
LOWapex/contrib/sparsity/permutation_lib.py442CODE
LOWapex/contrib/sparsity/permutation_lib.py482CODE
LOWapex/contrib/sparsity/permutation_lib.py566CODE
LOWapex/contrib/sparsity/permutation_lib.py624CODE
LOWapex/contrib/sparsity/permutation_lib.py762CODE
LOWapex/contrib/sparsity/permutation_lib.py914CODE
LOWapex/contrib/sparsity/permutation_lib.py991CODE
LOWapex/contrib/sparsity/permutation_lib.py1026CODE
LOWapex/contrib/sparsity/permutation_lib.py1183CODE
LOWapex/contrib/sparsity/permutation_lib.py1324CODE
LOWapex/contrib/sparsity/permutation_lib.py1362CODE
LOWapex/contrib/sparsity/permutation_lib.py1392CODE
LOWapex/contrib/sparsity/permutation_lib.py1491CODE
LOWapex/contrib/sparsity/permutation_lib.py1543CODE
LOWapex/contrib/sparsity/permutation_lib.py1596CODE
LOWapex/contrib/sparsity/permutation_lib.py1776CODE
LOWapex/contrib/sparsity/sparse_masklib.py86CODE
LOWapex/contrib/sparsity/sparse_masklib.py176CODE
LOW…arsity/permutation_search_kernels/exhaustive_search.py296CODE
LOW…ib/sparsity/permutation_search_kernels/channel_swap.py94CODE
LOW…ib/sparsity/permutation_search_kernels/channel_swap.py141CODE
LOW…tion_search_kernels/call_permutation_search_kernels.py6CODE
LOW…ty/permutation_search_kernels/permutation_utilities.py286CODE
LOW…ty/permutation_search_kernels/permutation_utilities.py415CODE
LOW…ty/permutation_search_kernels/permutation_utilities.py558CODE
LOW…/contrib/sparsity/test/test_permutation_application.py783CODE
LOW…/contrib/sparsity/test/test_permutation_application.py24CODE
LOWapex/contrib/test/optimizers/test_dist_adam.py122CODE
LOWapex/contrib/test/bottleneck/test_bottleneck_module.py35CODE
LOWapex/contrib/torchsched/inductor/scheduler.py123CODE
LOWapex/contrib/torchsched/inductor/scheduler.py415CODE
LOWapex/contrib/nccl_allocator/nccl_allocator.py50CODE
LOWapex/contrib/optimizers/fused_adam.py78CODE
LOWapex/contrib/optimizers/distributed_fused_adam.py540CODE
LOWapex/contrib/optimizers/distributed_fused_adam.py938CODE
LOWapex/contrib/optimizers/distributed_fused_adam.py1551CODE
LOWapex/contrib/optimizers/distributed_fused_adam.py1600CODE
LOWapex/contrib/optimizers/distributed_fused_adam.py1827CODE
LOWapex/contrib/optimizers/distributed_fused_adam.py1877CODE
LOWapex/contrib/optimizers/distributed_fused_adam.py2032CODE
LOWapex/contrib/optimizers/distributed_fused_adam.py2124CODE
LOWapex/contrib/optimizers/distributed_fused_adam.py2150CODE
LOWapex/contrib/optimizers/distributed_fused_adam.py2368CODE
LOWapex/contrib/optimizers/distributed_fused_adam.py2505CODE
LOWapex/contrib/optimizers/distributed_fused_adam.py2907CODE
LOWapex/contrib/optimizers/distributed_fused_adam.py3059CODE
LOWapex/contrib/optimizers/distributed_fused_adam.py3397CODE
LOWapex/contrib/optimizers/distributed_fused_adam.py3161CODE
LOWapex/contrib/optimizers/fp16_optimizer.py82CODE
LOWapex/contrib/optimizers/fused_lamb.py110CODE
LOWapex/contrib/optimizers/distributed_fused_lamb.py99CODE
LOWapex/contrib/optimizers/distributed_fused_lamb.py387CODE
LOWapex/contrib/optimizers/distributed_fused_lamb.py586CODE
LOWapex/contrib/optimizers/distributed_fused_lamb.py943CODE
LOWapex/contrib/optimizers/distributed_fused_lamb.py1070CODE
LOWapex/contrib/optimizers/distributed_fused_lamb.py1206CODE
16 more matches not shown…
Cross-File Repetition10 hits · 50 pts
SeverityFileLineSnippetContext
HIGHapex/contrib/optimizers/fused_lamb.py0implements lamb algorithm. currently gpu-only. requires apex to be installed via ``pip install -v --no-cache-dir --globaSTRING
HIGHapex/contrib/optimizers/distributed_fused_lamb.py0implements lamb algorithm. currently gpu-only. requires apex to be installed via ``pip install -v --no-cache-dir --globaSTRING
HIGHapex/optimizers/fused_lamb.py0implements lamb algorithm. currently gpu-only. requires apex to be installed via ``pip install -v --no-cache-dir --globaSTRING
HIGHapex/contrib/optimizers/fused_lamb.py0performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and rSTRING
HIGHapex/optimizers/fused_novograd.py0performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and rSTRING
HIGHapex/optimizers/fused_adagrad.py0performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and rSTRING
HIGHapex/optimizers/fused_lamb.py0performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and rSTRING
HIGHapex/optimizers/fused_sgd.py0performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and rSTRING
HIGHtests/L0/run_optimizers/test_lamb.py0performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and rSTRING
HIGHtests/L0/run_optimizers/test_fused_novograd.py0performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and rSTRING
Over-Commented Block23 hits · 23 pts
SeverityFileLineSnippetContext
LOWcsrc/type_shim.h1#include <ATen/ATen.h>COMMENT
LOWcsrc/static_switch.h1// FromCOMMENT
LOWcsrc/syncbn.cpp1#include <ATen/ATen.h>COMMENT
LOWapex/contrib/csrc/groupbn/interface.cpp1#include <ATen/ATen.h>COMMENT
LOWapex/contrib/csrc/groupbn/nhwc_batch_norm_kernel.h861 // Clamp thread_c so that we load from valid locations even if we don't use the valueCOMMENT
LOWapex/contrib/csrc/cudnn_gbn/norm_sample.h21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHERCOMMENT
LOWapex/contrib/csrc/bottleneck/bottleneck.cpp1#include <ATen/ATen.h>COMMENT
LOWapex/contrib/csrc/conv_bias_relu/conv_bias_relu.cpp1#include <ATen/ATen.h>COMMENT
LOWapex/contrib/csrc/group_norm/traits.h1/*COMMENT
LOW…contrib/csrc/group_norm/group_norm_nhwc_fwd_one_pass.h1/*COMMENT
LOW…contrib/csrc/group_norm/group_norm_nhwc_bwd_one_pass.h1/*COMMENT
LOW…arsity/permutation_search_kernels/exhaustive_search.py1from .permutation_utilities import *COMMENT
LOWapex/contrib/test/bottleneck/test_bottleneck_module.py261 # def __init__(self, ranks, rank_in_group):COMMENT
LOW…rib/test/peer_memory/test_peer_halo_exchange_module.py141 # "SUCCESS : N,C,H,W = 1,%d,%d,%d, half_halo=%d, %s, %s, %s"COMMENT
LOW…ex/contrib/test/openfold_triton/test_fused_adam_swa.py1# Copyright 2023 NVIDIA CORPORATIONCOMMENT
LOWapex/contrib/torchsched/backend.py281 if backend not in ("torch", "torchsched"):COMMENT
LOWapex/contrib/torchsched/backend.py301 # Case 2: Safe to inpalace `op1`'s output to `buf1` then send to `op2` as input.COMMENT
LOWapex/contrib/optimizers/fp16_optimizer.py241 # Pytorch Optimizer.load_state_dict casts saved buffers (e.g. momentum) to the type and deviceCOMMENT
LOWapex/contrib/openfold_triton/mha.py441 # query: [*, num_heads, Q, c_hidden]COMMENT
LOWdocs/source/conf.py1#!/usr/bin/env python3COMMENT
LOWdocs/source/conf.py61COMMENT
LOWdocs/source/conf.py141# -- Options for LaTeX output ------------------------------------------------COMMENT
LOWexamples/imagenet/main_amp.py261 self.next_input, self.next_target = next(self.loader)COMMENT
Self-Referential Comments13 hits · 23 pts
SeverityFileLineSnippetContext
MEDIUMapex/contrib/sparsity/asp.py450 """This function is used to set the permutation saving related parameters in ASP class and inside of the PermutaSTRING
MEDIUMapex/contrib/sparsity/permutation_lib.py2000 """This function is used to find and print the intermediate representation (IR) - Graph representation with TorcSTRING
MEDIUMapex/contrib/sparsity/permutation_lib.py202 """This function is used to set the permutation saving related parameters."""STRING
MEDIUMapex/contrib/sparsity/permutation_lib.py215 """This function is used to set the permutation needed parameters from ASP class."""STRING
MEDIUMapex/contrib/sparsity/permutation_lib.py342 """This function is used to permutation for a node in C dim. (Only need to handle the weight of the node)"""STRING
MEDIUMapex/contrib/sparsity/permutation_lib.py483 """This function is used to permutation for a node in K dim. (Need to handle the weight/bias/running_mean/runninSTRING
MEDIUMapex/contrib/sparsity/permutation_lib.py2061 """This function is used to save the graph into JSON file for inspection."""STRING
MEDIUM…tion_search_kernels/call_permutation_search_kernels.py7 """This function is used to call the permutation search CUDA kernels.STRING
MEDIUMapex/optimizers/fused_novograd.py99 # Creating the overflow buffer on the same device as the params tensors.COMMENT
MEDIUMapex/optimizers/fused_novograd.py183 # Creating the following parameters on the same device as the params tensors.COMMENT
MEDIUMapex/optimizers/fused_novograd.py209 # Creating the following parameters on the same device as the params tensors.COMMENT
MEDIUMapex/optimizers/fused_mixed_precision_lamb.py70 # This method is overridden from the parent class because there is not a way to overrideCOMMENT
MEDIUMdocs/source/conf.py7# This file is execfile()d with the current directory set to itsCOMMENT
AI Structural Patterns19 hits · 19 pts
SeverityFileLineSnippetContext
LOWapex/fused_dense/fused_dense.py13CODE
LOWapex/fused_dense/fused_dense.py29CODE
LOWapex/contrib/sparsity/asp.py39CODE
LOWapex/contrib/test/optimizers/test_dist_adam.py33CODE
LOWapex/contrib/test/optimizers/test_dist_adam.py122CODE
LOWapex/contrib/test/optimizers/test_dist_adam.py492CODE
LOWapex/contrib/test/group_norm/test_group_norm.py120CODE
LOWapex/contrib/optimizers/fused_adam.py38CODE
LOWapex/contrib/optimizers/distributed_fused_adam.py540CODE
LOWapex/contrib/optimizers/fused_lamb.py63CODE
LOWapex/contrib/optimizers/distributed_fused_lamb.py99CODE
LOWapex/contrib/bottleneck/bottleneck.py301CODE
LOWapex/contrib/bottleneck/bottleneck.py1016CODE
LOWapex/contrib/openfold_triton/fused_adam_swa.py210CODE
LOWapex/optimizers/fused_novograd.py67CODE
LOWapex/optimizers/fused_adam.py68CODE
LOWapex/optimizers/fused_mixed_precision_lamb.py10CODE
LOWapex/optimizers/fused_lamb.py63CODE
LOWapex/optimizers/fused_sgd.py77CODE
Modern Structural Boilerplate16 hits · 16 pts
SeverityFileLineSnippetContext
LOWapex/__init__.py18__all__ = ["optimizers", "normalization"]CODE
LOWapex/_autocast_utils.py6__all__ = ["_cast_if_autocast_enabled"]CODE
LOWapex/distributed_testing/__init__.py9__all__ = [CODE
LOWapex/distributed_testing/distributed_test_base.py102 def _setup_pre_spawn(self) -> None:CODE
LOWapex/contrib/xentropy/__init__.py4__all__ = [CODE
LOWapex/contrib/torchsched/backend.py30__all__ = ["get_backend"]CODE
LOWapex/contrib/torchsched/__init__.py21__all__ = ["get_backend", "set_default_backend"]CODE
LOWapex/contrib/torchsched/__init__.py46def set_default_backend(backend: str) -> None:CODE
LOWapex/contrib/torchsched/inductor/__init__.py5__all__ = ["patch_graph_lowering"]CODE
LOWapex/contrib/torchsched/inductor/_utils.py12__all__ = [CODE
LOWapex/contrib/torchsched/passes/__init__.py7__all__ = ["pre_grad_custom_pass"]CODE
LOWapex/contrib/torchsched/passes/pre_grad_passes.py18__all__ = ["pre_grad_custom_pass"]CODE
LOWapex/contrib/torchsched/ops/layer_norm.py15__all__ = ["get_cudnn_manager"]CODE
LOWapex/contrib/torchsched/ops/layer_norm.py49 def set_stream(self, stream: torch.cuda.Stream) -> None:CODE
LOWapex/contrib/nccl_allocator/nccl_allocator.py8__all__ = ["init", "nccl_mem", "create_nccl_mem_pool"]CODE
LOWapex/contrib/group_norm/group_norm.py19__all__ = ["GroupNorm"]CODE
Redundant / Tautological Comments8 hits · 12 pts
SeverityFileLineSnippetContext
LOWsetup.py855 # Check if APEX_PARALLEL_BUILD environment variable is setCOMMENT
LOWapex/contrib/optimizers/distributed_fused_adam.py201 # Check if buffers support fused kernelCOMMENT
LOWapex/contrib/optimizers/distributed_fused_adam.py790 # Check if collectives have no_copy optionCOMMENT
LOWapex/contrib/optimizers/distributed_fused_adam.py1540 # Check if buckets are underutilizedCOMMENT
LOWapex/contrib/optimizers/distributed_fused_adam.py1726 # Check if fragment needs to be updatedCOMMENT
LOWapex/contrib/optimizers/distributed_fused_adam.py2170 # Check if provided parameters are subset of all parametersCOMMENT
LOWapex/contrib/optimizers/distributed_fused_adam.py2796 # Check if param shard is already in expected dtypeCOMMENT
LOWapex/contrib/optimizers/distributed_fused_lamb.py198 # Check if collectives have no_copy optionCOMMENT
Docstring Block Structure2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHapex/contrib/torchsched/backend.py266Get the graph scheduler backend for model compilation. This function returns the appropriate backend for model compSTRING
HIGHapex/contrib/torchsched/inductor/scheduler.py235Register one CUDA event indicating node execution complete. For ordinary Inductor IR nodes, the completion evenSTRING
Verbosity Indicators2 hits · 4 pts
SeverityFileLineSnippetContext
LOWapex/contrib/sparsity/asp.py320 # Step 1: use the Torch.FX library to build the graphCOMMENT
LOWapex/contrib/sparsity/asp.py321 # Step 2: permutation search with the customized kernelCOMMENT
Structural Annotation Overuse2 hits · 4 pts
SeverityFileLineSnippetContext
LOWapex/contrib/sparsity/asp.py320 # Step 1: use the Torch.FX library to build the graphCOMMENT
LOWapex/contrib/sparsity/asp.py321 # Step 2: permutation search with the customized kernelCOMMENT
AI Slop Vocabulary3 hits · 4 pts
SeverityFileLineSnippetContext
LOWapex/contrib/sparsity/permutation_lib.py1674 # if it's a real node, just add itCOMMENT
LOWapex/contrib/sparsity/permutation_lib.py1736 # if it's a real node, just add itCOMMENT
MEDIUMapex/contrib/sparsity/permutation_lib.py255 """Permute a model's weights in order to maintain more magnitude after enforcing the sparsity constraint."""STRING
Excessive Try-Catch Wrapping2 hits · 2 pts
SeverityFileLineSnippetContext
LOWapex/contrib/sparsity/permutation_lib.py2008 except Exception as ex:CODE
LOWapex/contrib/torchsched/inductor/scheduler.py445 except Exception:CODE
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippetContext
LOWtests/L1/common/main_amp.py458 # print_freq iterations, make sure to move this prefetching below the accuracy calculation.COMMENT
Fake / Example Data1 hit · 0 pts
SeverityFileLineSnippetContext
LOWapex/contrib/sparsity/permutation_lib.py1872 if node.op == "placeholder":CODE