A PyTorch Extension: Tools for easy mixed precision and distributed training in Pytorch
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).
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.
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.
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.
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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 65 | def get_cuda_bare_metal_version(cuda_dir): | CODE |
| LOW | setup.py | 74 | def check_cuda_torch_binary_vs_bare_metal(cuda_dir): | CODE |
| LOW | setup.py | 102 | def check_cudnn_version_and_warn(global_option: str, required_cudnn_version: int) -> bool: | CODE |
| LOW | apex/__init__.py | 21 | def check_cudnn_version_and_warn(global_option: str, required_cudnn_version: int) -> bool: | CODE |
| LOW | apex/_autocast_utils.py | 22 | def _cast_if_autocast_enabled(*args): | CODE |
| LOW | apex/normalization/fused_layer_norm.py | 80 | def fused_layer_norm_affine_fwd( | CODE |
| LOW | apex/normalization/fused_layer_norm.py | 101 | def fused_layer_norm_affine_fwd_fake( | CODE |
| LOW | apex/normalization/fused_layer_norm.py | 125 | def fused_layer_norm_affine_bwd( | CODE |
| LOW | apex/normalization/fused_layer_norm.py | 150 | def fused_layer_norm_affine_bwd_fake( | CODE |
| LOW | apex/normalization/fused_layer_norm.py | 166 | def _fused_layer_norm_affine_backward(ctx, grad_output, grad_mean, grad_invvar): | CODE |
| LOW | apex/normalization/fused_layer_norm.py | 182 | def _fused_layer_norm_affine_setup_context(ctx, inputs, output): | CODE |
| LOW | apex/normalization/fused_layer_norm.py | 241 | def fused_rms_norm_affine_fwd( | CODE |
| LOW | apex/normalization/fused_layer_norm.py | 260 | def fused_rms_norm_affine_fwd_fake( | CODE |
| LOW | apex/normalization/fused_layer_norm.py | 289 | def fused_rms_norm_affine_bwd( | CODE |
| LOW | apex/normalization/fused_layer_norm.py | 310 | def fused_rms_norm_affine_bwd_fake( | CODE |
| LOW | apex/normalization/fused_layer_norm.py | 323 | def _fused_rms_norm_affine_backward(ctx, grad_output, grad_invvar): | CODE |
| LOW | apex/normalization/fused_layer_norm.py | 337 | def _fused_rms_norm_affine_setup_context(ctx, inputs, output): | CODE |
| LOW | apex/normalization/fused_layer_norm.py | 449 | def fused_layer_norm_fwd_fake( | CODE |
| LOW | apex/normalization/fused_layer_norm.py | 490 | def fused_layer_norm_bwd_fake( | CODE |
| LOW | apex/normalization/fused_layer_norm.py | 502 | def _fused_layer_norm_backward(ctx, grad_output, grad_mean, grad_invvar): | CODE |
| LOW | apex/normalization/fused_layer_norm.py | 515 | def _fused_layer_norm_setup_context(ctx, inputs, output): | CODE |
| LOW | apex/normalization/fused_layer_norm.py | 653 | def _fused_rms_norm_setup_context(ctx, inputs, output): | CODE |
| LOW | apex/normalization/fused_layer_norm.py | 690 | def mixed_dtype_fused_layer_norm_affine( | CODE |
| LOW | apex/normalization/fused_layer_norm.py | 716 | def mixed_dtype_fused_rms_norm_affine( | CODE |
| LOW | apex/contrib/sparsity/asp.py | 269 | def init_optimizer_for_pruning(cls, optimizer): | CODE |
| LOW | apex/contrib/sparsity/asp.py | 444 | def set_permutation_saving_params( | CODE |
| LOW⚡ | apex/contrib/sparsity/permutation_lib.py | 1999 | def trace_and_print_raw_fx_graph(cls, model, print_tabular=False, generate_python_code=False): | CODE |
| LOW | apex/contrib/sparsity/permutation_lib.py | 196 | def set_permutation_saving_params( | CODE |
| LOW | apex/contrib/sparsity/permutation_lib.py | 214 | def set_permutation_params_from_asp(cls, model, sparse_parameters, all_parameters, verbosity): | CODE |
| LOW | apex/contrib/sparsity/permutation_lib.py | 566 | def check_graph_for_unpermuted_nodes(cls, fx_graph): | CODE |
| LOW | apex/contrib/sparsity/permutation_lib.py | 624 | def find_sparse_parameters_for_node(cls, node_name): | CODE |
| LOW | apex/contrib/sparsity/permutation_lib.py | 661 | def find_permutation_for_matrix_group(cls, matrix_group): | CODE |
| LOW | apex/contrib/sparsity/permutation_lib.py | 808 | def find_sibling_group_permutation(cls, fx_graph, sibling_group_id): | CODE |
| LOW | apex/contrib/sparsity/permutation_lib.py | 1152 | def init_grouped_conv_permutation_flags(fx_graph, node_name, node_groups, verbosity): | CODE |
| LOW | apex/contrib/sparsity/permutation_lib.py | 1491 | def enforce_dimension_agreement(cls, fx_graph): | CODE |
| LOW | apex/contrib/sparsity/permutation_lib.py | 1543 | def make_sibling_coparent_groups(cls, fx_graph): | CODE |
| LOW | apex/contrib/sparsity/permutation_lib.py | 1596 | def propagate_permutation_flags(cls, fx_graph): | CODE |
| LOW | …arsity/permutation_search_kernels/exhaustive_search.py | 36 | def generate_unique_combinations( | CODE |
| LOW | …arsity/permutation_search_kernels/exhaustive_search.py | 76 | def generate_all_unique_combinations(C, M, must_use_all_groups=False): | CODE |
| LOW | …arsity/permutation_search_kernels/exhaustive_search.py | 102 | def predict_unique_combinations(C, M): | CODE |
| LOW | …arsity/permutation_search_kernels/exhaustive_search.py | 166 | def apply_stripe_group_permutation(sgp, stripes, group_width, permutation): | CODE |
| LOW | …ib/sparsity/permutation_search_kernels/channel_swap.py | 30 | def stripes_and_swap_idx_to_columns(stripe0, stripe1, idx): | CODE |
| LOW | …ib/sparsity/permutation_search_kernels/channel_swap.py | 41 | def columns_to_stripes_and_swap_idx(col0, col1): | CODE |
| LOW | …tion_search_kernels/call_permutation_search_kernels.py | 6 | def accelerated_search_for_good_permutation(matrix_group, options=None, verbosity=0): | CODE |
| LOW | …ty/permutation_search_kernels/permutation_utilities.py | 127 | def magnitude_after_pruning_rows(matrix, rate=0.5): | CODE |
| LOW | …ty/permutation_search_kernels/permutation_utilities.py | 144 | def try_permutations_on_matrix(matrix, permutations): | CODE |
| LOW | apex/contrib/test/xentropy/test_label_smoothing.py | 68 | def _test_label_smoothing_function(self, dtype): | CODE |
| LOW | apex/contrib/test/xentropy/test_label_smoothing.py | 107 | def test_label_smoothing_perf(self): | CODE |
| LOW | apex/contrib/test/layer_norm/test_fast_layer_norm.py | 272 | def test_compat_with_autocast(self): | CODE |
| LOW | …contrib/test/optimizers/test_distributed_fused_lamb.py | 73 | def test_distributed_fused_lamb(self, no_copy, opt_kwargs): | CODE |
| LOW⚡ | apex/contrib/test/optimizers/test_dist_adam.py | 270 | def test_matches_pytorch_no_overlap(self): | CODE |
| LOW⚡ | apex/contrib/test/optimizers/test_dist_adam.py | 276 | def test_matches_pytorch_sync_every_step(self): | CODE |
| LOW⚡ | apex/contrib/test/optimizers/test_dist_adam.py | 279 | def test_matches_pytorch_contiguous_buffers(self): | CODE |
| LOW | apex/contrib/test/optimizers/test_dist_adam.py | 341 | def test_matches_pytorch_multi_dtypes(self): | CODE |
| LOW | apex/contrib/test/optimizers/test_dist_adam.py | 374 | def test_matches_pytorch_scaled_state(self): | CODE |
| LOW | apex/contrib/test/optimizers/test_dist_adam.py | 386 | def test_matches_pytorch_nccl_ub(self): | CODE |
| LOW | apex/contrib/test/optimizers/test_dist_adam.py | 785 | def test_checkpoint_scaled_state(self): | CODE |
| LOW | apex/contrib/test/optimizers/test_dist_adam.py | 806 | def test_bucket_low_utilization_warning(self): | CODE |
| LOW | apex/contrib/test/bottleneck/test_bottleneck_module.py | 119 | def apply_to_different_bottleneck(gt, bottleneck): | CODE |
| LOW | apex/contrib/test/bottleneck/test_bottleneck_module.py | 151 | def spatial_parallel_bottleneck(C, dtype, explicit_nhwc, gt_bottleneck, spatial_parallel_args): | CODE |
| 87 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | apex/__init__.py | 1 | CODE | |
| LOW | apex/__init__.py | 14 | CODE | |
| LOW | apex/__init__.py | 15 | CODE | |
| LOW | apex/distributed_testing/__init__.py | 3 | CODE | |
| LOW | apex/distributed_testing/__init__.py | 3 | CODE | |
| LOW | apex/distributed_testing/__init__.py | 3 | CODE | |
| LOW | apex/distributed_testing/_ucc_util.py | 6 | CODE | |
| LOW | apex/normalization/__init__.py | 1 | CODE | |
| LOW | apex/normalization/__init__.py | 1 | CODE | |
| LOW | apex/normalization/__init__.py | 1 | CODE | |
| LOW | apex/normalization/__init__.py | 1 | CODE | |
| LOW | apex/fused_dense/__init__.py | 1 | CODE | |
| LOW | apex/multi_tensor_apply/multi_tensor_apply.py | 7 | CODE | |
| LOW | apex/contrib/index_mul_2d/__init__.py | 1 | CODE | |
| LOW | apex/contrib/sparsity/__init__.py | 1 | CODE | |
| LOW | apex/contrib/sparsity/__init__.py | 2 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 2034 | CODE | |
| LOW | …arsity/permutation_search_kernels/exhaustive_search.py | 1 | CODE | |
| LOW | …ib/sparsity/permutation_search_kernels/channel_swap.py | 1 | CODE | |
| LOW | …tion_search_kernels/call_permutation_search_kernels.py | 2 | CODE | |
| LOW | …ontrib/sparsity/permutation_search_kernels/__init__.py | 1 | CODE | |
| LOW | …ontrib/sparsity/permutation_search_kernels/__init__.py | 2 | CODE | |
| LOW | …contrib/sparsity/permutation_tests/permutation_test.py | 7 | CODE | |
| LOW | apex/contrib/groupbn/__init__.py | 4 | CODE | |
| LOW | apex/contrib/cudnn_gbn/__init__.py | 1 | CODE | |
| LOW | apex/contrib/xentropy/__init__.py | 1 | CODE | |
| LOW | apex/contrib/torchsched/backend.py | 3 | CODE | |
| LOW | apex/contrib/torchsched/__init__.py | 3 | CODE | |
| LOW | apex/contrib/torchsched/inductor/wrapper.py | 12 | CODE | |
| LOW | apex/contrib/torchsched/inductor/event.py | 12 | CODE | |
| LOW | apex/contrib/torchsched/inductor/graph.py | 3 | CODE | |
| LOW | apex/contrib/torchsched/inductor/__init__.py | 3 | CODE | |
| LOW | apex/contrib/torchsched/inductor/scheduler.py | 3 | CODE | |
| LOW | apex/contrib/torchsched/inductor/scheduler.py | 16 | CODE | |
| LOW | apex/contrib/torchsched/inductor/scheduler.py | 17 | CODE | |
| LOW | apex/contrib/torchsched/inductor/scheduler.py | 33 | CODE | |
| LOW | apex/contrib/torchsched/inductor/_utils.py | 1 | CODE | |
| LOW | apex/contrib/torchsched/passes/__init__.py | 3 | CODE | |
| LOW | apex/contrib/torchsched/passes/__init__.py | 5 | CODE | |
| LOW | apex/contrib/torchsched/passes/pre_grad_passes.py | 3 | CODE | |
| LOW | apex/contrib/torchsched/ops/layer_norm.py | 8 | CODE | |
| LOW | apex/contrib/layer_norm/__init__.py | 1 | CODE | |
| LOW | apex/contrib/nccl_allocator/__init__.py | 1 | CODE | |
| LOW | apex/contrib/optimizers/__init__.py | 1 | CODE | |
| LOW | apex/contrib/optimizers/__init__.py | 2 | CODE | |
| LOW | apex/contrib/optimizers/__init__.py | 3 | CODE | |
| LOW | apex/contrib/bottleneck/__init__.py | 1 | CODE | |
| LOW | apex/contrib/bottleneck/__init__.py | 1 | CODE | |
| LOW | apex/contrib/bottleneck/__init__.py | 2 | CODE | |
| LOW | apex/contrib/bottleneck/__init__.py | 2 | CODE | |
| LOW | apex/contrib/bottleneck/__init__.py | 2 | CODE | |
| LOW | apex/contrib/bottleneck/__init__.py | 2 | CODE | |
| LOW | apex/contrib/conv_bias_relu/__init__.py | 1 | CODE | |
| LOW | apex/contrib/conv_bias_relu/__init__.py | 1 | CODE | |
| LOW | apex/contrib/conv_bias_relu/__init__.py | 1 | CODE | |
| LOW | apex/contrib/conv_bias_relu/__init__.py | 1 | CODE | |
| LOW | apex/contrib/group_norm/__init__.py | 1 | CODE | |
| LOW | apex/contrib/clip_grad/__init__.py | 1 | CODE | |
| LOW | apex/contrib/transducer/__init__.py | 1 | CODE | |
| LOW | apex/contrib/transducer/__init__.py | 2 | CODE | |
| 19 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | apex/contrib/sparsity/asp.py | 39 | CODE | |
| LOW | apex/contrib/sparsity/asp.py | 314 | CODE | |
| LOW | apex/contrib/sparsity/asp.py | 390 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 341 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 442 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 482 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 566 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 624 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 762 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 914 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 991 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 1026 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 1183 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 1324 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 1362 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 1392 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 1491 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 1543 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 1596 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 1776 | CODE | |
| LOW | apex/contrib/sparsity/sparse_masklib.py | 86 | CODE | |
| LOW | apex/contrib/sparsity/sparse_masklib.py | 176 | CODE | |
| LOW | …arsity/permutation_search_kernels/exhaustive_search.py | 296 | CODE | |
| LOW | …ib/sparsity/permutation_search_kernels/channel_swap.py | 94 | CODE | |
| LOW | …ib/sparsity/permutation_search_kernels/channel_swap.py | 141 | CODE | |
| LOW | …tion_search_kernels/call_permutation_search_kernels.py | 6 | CODE | |
| LOW | …ty/permutation_search_kernels/permutation_utilities.py | 286 | CODE | |
| LOW | …ty/permutation_search_kernels/permutation_utilities.py | 415 | CODE | |
| LOW | …ty/permutation_search_kernels/permutation_utilities.py | 558 | CODE | |
| LOW | …/contrib/sparsity/test/test_permutation_application.py | 783 | CODE | |
| LOW | …/contrib/sparsity/test/test_permutation_application.py | 24 | CODE | |
| LOW | apex/contrib/test/optimizers/test_dist_adam.py | 122 | CODE | |
| LOW | apex/contrib/test/bottleneck/test_bottleneck_module.py | 35 | CODE | |
| LOW | apex/contrib/torchsched/inductor/scheduler.py | 123 | CODE | |
| LOW | apex/contrib/torchsched/inductor/scheduler.py | 415 | CODE | |
| LOW | apex/contrib/nccl_allocator/nccl_allocator.py | 50 | CODE | |
| LOW | apex/contrib/optimizers/fused_adam.py | 78 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 540 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 938 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 1551 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 1600 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 1827 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 1877 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 2032 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 2124 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 2150 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 2368 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 2505 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 2907 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 3059 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 3397 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 3161 | CODE | |
| LOW | apex/contrib/optimizers/fp16_optimizer.py | 82 | CODE | |
| LOW | apex/contrib/optimizers/fused_lamb.py | 110 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_lamb.py | 99 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_lamb.py | 387 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_lamb.py | 586 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_lamb.py | 943 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_lamb.py | 1070 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_lamb.py | 1206 | CODE | |
| 16 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | apex/contrib/optimizers/fused_lamb.py | 0 | implements lamb algorithm. currently gpu-only. requires apex to be installed via ``pip install -v --no-cache-dir --globa | STRING |
| HIGH | apex/contrib/optimizers/distributed_fused_lamb.py | 0 | implements lamb algorithm. currently gpu-only. requires apex to be installed via ``pip install -v --no-cache-dir --globa | STRING |
| HIGH | apex/optimizers/fused_lamb.py | 0 | implements lamb algorithm. currently gpu-only. requires apex to be installed via ``pip install -v --no-cache-dir --globa | STRING |
| HIGH | apex/contrib/optimizers/fused_lamb.py | 0 | performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and r | STRING |
| HIGH | apex/optimizers/fused_novograd.py | 0 | performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and r | STRING |
| HIGH | apex/optimizers/fused_adagrad.py | 0 | performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and r | STRING |
| HIGH | apex/optimizers/fused_lamb.py | 0 | performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and r | STRING |
| HIGH | apex/optimizers/fused_sgd.py | 0 | performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and r | STRING |
| HIGH | tests/L0/run_optimizers/test_lamb.py | 0 | performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and r | STRING |
| HIGH | tests/L0/run_optimizers/test_fused_novograd.py | 0 | performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and r | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | csrc/type_shim.h | 1 | #include <ATen/ATen.h> | COMMENT |
| LOW | csrc/static_switch.h | 1 | // From | COMMENT |
| LOW | csrc/syncbn.cpp | 1 | #include <ATen/ATen.h> | COMMENT |
| LOW | apex/contrib/csrc/groupbn/interface.cpp | 1 | #include <ATen/ATen.h> | COMMENT |
| LOW | apex/contrib/csrc/groupbn/nhwc_batch_norm_kernel.h | 861 | // Clamp thread_c so that we load from valid locations even if we don't use the value | COMMENT |
| LOW | apex/contrib/csrc/cudnn_gbn/norm_sample.h | 21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | COMMENT |
| LOW | apex/contrib/csrc/bottleneck/bottleneck.cpp | 1 | #include <ATen/ATen.h> | COMMENT |
| LOW | apex/contrib/csrc/conv_bias_relu/conv_bias_relu.cpp | 1 | #include <ATen/ATen.h> | COMMENT |
| LOW | apex/contrib/csrc/group_norm/traits.h | 1 | /* | COMMENT |
| LOW | …contrib/csrc/group_norm/group_norm_nhwc_fwd_one_pass.h | 1 | /* | COMMENT |
| LOW | …contrib/csrc/group_norm/group_norm_nhwc_bwd_one_pass.h | 1 | /* | COMMENT |
| LOW | …arsity/permutation_search_kernels/exhaustive_search.py | 1 | from .permutation_utilities import * | COMMENT |
| LOW | apex/contrib/test/bottleneck/test_bottleneck_module.py | 261 | # def __init__(self, ranks, rank_in_group): | COMMENT |
| LOW | …rib/test/peer_memory/test_peer_halo_exchange_module.py | 141 | # "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.py | 1 | # Copyright 2023 NVIDIA CORPORATION | COMMENT |
| LOW | apex/contrib/torchsched/backend.py | 281 | if backend not in ("torch", "torchsched"): | COMMENT |
| LOW | apex/contrib/torchsched/backend.py | 301 | # Case 2: Safe to inpalace `op1`'s output to `buf1` then send to `op2` as input. | COMMENT |
| LOW | apex/contrib/optimizers/fp16_optimizer.py | 241 | # Pytorch Optimizer.load_state_dict casts saved buffers (e.g. momentum) to the type and device | COMMENT |
| LOW | apex/contrib/openfold_triton/mha.py | 441 | # query: [*, num_heads, Q, c_hidden] | COMMENT |
| LOW | docs/source/conf.py | 1 | #!/usr/bin/env python3 | COMMENT |
| LOW | docs/source/conf.py | 61 | COMMENT | |
| LOW | docs/source/conf.py | 141 | # -- Options for LaTeX output ------------------------------------------------ | COMMENT |
| LOW | examples/imagenet/main_amp.py | 261 | self.next_input, self.next_target = next(self.loader) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | apex/contrib/sparsity/asp.py | 450 | """This function is used to set the permutation saving related parameters in ASP class and inside of the Permuta | STRING |
| MEDIUM⚡ | apex/contrib/sparsity/permutation_lib.py | 2000 | """This function is used to find and print the intermediate representation (IR) - Graph representation with Torc | STRING |
| MEDIUM | apex/contrib/sparsity/permutation_lib.py | 202 | """This function is used to set the permutation saving related parameters.""" | STRING |
| MEDIUM | apex/contrib/sparsity/permutation_lib.py | 215 | """This function is used to set the permutation needed parameters from ASP class.""" | STRING |
| MEDIUM | apex/contrib/sparsity/permutation_lib.py | 342 | """This function is used to permutation for a node in C dim. (Only need to handle the weight of the node)""" | STRING |
| MEDIUM | apex/contrib/sparsity/permutation_lib.py | 483 | """This function is used to permutation for a node in K dim. (Need to handle the weight/bias/running_mean/runnin | STRING |
| MEDIUM | apex/contrib/sparsity/permutation_lib.py | 2061 | """This function is used to save the graph into JSON file for inspection.""" | STRING |
| MEDIUM | …tion_search_kernels/call_permutation_search_kernels.py | 7 | """This function is used to call the permutation search CUDA kernels. | STRING |
| MEDIUM | apex/optimizers/fused_novograd.py | 99 | # Creating the overflow buffer on the same device as the params tensors. | COMMENT |
| MEDIUM | apex/optimizers/fused_novograd.py | 183 | # Creating the following parameters on the same device as the params tensors. | COMMENT |
| MEDIUM | apex/optimizers/fused_novograd.py | 209 | # Creating the following parameters on the same device as the params tensors. | COMMENT |
| MEDIUM | apex/optimizers/fused_mixed_precision_lamb.py | 70 | # This method is overridden from the parent class because there is not a way to override | COMMENT |
| MEDIUM | docs/source/conf.py | 7 | # This file is execfile()d with the current directory set to its | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | apex/fused_dense/fused_dense.py | 13 | CODE | |
| LOW | apex/fused_dense/fused_dense.py | 29 | CODE | |
| LOW | apex/contrib/sparsity/asp.py | 39 | CODE | |
| LOW | apex/contrib/test/optimizers/test_dist_adam.py | 33 | CODE | |
| LOW | apex/contrib/test/optimizers/test_dist_adam.py | 122 | CODE | |
| LOW | apex/contrib/test/optimizers/test_dist_adam.py | 492 | CODE | |
| LOW | apex/contrib/test/group_norm/test_group_norm.py | 120 | CODE | |
| LOW | apex/contrib/optimizers/fused_adam.py | 38 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 540 | CODE | |
| LOW | apex/contrib/optimizers/fused_lamb.py | 63 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_lamb.py | 99 | CODE | |
| LOW | apex/contrib/bottleneck/bottleneck.py | 301 | CODE | |
| LOW | apex/contrib/bottleneck/bottleneck.py | 1016 | CODE | |
| LOW | apex/contrib/openfold_triton/fused_adam_swa.py | 210 | CODE | |
| LOW | apex/optimizers/fused_novograd.py | 67 | CODE | |
| LOW | apex/optimizers/fused_adam.py | 68 | CODE | |
| LOW | apex/optimizers/fused_mixed_precision_lamb.py | 10 | CODE | |
| LOW | apex/optimizers/fused_lamb.py | 63 | CODE | |
| LOW | apex/optimizers/fused_sgd.py | 77 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | apex/__init__.py | 18 | __all__ = ["optimizers", "normalization"] | CODE |
| LOW | apex/_autocast_utils.py | 6 | __all__ = ["_cast_if_autocast_enabled"] | CODE |
| LOW | apex/distributed_testing/__init__.py | 9 | __all__ = [ | CODE |
| LOW | apex/distributed_testing/distributed_test_base.py | 102 | def _setup_pre_spawn(self) -> None: | CODE |
| LOW | apex/contrib/xentropy/__init__.py | 4 | __all__ = [ | CODE |
| LOW | apex/contrib/torchsched/backend.py | 30 | __all__ = ["get_backend"] | CODE |
| LOW | apex/contrib/torchsched/__init__.py | 21 | __all__ = ["get_backend", "set_default_backend"] | CODE |
| LOW | apex/contrib/torchsched/__init__.py | 46 | def set_default_backend(backend: str) -> None: | CODE |
| LOW | apex/contrib/torchsched/inductor/__init__.py | 5 | __all__ = ["patch_graph_lowering"] | CODE |
| LOW | apex/contrib/torchsched/inductor/_utils.py | 12 | __all__ = [ | CODE |
| LOW | apex/contrib/torchsched/passes/__init__.py | 7 | __all__ = ["pre_grad_custom_pass"] | CODE |
| LOW | apex/contrib/torchsched/passes/pre_grad_passes.py | 18 | __all__ = ["pre_grad_custom_pass"] | CODE |
| LOW | apex/contrib/torchsched/ops/layer_norm.py | 15 | __all__ = ["get_cudnn_manager"] | CODE |
| LOW | apex/contrib/torchsched/ops/layer_norm.py | 49 | def set_stream(self, stream: torch.cuda.Stream) -> None: | CODE |
| LOW | apex/contrib/nccl_allocator/nccl_allocator.py | 8 | __all__ = ["init", "nccl_mem", "create_nccl_mem_pool"] | CODE |
| LOW | apex/contrib/group_norm/group_norm.py | 19 | __all__ = ["GroupNorm"] | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 855 | # Check if APEX_PARALLEL_BUILD environment variable is set | COMMENT |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 201 | # Check if buffers support fused kernel | COMMENT |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 790 | # Check if collectives have no_copy option | COMMENT |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 1540 | # Check if buckets are underutilized | COMMENT |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 1726 | # Check if fragment needs to be updated | COMMENT |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 2170 | # Check if provided parameters are subset of all parameters | COMMENT |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 2796 | # Check if param shard is already in expected dtype | COMMENT |
| LOW | apex/contrib/optimizers/distributed_fused_lamb.py | 198 | # Check if collectives have no_copy option | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | apex/contrib/torchsched/backend.py | 266 | Get the graph scheduler backend for model compilation. This function returns the appropriate backend for model comp | STRING |
| HIGH | apex/contrib/torchsched/inductor/scheduler.py | 235 | Register one CUDA event indicating node execution complete. For ordinary Inductor IR nodes, the completion even | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | apex/contrib/sparsity/asp.py | 320 | # Step 1: use the Torch.FX library to build the graph | COMMENT |
| LOW⚡ | apex/contrib/sparsity/asp.py | 321 | # Step 2: permutation search with the customized kernel | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | apex/contrib/sparsity/asp.py | 320 | # Step 1: use the Torch.FX library to build the graph | COMMENT |
| LOW⚡ | apex/contrib/sparsity/asp.py | 321 | # Step 2: permutation search with the customized kernel | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | apex/contrib/sparsity/permutation_lib.py | 1674 | # if it's a real node, just add it | COMMENT |
| LOW | apex/contrib/sparsity/permutation_lib.py | 1736 | # if it's a real node, just add it | COMMENT |
| MEDIUM | apex/contrib/sparsity/permutation_lib.py | 255 | """Permute a model's weights in order to maintain more magnitude after enforcing the sparsity constraint.""" | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | apex/contrib/sparsity/permutation_lib.py | 2008 | except Exception as ex: | CODE |
| LOW | apex/contrib/torchsched/inductor/scheduler.py | 445 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/L1/common/main_amp.py | 458 | # print_freq iterations, make sure to move this prefetching below the accuracy calculation. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | apex/contrib/sparsity/permutation_lib.py | 1872 | if node.op == "placeholder": | CODE |