A PyTorch Extension: Tools for easy mixed precision and distributed training in Pytorch
This report summarizes scanner evidence for NVIDIA/apex, a Python project with 9,004 GitHub stars. SynthScan examined 53,634 lines of code across 243 source files, recording 423 pattern matches distributed across 17 syntactic categories. The legacy adjusted pattern signal is 9.2 (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.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 295 finding(s).
Are imports declared and package/API names verified? 97 finding(s).
Are wrappers, guards, and repeated structures necessary? 197 finding(s).
Which changes need focused human review? 423 finding(s).
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.
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.
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.
The scanner identified 423 distinct pattern matches across 17 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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 64 | def get_cuda_bare_metal_version(cuda_dir): | CODE |
| LOW | setup.py | 73 | def check_cuda_torch_binary_vs_bare_metal(cuda_dir): | CODE |
| LOW | setup.py | 101 | def check_cudnn_version_and_warn(global_option: str, required_cudnn_version: int) -> bool: | CODE |
| LOW | apex/__init__.py | 19 | 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 | 271 | 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 | 1942 | def trace_and_print_raw_fx_graph(cls, model, print_tabular=False, generate_python_code=False): | CODE |
| LOW | apex/contrib/sparsity/permutation_lib.py | 195 | def set_permutation_saving_params( | CODE |
| LOW | apex/contrib/sparsity/permutation_lib.py | 213 | def set_permutation_params_from_asp(cls, model, sparse_parameters, all_parameters, verbosity): | CODE |
| LOW | apex/contrib/sparsity/permutation_lib.py | 536 | def check_graph_for_unpermuted_nodes(cls, fx_graph): | CODE |
| LOW | apex/contrib/sparsity/permutation_lib.py | 594 | def find_sparse_parameters_for_node(cls, node_name): | CODE |
| LOW | apex/contrib/sparsity/permutation_lib.py | 631 | def find_permutation_for_matrix_group(cls, matrix_group): | CODE |
| LOW | apex/contrib/sparsity/permutation_lib.py | 770 | def find_sibling_group_permutation(cls, fx_graph, sibling_group_id): | CODE |
| LOW | apex/contrib/sparsity/permutation_lib.py | 1114 | def init_grouped_conv_permutation_flags(fx_graph, node_name, node_groups, verbosity): | CODE |
| LOW | apex/contrib/sparsity/permutation_lib.py | 1453 | def enforce_dimension_agreement(cls, fx_graph): | CODE |
| LOW | apex/contrib/sparsity/permutation_lib.py | 1505 | def make_sibling_coparent_groups(cls, fx_graph): | CODE |
| LOW | apex/contrib/sparsity/permutation_lib.py | 1558 | 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 | 7 | def accelerated_search_for_good_permutation(matrix_group, options=None, verbosity=0): | CODE |
| LOW | …ty/permutation_search_kernels/permutation_utilities.py | 128 | def magnitude_after_pruning_rows(matrix, rate=0.5): | CODE |
| LOW | …ty/permutation_search_kernels/permutation_utilities.py | 145 | def try_permutations_on_matrix(matrix, permutations): | CODE |
| LOW | apex/contrib/test/xentropy/test_label_smoothing.py | 63 | def _test_label_smoothing_function(self, dtype): | CODE |
| LOW | apex/contrib/test/xentropy/test_label_smoothing.py | 102 | def test_label_smoothing_perf(self): | CODE |
| LOW | apex/contrib/test/layer_norm/test_fast_layer_norm.py | 269 | 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 | 118 | def apply_to_different_bottleneck(gt, bottleneck): | CODE |
| LOW | apex/contrib/test/bottleneck/test_bottleneck_module.py | 150 | 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 | 14 | CODE | |
| LOW | apex/_autocast_utils.py | 2 | 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/fused_layer_norm.py | 3 | CODE | |
| LOW | apex/normalization/fused_layer_norm.py | 3 | 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 | 1978 | 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 | 4 | 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 | 13 | CODE | |
| LOW | apex/contrib/groupbn/__init__.py | 5 | CODE | |
| LOW | apex/contrib/cudnn_gbn/__init__.py | 1 | CODE | |
| LOW | …contrib/test/cudnn_gbn/test_cudnn_gbn_with_two_gpus.py | 2 | CODE | |
| LOW | apex/contrib/test/optimizers/test_dist_adam.py | 6 | CODE | |
| LOW | apex/contrib/test/openfold_triton/test_openfold_mha.py | 4 | 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 | 14 | CODE | |
| LOW | apex/contrib/torchsched/inductor/scheduler.py | 14 | CODE | |
| LOW | apex/contrib/torchsched/inductor/scheduler.py | 32 | 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/optimizers/distributed_fused_adam.py | 11 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 11 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 11 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 11 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 11 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 11 | CODE | |
| LOW | apex/contrib/bottleneck/__init__.py | 1 | CODE | |
| LOW | apex/contrib/bottleneck/__init__.py | 1 | CODE | |
| 36 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | apex/contrib/sparsity/asp.py | 41 | CODE | |
| LOW | apex/contrib/sparsity/asp.py | 316 | CODE | |
| LOW | apex/contrib/sparsity/asp.py | 390 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 338 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 427 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 467 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 536 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 594 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 728 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 876 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 953 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 988 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 1145 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 1286 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 1324 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 1354 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 1453 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 1505 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 1558 | CODE | |
| LOW | apex/contrib/sparsity/permutation_lib.py | 1734 | 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 | 7 | CODE | |
| LOW | …ty/permutation_search_kernels/permutation_utilities.py | 287 | CODE | |
| LOW | …ty/permutation_search_kernels/permutation_utilities.py | 416 | CODE | |
| LOW | …ty/permutation_search_kernels/permutation_utilities.py | 559 | CODE | |
| LOW | …/contrib/sparsity/test/test_permutation_application.py | 784 | CODE | |
| LOW | …/contrib/sparsity/test/test_permutation_application.py | 25 | CODE | |
| LOW | apex/contrib/test/optimizers/test_dist_adam.py | 122 | CODE | |
| LOW | apex/contrib/test/bottleneck/test_bottleneck_module.py | 34 | CODE | |
| LOW | apex/contrib/torchsched/inductor/scheduler.py | 122 | CODE | |
| LOW | apex/contrib/torchsched/inductor/scheduler.py | 414 | CODE | |
| LOW | apex/contrib/nccl_allocator/nccl_allocator.py | 49 | CODE | |
| LOW | apex/contrib/optimizers/fused_adam.py | 80 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 539 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 937 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 1550 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 1599 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 1826 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 1876 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 2031 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 2123 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 2149 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 2367 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 2504 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 2906 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 3058 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 3396 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 3160 | CODE | |
| LOW | apex/contrib/optimizers/fp16_optimizer.py | 83 | CODE | |
| LOW | apex/contrib/optimizers/fused_lamb.py | 112 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_lamb.py | 100 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_lamb.py | 388 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_lamb.py | 587 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_lamb.py | 940 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_lamb.py | 1067 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_lamb.py | 1203 | 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 |
|---|---|---|---|---|
| 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 | 1943 | """This function is used to find and print the intermediate representation (IR) - Graph representation with Torc | STRING |
| MEDIUM | apex/contrib/sparsity/permutation_lib.py | 201 | """This function is used to set the permutation saving related parameters.""" | STRING |
| MEDIUM | apex/contrib/sparsity/permutation_lib.py | 214 | """This function is used to set the permutation needed parameters from ASP class.""" | STRING |
| MEDIUM | apex/contrib/sparsity/permutation_lib.py | 339 | """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 | 468 | """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 | 2005 | """This function is used to save the graph into JSON file for inspection.""" | STRING |
| MEDIUM | …tion_search_kernels/call_permutation_search_kernels.py | 8 | """This function is used to call the permutation search CUDA kernels. | STRING |
| MEDIUM | apex/optimizers/fused_novograd.py | 100 | # Creating the overflow buffer on the same device as the params tensors. | COMMENT |
| MEDIUM | apex/optimizers/fused_novograd.py | 184 | # Creating the following parameters on the same device as the params tensors. | COMMENT |
| MEDIUM | apex/optimizers/fused_novograd.py | 210 | # Creating the following parameters on the same device as the params tensors. | COMMENT |
| MEDIUM | apex/optimizers/fused_mixed_precision_lamb.py | 72 | # This method is overridden from the parent class because there is not a way to override | COMMENT |
| MEDIUM | docs/source/conf.py | 6 | # This file is execfile()d with the current directory set to its | COMMENT |
| 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 | # class HaloExchangerAllGather(HaloExchanger): | 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 | COMMENT | |
| LOW | apex/contrib/torchsched/backend.py | 301 | # | 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 | docs/source/conf.py | 1 | #!/usr/bin/env python3 | COMMENT |
| LOW | docs/source/conf.py | 61 | master_doc = "index" | COMMENT |
| LOW | docs/source/conf.py | 141 | latex_elements = { | COMMENT |
| LOW | examples/imagenet/main_amp.py | 261 | self.next_target = None | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | apex/fused_dense/fused_dense.py | 14 | CODE | |
| LOW | apex/fused_dense/fused_dense.py | 30 | CODE | |
| LOW | apex/contrib/sparsity/asp.py | 41 | 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 | 118 | CODE | |
| LOW | apex/contrib/optimizers/fused_adam.py | 40 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 539 | CODE | |
| LOW | apex/contrib/optimizers/fused_lamb.py | 65 | CODE | |
| LOW | apex/contrib/optimizers/distributed_fused_lamb.py | 100 | CODE | |
| LOW | apex/contrib/bottleneck/bottleneck.py | 298 | CODE | |
| LOW | apex/contrib/bottleneck/bottleneck.py | 1012 | CODE | |
| LOW | apex/contrib/openfold_triton/fused_adam_swa.py | 211 | CODE | |
| LOW | apex/optimizers/fused_novograd.py | 68 | CODE | |
| LOW | apex/optimizers/fused_adam.py | 69 | CODE | |
| LOW | apex/optimizers/fused_mixed_precision_lamb.py | 12 | CODE | |
| LOW | apex/optimizers/fused_lamb.py | 64 | CODE | |
| LOW | apex/optimizers/fused_sgd.py | 77 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | apex/__init__.py | 16 | __all__ = ["normalization", "optimizers"] | 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 | 101 | def _setup_pre_spawn(self) -> None: | CODE |
| LOW | apex/contrib/xentropy/__init__.py | 3 | __all__ = [ | CODE |
| LOW | apex/contrib/torchsched/backend.py | 26 | __all__ = ["get_backend"] | CODE |
| LOW | apex/contrib/torchsched/__init__.py | 20 | __all__ = ["get_backend", "set_default_backend"] | CODE |
| LOW | apex/contrib/torchsched/__init__.py | 45 | 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 | 17 | __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 | 7 | __all__ = ["create_nccl_mem_pool", "init", "nccl_mem"] | CODE |
| LOW | apex/contrib/group_norm/group_norm.py | 18 | __all__ = ["GroupNorm"] | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | apex/contrib/nccl_allocator/nccl_allocator.py | 79 | except RuntimeError: | CODE |
| HIGH | apex/contrib/nccl_allocator/nccl_allocator.py | 87 | except RuntimeError: | CODE |
| HIGH | examples/dcgan/main_amp.py | 46 | except OSError: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 852 | # Check if APEX_PARALLEL_BUILD environment variable is set | COMMENT |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 200 | # Check if buffers support fused kernel | COMMENT |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 789 | # Check if collectives have no_copy option | COMMENT |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 1539 | # Check if buckets are underutilized | COMMENT |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 1725 | # Check if fragment needs to be updated | COMMENT |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 2169 | # Check if provided parameters are subset of all parameters | COMMENT |
| LOW | apex/contrib/optimizers/distributed_fused_adam.py | 2795 | # Check if param shard is already in expected dtype | COMMENT |
| LOW | apex/contrib/optimizers/distributed_fused_lamb.py | 199 | # Check if collectives have no_copy option | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | apex/contrib/torchsched/backend.py | 262 | 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 | 234 | 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 | 322 | # Step 1: use the Torch.FX library to build the graph | COMMENT |
| LOW⚡ | apex/contrib/sparsity/asp.py | 323 | # Step 2: permutation search with the customized kernel | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | apex/contrib/sparsity/asp.py | 322 | # Step 1: use the Torch.FX library to build the graph | COMMENT |
| LOW⚡ | apex/contrib/sparsity/asp.py | 323 | # Step 2: permutation search with the customized kernel | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | apex/contrib/sparsity/permutation_lib.py | 1636 | # if it's a real node, just add it | COMMENT |
| LOW | apex/contrib/sparsity/permutation_lib.py | 1694 | # if it's a real node, just add it | COMMENT |
| MEDIUM | apex/contrib/sparsity/permutation_lib.py | 254 | """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 | 1952 | except Exception as ex: | CODE |
| LOW | apex/contrib/torchsched/inductor/scheduler.py | 444 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/L1/common/main_amp.py | 456 | # 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 | 1823 | if node.op == "placeholder": | CODE |