AI Slop Code RIsk Monitor

tinygrad/tinygrad

You like pytorch? You like micrograd? You love tinygrad! ❤️

13.8 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for tinygrad/tinygrad, a Python project with 33,736 GitHub stars. SynthScan examined 412,310 lines of code across 1217 source files, recording 4827 pattern matches distributed across 19 syntactic categories. The legacy adjusted pattern signal is 13.8 (Moderate pattern signal); it is not an authorship estimate.

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

13.8
Adjusted Signal
13.8
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
33.7K
Stars
Python
Language
412.3K
Lines of Code
1.2K
Files
4.8K
Pattern Hits
2026-10-12
Scan Date
0.33
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 33.2/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 8.8/100 · LOW

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

Agent Over-Engineering Ratio 37.8/100 · MEDIUM

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

PR Review Velocity Impact 57.8/100 · HIGH

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

What These Metrics Mean

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

Pattern-Signal History

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

Severity Breakdown

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

CRITICAL 5HIGH 395MEDIUM 134LOW 4293

Directory Score Breakdown

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

Pattern Findings

The scanner identified 4827 distinct pattern matches across 19 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers2243 hits · 2259 pts
SeverityFileLineSnippetContext
LOWtest/testextra/test_hk_fa.py82 def test_fast_fa_bwd_causal_jitted(self):CODE
LOWtest/testextra/test_bench_log.py16 def test_log_single_wall_time(self):CODE
LOWtest/testextra/test_bench_log.py26 def test_log_double_wall_time(self):CODE
LOWtest/testextra/test_bench_log.py42 def test_log_single_kernel_time(self):CODE
LOWtest/testextra/test_bench_log.py59 def test_interleaved_wall_kernel_time(self):CODE
LOWtest/testextra/test_bench_log.py81 def test_stacked_wall_kernel_time(self):CODE
LOWtest/testextra/test_tk.py78 def test_simple_matmul_transposed(self):CODE
LOWtest/testextra/test_tk.py164 def test_load_store_local_hop(self):CODE
LOWtest/testextra/test_tk.py204 def test_load_store_multioutput(self):CODE
LOWtest/testextra/test_tk.py887 def test_fast_fa_bwd_causal_jitted(self):CODE
LOWtest/testextra/test_tk.py938 def test_fast_fa_bwd_multidevice(self):CODE
LOW⚡test/testextra/test_lr_scheduler.py88 def test_reducelronplateau_max(self): self._test_reducelronplateau(100, {'mode': 'max'}, 1e-6, 1e-6)CODE
LOW⚡test/testextra/test_lr_scheduler.py89 def test_reducelronplateau_factor(self): self._test_reducelronplateau(100, {'factor': 0.1337}, 1e-6, 1e-6)CODE
LOW⚡test/testextra/test_lr_scheduler.py90 def test_reducelronplateau_patience(self): self._test_reducelronplateau(100, {'patience': 3}, 1e-6, 1e-6)CODE
LOW⚡test/testextra/test_lr_scheduler.py91 def test_reducelronplateau_threshold(self): self._test_reducelronplateau(100, {'threshold': 1e-6}, 1e-6, 1e-6)CODE
LOW⚡test/testextra/test_lr_scheduler.py92 def test_reducelronplateau_threshold_mode(self): self._test_reducelronplateau(100, {'threshold_mode': 'abs'}, 1e-6, 1eCODE
LOW⚡test/testextra/test_lr_scheduler.py95 def test_cosineannealinglr_eta_min(self): self._test_cosineannealinglr(100, {'eta_min': 0.001}, 1e-6, 1e-6)CODE
LOWtest/testextra/test_export_model.py21 def test_multi_input_model_export(self):CODE
LOWtest/testextra/test_export_model.py36 def test_multi_output_model_export(self):CODE
LOWtest/testextra/test_export_model.py54 def test_exported_input_output_dtypes(self):CODE
LOWtest/testextra/test_export_model.py71 def test_weights_bound_to_safetensor(self):CODE
LOWtest/testextra/test_mockgpu.py7 def test_import_typing_extensions(self):CODE
LOWtest/speed/external_test_device_speed.py29 def test_profile_launch_speed(self):CODE
LOWtest/speed/external_test_speed_v_torch.py69def helper_test_generic_square(name, N, f1, f2, onearg=False):CODE
LOW⚡test/speed/external_test_speed_v_torch.py244 def test_gemm_unrolled_permute_l(self):CODE
LOW⚡test/speed/external_test_speed_v_torch.py250 def test_gemm_unrolled_permute_r(self):CODE
LOW⚡test/speed/external_test_speed_v_torch.py256 def test_gemm_unrolled_permute_lr(self):CODE
LOWtest/runtime/test_tensor.py32 def test_deviceless_const_realize_noop(self):CODE
LOWtest/runtime/test_tensor.py73 def test_accumulate_gradients(self):CODE
LOWtest/runtime/test_tensor.py91 def test_second_order_backward_pass(self):CODE
LOWtest/runtime/test_tensor.py134 def test_backward_pass_diamond_model(self):CODE
LOWtest/runtime/test_tensor.py182 def test_const_backward_pass_optimizer(self):CODE
LOWtest/runtime/test_tensor.py244 def test_random_fns_are_deterministic_with_seed(self):CODE
LOWtest/runtime/test_tensor.py260 def test_randn_isnt_inf_on_zero(self):CODE
LOWtest/runtime/test_tensor.py316 def test_tensor_mixed_list_tuple(self):CODE
LOWtest/runtime/test_tensor.py328 def test_tensor_list_implicit_cast(self):CODE
LOWtest/runtime/test_tensor.py343 def test_tensor_list_special_values(self):CODE
LOWtest/runtime/test_tensor.py385 def test_copy_from_numpy_dtype(self):CODE
LOWtest/runtime/test_tensor.py397 def test_copy_from_numpy_unaligned(self):CODE
LOWtest/runtime/test_tensor.py409 def test_item_to_tensor_to_item(self):CODE
LOWtest/runtime/test_tensor.py421 def test_no_attributeerror_after_apply_uop_exception(self):CODE
LOWtest/runtime/test_tensor.py581 def test_reduce_over_non_zero(self):CODE
LOW⚡test/runtime/test_tensor.py606 def test_clone_deviceless_const(self):CODE
LOW⚡test/runtime/test_tensor.py611 def test_numpy_deviceless_const(self):CODE
LOW⚡test/runtime/test_tensor.py620 def test_clone_with_shrink_realized(self):CODE
LOWtest/runtime/test_tensor.py634 def test_clone_deviceless_const_to_device(self):CODE
LOWtest/runtime/test_gradient.py21 def test_with_custom_gradient(self):CODE
LOWtest/runtime/test_gradient.py43 def test_copy_to_device_gradient(self):CODE
LOWtest/runtime/test_gradient.py49 def test_multi_device_copy_gradient(self):CODE
LOW⚡test/runtime/test_gradient.py70 def test_gradient_through_clone_from_grad_src(self):CODE
LOW⚡test/runtime/test_gradient.py78 def test_gradient_through_clone_from_detached_src(self):CODE
LOW⚡test/runtime/test_gradient.py85 def test_gradient_through_chained_unrealized_setitem(self):CODE
LOW⚡test/runtime/test_gradient.py93 def test_implicit_broadcast_where_gradient(self):CODE
LOW⚡test/runtime/test_gradient.py102 def test_implicit_broadcast_alu_gradient(self):CODE
LOW⚡test/runtime/test_gradient.py111 def test_implicit_broadcast_intermediate_accumulation(self):CODE
LOW⚡test/runtime/test_gradient.py120 def test_max_backward_many_ties(self):CODE
LOWtest/runtime/test_gradient.py139 def test_custom_kernel_multi_output_backward(self):CODE
LOWtest/runtime/test_gradient.py151 def test_custom_kernel_aliased_output_views_backward(self):CODE
LOWtest/runtime/test_gradient.py165 def test_custom_kernel_multi_output_backward_interacting(self):CODE
LOWtest/runtime/test_gradient.py177 def test_custom_kernel_three_output_backward(self):CODE
2183 more matches not shown…
Empty Error Handlers368 hits · 1132 pts
SeverityFileLineSnippetContext
HIGHtest/runtime/test_tensor_cores.py60except KernelOptError: passCODE
HIGHtest/runtime/test_tensor_variable.py19except RuntimeError: passCODE
HIGHtest/runtime/test_disk_tensor.py473except PermissionError: passCODE
HIGHtest/amd/test_llvm.py59except ValueError: passCODE
HIGHtest/amd/test_llvm.py129except Exception: passCODE
HIGHtest/null/test_gc.py13except ReferenceError:CODE
HIGHtest/mockgpu/amd/pcode.py1223except (ValueError, SyntaxError): pass # non-constant slice bounds - fall through to other statement formsCODE
HIGHtinygrad/helpers.py270except (FileNotFoundError, ValueError, ZeroDivisionError): passCODE
HIGHtinygrad/helpers.py520except ImportError: passCODE
HIGHtinygrad/llm/serve.py38except json.JSONDecodeError: passCODE
HIGHtinygrad/runtime/ops_cl.py51except (TypeError, AttributeError): passCODE
HIGHtinygrad/runtime/ops_cl.py53except (TypeError, AttributeError): passCODE
HIGHtinygrad/runtime/ops_disk.py48except BufferError: passCODE
HIGHtinygrad/runtime/support/compiler_amd.py10except AttributeError: pass # ignore if ROCm isn't installedCODE
HIGHtinygrad/runtime/support/elf.py12except (OSError, AttributeError, TypeError): passCODE
HIGHtinygrad/runtime/autogen/libc.py699except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/libc.py701except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/libc.py973except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/libc.py975except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/libc.py977except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/corefoundation.py203except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/corefoundation.py205except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/corefoundation.py207except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/corefoundation.py209except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/corefoundation.py211except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/corefoundation.py213except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/corefoundation.py215except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/corefoundation.py217except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/corefoundation.py219except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/corefoundation.py221except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/corefoundation.py223except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/corefoundation.py225except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/corefoundation.py227except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/corefoundation.py229except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/corefoundation.py231except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/corefoundation.py233except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/metal.py1013except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/metal.py1015except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/metal.py1017except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/metal.py1046except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/mesa.py14except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/mesa.py16except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/mesa.py376except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/mesa.py990except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/mesa.py2734except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/mesa.py2992except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/mesa.py4113except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/mesa.py4115except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/mesa.py5376except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/mesa.py5378except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/mesa.py5380except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/mesa.py5382except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/mesa.py5384except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/mesa.py5386except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/mesa.py5388except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/mesa.py5390except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/mesa.py5392except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/mesa.py5394except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/mesa.py5396except (ValueError,AttributeError): passCODE
HIGHtinygrad/runtime/autogen/mesa.py5398except (ValueError,AttributeError): passCODE
308 more matches not shown…
Over-Commented Block1004 hits · 683 pts
SeverityFileLineSnippetContext
LOWmkdocs.yml141- markdown-execCOMMENT
LOWtest/runtime/test_indexing.py981COMMENT
LOWtest/runtime/test_indexing.py1101 # numpy_testing_assert_equal_helper(strided[ri([1]), ri([3])], np.array([15]))COMMENT
LOWtest/runtime/test_indexing.py1121 # setting valuesCOMMENT
LOWtest/runtime/test_jit_cases.py1import unittestCOMMENT
LOWtest/runtime/test_edgecases.py1# end to end tests of tinygrad that you think might be edge cases.COMMENT
LOWtest/null/test_uop_symbolic.py1521 sink = store.sink().end(r0).sink(arg=KernelInfo()) # nested SINK must not split the range independently of ENDCOMMENT
LOWtest/null/test_simplify_valid_idx.py101COMMENT
LOWtest/external/external_test_am.py41# * 56 FCOMMENT
LOWtest/external/mlperf_retinanet/model/utils.py101 """COMMENT
LOW…l/mlperf_bert/preprocessing/create_pretraining_data.py221 # We *usually* want to fill up the entire sequence since we are paddingCOMMENT
LOW…bert/preprocessing/external_test_preprocessing_part.py1# USAGE:COMMENT
LOWtest/external/mlperf_resnet/lars_optimizer.py1# https://github.com/mlcommons/training/blob/e3769c8dcf88cd21e1001dd2f894b40a1513ec5d/image_classification/tensorflow2/lCOMMENT
LOWtest/external/mlperf_resnet/lars_util.py1# https://github.com/mlcommons/training/blob/e237206991d10449d9675d95606459a3cb6c21ad/image_classification/tensorflow2/lCOMMENT
LOWtinygrad/runtime/support/am/amdev.py161 # VF relatedCOMMENT
LOWextra/hook_cuda.py141 #if name == "exp2_kernel_vectorized4_kernel":COMMENT
LOWextra/hook_cuda.py181 #install_hook(cuda.cuFuncGetModule, dummy)COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h201#define ATHUB_BASE__INST0_SEG1 0x02408C00COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h221#define ATHUB_BASE__INST3_SEG3 0COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h241COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h261#define CLK_BASE__INST3_SEG1 0x02402400COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h281#define CLK_BASE__INST6_SEG3 0COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h301COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h321#define DF_BASE__INST6_SEG1 0COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h341#define DIO_BASE__INST2_SEG3 0COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h361COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h381#define DCN_BASE__INST2_SEG1 0COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h401#define DCN_BASE__INST5_SEG3 0COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h421COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h441#define DPCS_BASE__INST5_SEG1 0COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h461#define FUSE_BASE__INST1_SEG3 0COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h481COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h501#define GC_BASE__INST1_SEG1 0COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h521#define GC_BASE__INST4_SEG3 0COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h541COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h561#define HDA_BASE__INST4_SEG1 0COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h581#define HDP_BASE__INST0_SEG3 0COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h601COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h621#define MMHUB_BASE__INST0_SEG1 0x02408800COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h641#define MMHUB_BASE__INST3_SEG3 0COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h661COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h681#define MP0_BASE__INST3_SEG1 0COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h701#define MP0_BASE__INST6_SEG3 0COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h721COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h741#define MP1_BASE__INST6_SEG1 0COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h761#define NBIO_BASE__INST2_SEG3 0COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h781COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h801#define OSSSYS_BASE__INST2_SEG1 0COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h821#define OSSSYS_BASE__INST5_SEG3 0COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h841COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h861#define PCIE0_BASE__INST5_SEG1 0COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h881#define SDMA0_BASE__INST1_SEG3 0COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h901COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h921#define SDMA1_BASE__INST1_SEG1 0COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h941#define SDMA1_BASE__INST4_SEG3 0COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h961COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h981#define SMUIO_BASE__INST4_SEG1 0COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h1001#define THM_BASE__INST0_SEG3 0COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h1021COMMENT
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h1041#define UMC_BASE__INST0_SEG1 0x02425800COMMENT
944 more matches not shown…
Unused Imports586 hits · 568 pts
SeverityFileLineSnippetContext
LOWtest/testextra/test_mockgpu.py8CODE
LOWtest/runtime/test_uops.py6CODE
LOWtest/runtime/test_ops.py11CODE
LOWtest/amd/test_sqtt_encoder.py9CODE
LOWtest/amd/disasm.py2CODE
LOWtest/amd/test_asm_kernel.py12CODE
LOWtest/amd/test_asm_kernel.py208CODE
LOWtest/amd/test_dsl2.py2CODE
LOWtest/amd/test_formats.py7CODE
LOWtest/amd/test_handwritten.py5CODE
LOWtest/amd/test_integration.py4CODE
LOWtest/amd/test_rdna3_asm.py3CODE
LOWtest/amd/hw/test_vop1.py8CODE
LOWtest/amd/hw/test_scratch.py6CODE
LOWtest/amd/hw/test_dpp.py8CODE
LOWtest/amd/hw/test_flat.py6CODE
LOWtest/amd/hw/test_sop.py7CODE
LOWtest/amd/hw/test_vopc.py6CODE
LOWtest/amd/hw/test_vop3p.py6CODE
LOWtest/amd/hw/test_smem.py7CODE
LOWtest/amd/hw/test_ds.py8CODE
LOWtest/amd/hw/test_vop3.py8CODE
LOWtest/amd/hw/test_vop2.py8CODE
LOWtest/amd/hw/test_global.py6CODE
LOWtest/amd/hw/helpers.py7CODE
LOWtest/amd/hw/test_vinterp.py3CODE
LOWtest/null/test_uops.py6CODE
LOWtest/null/test_uops.py15CODE
LOWtest/mockgpu/usb.py1CODE
LOWtest/mockgpu/am/amgpu.py2CODE
LOWtest/mockgpu/am/amdriver.py1CODE
LOWtest/mockgpu/amd/sqtt_enc.py3CODE
LOWtest/mockgpu/amd/emu.py8CODE
LOWtest/device/cpu/test_quantize_onnx.py14CODE
LOWtest/external/fuzz_shape_ops.py1CODE
LOWtest/external/external_test_am_fault_recovery.py4CODE
LOWtest/external/external_benchmark_op_conv.py2CODE
LOWtest/external/external_benchmark_op_conv.py4CODE
LOWtest/external/external_benchmark_op_conv.py5CODE
LOWtest/external/external_benchmark_op_conv.py5CODE
LOWtest/external/mlperf_bert/preprocessing/tokenization.py5CODE
LOWtest/external/mlperf_bert/preprocessing/tokenization.py6CODE
LOWtest/external/mlperf_bert/preprocessing/tokenization.py7CODE
LOW…l/mlperf_bert/preprocessing/create_pretraining_data.py6CODE
LOW…l/mlperf_bert/preprocessing/create_pretraining_data.py7CODE
LOW…l/mlperf_bert/preprocessing/create_pretraining_data.py8CODE
LOWtest/external/mlperf_resnet/lars_optimizer.py20CODE
LOWtest/external/mlperf_resnet/lars_optimizer.py21CODE
LOWtest/external/mlperf_resnet/lars_optimizer.py22CODE
LOWtest/external/mlperf_resnet/lars_optimizer.py26CODE
LOWtest/external/mlperf_resnet/lars_util.py22CODE
LOWtest/external/mlperf_resnet/lars_util.py23CODE
LOWtest/external/mlperf_resnet/lars_util.py24CODE
LOWtest/external/mlperf_resnet/lars_util.py30CODE
LOWtinygrad/device.py1CODE
LOWtinygrad/dtype.py1CODE
LOWtinygrad/__init__.py5CODE
LOWtinygrad/__init__.py6CODE
LOWtinygrad/__init__.py7CODE
LOWtinygrad/__init__.py10CODE
526 more matches not shown…
Decorative Section Separators124 hits · 378 pts
SeverityFileLineSnippetContext
MEDIUMtest/amd/disasm.py41# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/amd/disasm.py43# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/amd/disasm.py63# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/amd/disasm.py65# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/amd/disasm.py81# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/amd/disasm.py83# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/amd/disasm.py103# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/amd/disasm.py105# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/amd/disasm.py171# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/amd/disasm.py173# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/amd/disasm.py640# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/amd/disasm.py642# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/amd/test_sqtt_examples.py20# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/amd/test_sqtt_examples.py22# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/mockgpu/amd/pcode.py101# ═════ FP8 (E4M3) and BF8 (E5M2) conversion helpers ═════COMMENT
MEDIUMtest/mockgpu/amd/pcode.py440# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/mockgpu/amd/pcode.py442# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUM⚡test/mockgpu/amd/emu.py1874# ═══════════════════════════════════════════════════════════════════════════════STRING
MEDIUM⚡test/mockgpu/amd/emu.py1876# ═══════════════════════════════════════════════════════════════════════════════STRING
MEDIUMtest/mockgpu/amd/emu.py286# ═══════════════════════════════════════════════════════════════════════════════STRING
MEDIUMtest/mockgpu/amd/emu.py288# ═══════════════════════════════════════════════════════════════════════════════STRING
MEDIUMtest/mockgpu/amd/emu.py666# ═══════════════════════════════════════════════════════════════════════════════STRING
MEDIUMtest/mockgpu/amd/emu.py668# ═══════════════════════════════════════════════════════════════════════════════STRING
MEDIUMtest/mockgpu/amd/emu.py1824# ═══════════════════════════════════════════════════════════════════════════════STRING
MEDIUMtest/mockgpu/amd/emu.py1826# ═══════════════════════════════════════════════════════════════════════════════STRING
MEDIUMtest/mockgpu/amd/emu.py1926# ═══════════════════════════════════════════════════════════════════════════════STRING
MEDIUMtest/mockgpu/amd/emu.py1928# ═══════════════════════════════════════════════════════════════════════════════STRING
MEDIUMtest/external/mlperf_resnet/lars_optimizer.py17# ==============================================================================COMMENT
MEDIUMtest/external/mlperf_resnet/lars_util.py19# ==============================================================================COMMENT
MEDIUMtinygrad/renderer/amd/sqtt.py14# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtinygrad/renderer/amd/sqtt.py16# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtinygrad/renderer/amd/sqtt.py180# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtinygrad/renderer/amd/sqtt.py182# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtinygrad/renderer/amd/sqtt.py205# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtinygrad/renderer/amd/sqtt.py207# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtinygrad/renderer/amd/sqtt.py252# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtinygrad/renderer/amd/sqtt.py254# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtinygrad/renderer/amd/sqtt.py431# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtinygrad/renderer/amd/sqtt.py433# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtinygrad/renderer/amd/sqtt.py566# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtinygrad/renderer/amd/sqtt.py568# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtinygrad/renderer/amd/sqtt.py648# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtinygrad/renderer/amd/sqtt.py650# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtinygrad/renderer/amd/sqtt.py725# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtinygrad/renderer/amd/sqtt.py727# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtinygrad/renderer/amd/dsl.py4# ══════════════════════════════════════════════════════════════COMMENT
MEDIUMtinygrad/renderer/amd/dsl.py6# ══════════════════════════════════════════════════════════════COMMENT
MEDIUMtinygrad/renderer/amd/dsl.py91# ══════════════════════════════════════════════════════════════COMMENT
MEDIUMtinygrad/renderer/amd/dsl.py93# ══════════════════════════════════════════════════════════════COMMENT
MEDIUMtinygrad/renderer/amd/dsl.py142# ══════════════════════════════════════════════════════════════COMMENT
MEDIUMtinygrad/renderer/amd/dsl.py144# ══════════════════════════════════════════════════════════════COMMENT
MEDIUM⚡tinygrad/renderer/amd/dsl.py234# ══════════════════════════════════════════════════════════════COMMENT
MEDIUM⚡tinygrad/renderer/amd/dsl.py236# ══════════════════════════════════════════════════════════════COMMENT
MEDIUM⚡tinygrad/renderer/amd/dsl.py244# ══════════════════════════════════════════════════════════════COMMENT
MEDIUM⚡tinygrad/renderer/amd/dsl.py246# ══════════════════════════════════════════════════════════════COMMENT
MEDIUMtinygrad/renderer/amd/generate.py7# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtinygrad/renderer/amd/generate.py9# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtinygrad/renderer/amd/generate.py44# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtinygrad/renderer/amd/generate.py46# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtinygrad/renderer/amd/generate.py72# ═══════════════════════════════════════════════════════════════════════════════COMMENT
64 more matches not shown…
Deep Nesting307 hits · 297 pts
SeverityFileLineSnippetContext
LOWsz.py17CODE
LOWtest/testextra/test_bench_log.py81CODE
LOWtest/speed/external_test_copy_speed.py80CODE
LOWtest/runtime/test_gguf.py231CODE
LOWtest/runtime/test_gguf.py309CODE
LOWtest/runtime/test_gguf.py354CODE
LOWtest/runtime/test_symbolic_ops.py282CODE
LOWtest/runtime/test_symbolic_ops.py310CODE
LOWtest/runtime/test_dtype_spec.py167CODE
LOWtest/runtime/test_llm_moe.py99CODE
LOWtest/runtime/test_multitensor.py477CODE
LOWtest/runtime/test_multitensor.py1001CODE
LOWtest/runtime/test_tensor_cores.py206CODE
LOWtest/runtime/test_nn.py15CODE
LOWtest/runtime/test_disk_tensor.py572CODE
LOWtest/runtime/test_uops.py111CODE
LOWtest/runtime/test_uops.py178CODE
LOWtest/runtime/test_ops.py1809CODE
LOWtest/runtime/test_ops.py1824CODE
LOWtest/runtime/test_ops.py2317CODE
LOWtest/runtime/test_ops.py2346CODE
LOWtest/runtime/test_ops.py2355CODE
LOWtest/runtime/test_ops.py2460CODE
LOWtest/runtime/test_call.py266CODE
LOWtest/amd/disasm.py47CODE
LOWtest/amd/disasm.py151CODE
LOWtest/amd/disasm.py284CODE
LOWtest/amd/disasm.py334CODE
LOWtest/amd/disasm.py724CODE
LOWtest/amd/test_sqtt_examples.py24CODE
LOWtest/amd/test_sqtt_examples.py45CODE
LOWtest/amd/test_sqtt_examples.py110CODE
LOWtest/amd/test_sqtt_examples.py121CODE
LOWtest/amd/test_sqtt_examples.py165CODE
LOWtest/amd/test_sqtt_examples.py195CODE
LOWtest/amd/test_sqttmap.py86CODE
LOWtest/amd/test_sqttmap.py97CODE
LOWtest/amd/test_sqttmap.py121CODE
LOWtest/amd/test_sqttmap.py151CODE
LOWtest/amd/test_roundtrip.py57CODE
LOWtest/amd/test_roundtrip.py115CODE
LOWtest/amd/test_llvm.py84CODE
LOWtest/amd/test_llvm.py85CODE
LOWtest/amd/test_emu_memory.py59CODE
LOWtest/amd/hw/helpers.py276CODE
LOWtest/null/test_uir_render.py46CODE
LOWtest/null/test_dtype_spec.py164CODE
LOWtest/null/test_dtype_spec.py172CODE
LOWtest/null/test_tqdm.py75CODE
LOWtest/null/test_tqdm.py256CODE
LOWtest/null/test_viz.py542CODE
LOWtest/null/test_graph_rewrite.py195CODE
LOWtest/null/test_graph_rewrite.py205CODE
LOWtest/null/test_hcq2.py55CODE
LOWtest/null/test_postrange.py50CODE
LOWtest/null/test_uop_symbolic.py109CODE
LOWtest/mockgpu/mockgpu.py52CODE
LOWtest/mockgpu/usb.py87CODE
LOWtest/mockgpu/usb.py126CODE
LOWtest/mockgpu/usb.py161CODE
247 more matches not shown…
Cross-Language Confusion24 hits · 125 pts
SeverityFileLineSnippetContext
HIGHtest/amd/test_formats.py155 # v_add3_u32 v5, null, exec_lo, 0xaf123456COMMENT
HIGHtest/amd/test_rdna3_asm.py37 "s_mulk_i32 s3, 0x87", "v_mad_u64_u32 v[1:2], null, s2, 3, v[1:2]", "v_mul_u32_u24_e32 v0, 45, v0",CODE
HIGHtest/mockgpu/amd/call.py54 return UPat.any(reg, reg.ne(null).where(reg, UPat.const(Invalid)))CODE
HIGHtinygrad/runtime/ops_metal.py76 proc = subprocess.Popen(f"cd {pathlib.Path(__file__).parents[2]}/extra/disassemblers/applegpu && python3 compiler_CODE
HIGHtinygrad/runtime/autogen/__init__.py57def _extract_deb(path:str): subprocess.run("ar x *.deb && tar xf data.tar.*", cwd=path, shell=True, check=True)CODE
HIGHtinygrad/runtime/autogen/amd/cdna/str_pcode.py577 SOPPOp.S_CBRANCH_CDBGSYS_OR_USER: "if (WAVE_STATUS.COND_DBG_SYS || WAVE_STATUS.COND_DBG_USER) then\nPC = PC + signext(CODE
HIGHtinygrad/runtime/autogen/amd/cdna/str_pcode.py578 SOPPOp.S_CBRANCH_CDBGSYS_AND_USER: "if (WAVE_STATUS.COND_DBG_SYS && WAVE_STATUS.COND_DBG_USER) then\nPC = PC + signextCODE
HIGHtinygrad/runtime/autogen/amd/cdna/str_pcode.py673 VOP2Op.V_MIN_F32_E32: "if (WAVE_MODE.IEEE && isSignalNAN(64'F(S0.f32))) then\nD0.f32 = 32'F(cvtToQuietNAN(64'F(S0.f32)CODE
HIGHtinygrad/runtime/autogen/amd/cdna/str_pcode.py674 VOP2Op.V_MAX_F32_E32: "if (WAVE_MODE.IEEE && isSignalNAN(64'F(S0.f32))) then\nD0.f32 = 32'F(cvtToQuietNAN(64'F(S0.f32)CODE
HIGHtinygrad/runtime/autogen/amd/cdna/str_pcode.py708 VOP2Op.V_MAX_F16_E32: "if (WAVE_MODE.IEEE && isSignalNAN(64'F(S0.f16))) then\nD0.f16 = 16'F(cvtToQuietNAN(64'F(S0.f16)CODE
HIGHtinygrad/runtime/autogen/amd/cdna/str_pcode.py709 VOP2Op.V_MIN_F16_E32: "if (WAVE_MODE.IEEE && isSignalNAN(64'F(S0.f16))) then\nD0.f16 = 16'F(cvtToQuietNAN(64'F(S0.f16)CODE
HIGHtinygrad/runtime/autogen/amd/cdna/str_pcode.py933 VOP3Op.V_MIN_F32_E64: "if (WAVE_MODE.IEEE && isSignalNAN(64'F(S0.f32))) then\nD0.f32 = 32'F(cvtToQuietNAN(64'F(S0.f32)CODE
HIGHtinygrad/runtime/autogen/amd/cdna/str_pcode.py934 VOP3Op.V_MAX_F32_E64: "if (WAVE_MODE.IEEE && isSignalNAN(64'F(S0.f32))) then\nD0.f32 = 32'F(cvtToQuietNAN(64'F(S0.f32)CODE
HIGHtinygrad/runtime/autogen/amd/cdna/str_pcode.py958 VOP3Op.V_MAX_F16_E64: "if (WAVE_MODE.IEEE && isSignalNAN(64'F(S0.f16))) then\nD0.f16 = 16'F(cvtToQuietNAN(64'F(S0.f16)CODE
HIGHtinygrad/runtime/autogen/amd/cdna/str_pcode.py959 VOP3Op.V_MIN_F16_E64: "if (WAVE_MODE.IEEE && isSignalNAN(64'F(S0.f16))) then\nD0.f16 = 16'F(cvtToQuietNAN(64'F(S0.f16)CODE
HIGHtinygrad/runtime/autogen/amd/cdna/str_pcode.py1099 VOP3Op.V_MIN_F64: "if (WAVE_MODE.IEEE && isSignalNAN(S0.f64)) then\nD0.f64 = cvtToQuietNAN(S0.f64)\nelsif (WAVE_MODE.ICODE
HIGHtinygrad/runtime/autogen/amd/cdna/str_pcode.py1100 VOP3Op.V_MAX_F64: 'if (WAVE_MODE.IEEE && isSignalNAN(S0.f64)) then\nD0.f64 = cvtToQuietNAN(S0.f64)\nelsif (WAVE_MODE.ICODE
HIGHtinygrad/runtime/autogen/amd/rdna3/str_pcode.py115 DSOp.DS_BVH_STACK_RTN_B32: '(stack_base, stack_index) = DECODE_ADDR(ADDR, OFFSET1);\nlast_node_ptr = DATA0;\n// First CODE
HIGHtinygrad/runtime/autogen/amd/rdna3/str_pcode.py598 SOPPOp.S_CBRANCH_CDBGSYS_OR_USER: "if (WAVE_STATUS.COND_DBG_SYS || WAVE_STATUS.COND_DBG_USER) then\nPC = PC + signext(CODE
HIGHtinygrad/runtime/autogen/amd/rdna3/str_pcode.py599 SOPPOp.S_CBRANCH_CDBGSYS_AND_USER: "if (WAVE_STATUS.COND_DBG_SYS && WAVE_STATUS.COND_DBG_USER) then\nPC = PC + signextCODE
HIGHtinygrad/uop/ops.py1146 # a signed or float destination holds the part of the source that overlaps it: overflow is undefined, a nan bound COMMENT
HIGHextra/mlx_driver/connect.py18 SSH + [f"cd ~/tinygrad && sudo PYTHONPATH=. MLX_DEBUG=1 MLX_PCI={REMOTE_PCI} MLX_IP={REMOTE_IP} python3 extra/mlx_drivCODE
HIGHextra/nv_pma/cupti/cu_prof_ext.py53 if DEBUG >= 1: print(" CUPTI: PC sampling needs: echo 'options nvidia NVreg_RestrictProfilingToAdminUsers=0'|CODE
HIGHexamples/webgpu/stable_diffusion/compile.py134 const metadata = safetensor ? getTensorMetadata(safetensor[0]) : null;CODE
Excessive Try-Catch Wrapping78 hits · 85 pts
SeverityFileLineSnippetContext
LOWtest/helpers.py171 except Exception as e: self.skipTest(f"second device not available: {e}")CODE
LOWtest/runtime/test_multitensor.py26 except Exception as e:CODE
LOWtest/runtime/test_jit.py688 except Exception: raise unittest.SkipTest("no multidevice")CODE
LOWtest/runtime/test_jit.py708 except Exception: raise unittest.SkipTest("no multidevice")CODE
LOWtest/runtime/test_profiler.py117 except Exception as e: self.skipTest(f"second device not available {e}")CODE
LOWtest/runtime/test_profiler.py133 except Exception as e: self.skipTest(f"second device not available {e}")CODE
LOWtest/runtime/test_profiler.py147 except Exception as e: self.skipTest(f"second device not available {e}")CODE
LOWtest/runtime/test_profiler.py178 except Exception as e: self.skipTest(f"multiple devices not available {e}")CODE
LOWtest/runtime/test_ops.py51 except Exception as e:CODE
LOWtest/amd/test_sqtt_examples.py84 except Exception as e: exc = eCODE
LOWtest/amd/test_sqttmap.py30 except Exception as e: self.skipTest(f"latest rocprof not available, install with extra/sqtt/install_rocprof_decoderCODE
LOWtest/amd/test_roundtrip.py153 except Exception as e:CODE
LOWtest/amd/test_emu2_pcode.py385 except Exception as e: self.fail(f"[{arch}] {op.name}: {e}\nPcode: {pcode[:200]}")CODE
LOWtest/amd/test_llvm.py117 except Exception: skipped += 1CODE
LOWtest/amd/test_llvm.py129 except Exception: passCODE
LOWtest/null/test_device.py80 except Exception as e: self.skipTest(f"skipping compiler test: not all compilers: {e}")CODE
LOWtest/null/test_device.py94 except Exception as e: self.skipTest(f"skipping compiler test: not all compilers: {e}")CODE
LOWtest/null/test_device.py111 except Exception as e: self.skipTest(f"skipping compiler test: not all compilers: {e}")CODE
LOW⚡test/null/test_device.py127 except Exception as e: self.skipTest(f"skipping: LLVM not available: {e}")CODE
LOWtest/mockgpu/am/amgpu.py35 except Exception: return {}CODE
LOW⚡test/mockgpu/amd/emu.py1869 except Exception as e:STRING
LOW⚡test/mockgpu/amd/emu.py1871 except Exception: inst_str = f"<{type(inst).__name__}>"STRING
LOWtest/mockgpu/amd/emu.py38 except Exception: return None, 0STRING
LOWtest/mockgpu/nv/nvgpu.py99 except Exception as e: print("failed to execute:", e)CODE
LOWtest/device/amd/test_asm_gemm.py15 except Exception: return FalseCODE
LOWtest/external/external_test_process_count.py15 except Exception as e:CODE
LOW⚡test/external/external_model_benchmark.py75 except Exception as e:CODE
LOW⚡test/external/external_model_benchmark.py81 except Exception as e: print(f"{m:16s}torch_cpu {type(e).__name__:>25}")CODE
LOW⚡test/external/external_model_benchmark.py87 except Exception as e: print(f"{m:16s}torch_{torch_device} {type(e).__name__:>25}")CODE
LOWtest/external/external_model_benchmark.py99 except Exception as e: print(f"{m:16s}onnxruntime_{backend.lower()} {type(e).__name__:>25}")CODE
LOWtest/external/external_test_example.py19 except Exception:CODE
LOWtest/external/external_test_example.py58 except Exception:CODE
MEDIUMtest/external/external_test_example.py55def test_example_matmul(self, device):CODE
LOWtest/external/external_fuzz_hcq_mp.py33 except Exception as e:CODE
LOWtest/external/external_test_gpu_crash.py34 except Exception:CODE
LOWtest/external/process_replay/process_replay.py96 except Exception as e:CODE
LOWtest/external/process_replay/process_replay.py125 except Exception as e:CODE
LOW⚡tinygrad/device.py522 except Exception as e: iface_results.append(f"{colored('-', 'red')} {iface.__name__[:-5]}: {e}")CODE
LOW⚡tinygrad/device.py529 except Exception as e: ren_results.append(f"{colored('-', 'red')} {d._renderer_name(r)}: {e}")CODE
LOW⚡tinygrad/device.py532 except Exception as e: result = f"{colored('FAIL', 'red')} {e}"CODE
LOWtinygrad/helpers.py151 except Exception as e: excs.append(e)CODE
LOWtinygrad/runtime/support/autogen.py288 except Exception as e: raise Exception("parsing failed") from eCODE
LOWtinygrad/runtime/support/compiler_mesa.py80 except Exception as e: print("Failed to generate SASS", str(e), "Make sure your PATH contains nvdisasm binary of comCODE
LOWtinygrad/runtime/support/compiler_cuda.py44 except Exception as e: print("Failed to generate SASS", str(e), "Make sure your PATH contains ptxas/nvdisasm binary ofCODE
LOWtinygrad/runtime/support/compileserver.py9 except Exception as e:CODE
LOWtinygrad/runtime/autogen/__init__.py53 except Exception as e: raise RuntimeError(f"error while generating {name}") from eCODE
LOWtinygrad/codegen/opt/search.py73 except Exception as e:CODE
LOWtinygrad/codegen/opt/search.py147 except Exception as e:CODE
LOWtinygrad/viz/serve.py159 except Exception:CODE
LOWtinygrad/viz/serve.py297 except Exception:CODE
LOWtinygrad/viz/serve.py542 except Exception: traceback.print_exc(file=buf)CODE
LOWtinygrad/uop/ops.py1706 except Exception as e:CODE
LOWextra/setup_tinygpu_osx.sh6except Exception as e:CODE
LOWextra/weekly_commits_table.py25except Exception:CODE
LOWextra/nv_pma/collect.py132 except Exception as e:CODE
LOWextra/hcq1/test_hcq.py317 except Exception: self.skipTest("no multidevice, test skipped")CODE
LOWextra/hcq1/test_hcq.py380 except Exception: self.skipTest("no multidevice, test skipped")CODE
LOWextra/hcq1/test_hcq.py460 except Exception: self.skipTest("no multidevice, test skipped")CODE
LOWextra/hcq1/test_hcq.py576 except Exception: breakCODE
LOWextra/hcq1/test_hcq.py605 except Exception: self.skipTest("no AMD device, test skipped")CODE
18 more matches not shown…
Hallucination Indicators5 hits · 55 pts
SeverityFileLineSnippetContext
CRITICALtinygrad/renderer/llvmir.py62 # example: %wmma0 = call <8 x float> @llvm.amdgcn.wmma.f32.16x16x16.f16(<16 x half> %v99,<16 x half> %v100,<8 x float>COMMENT
CRITICALtinygrad/renderer/llvmir.py278do_bf8: %packed_bf8 = call i32 @llvm.amdgcn.cvt.pk.bf8.f32(float %phi_val, float %phi_val, i32 0, i1 false)\n br label CODE
CRITICALtinygrad/renderer/llvmir.py279do_fp8: %packed_fp8 = call i32 @llvm.amdgcn.cvt.pk.fp8.f32(float %phi_val, float %phi_val, i32 0, i1 false)\n br label CODE
CRITICALextra/hcq1/ops_amd_old.py734 self.dev.iface.pci_dev.usb.scsi_read_arm(lsize:=min(cp_size, dest.nbytes - i))CODE
CRITICAL…/tinychat/assets/unpkg.com/marked@13.0.0/marked.min.js6!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?defCODE
AI Structural Patterns36 hits · 34 pts
SeverityFileLineSnippetContext
LOWtest/runtime/test_optim.py35CODE
LOWtest/runtime/test_jit.py585CODE
LOWtest/runtime/test_softmax_fusion.py28CODE
LOWtest/runtime/test_ops.py23CODE
LOWtest/external/external_test_lr_schedule.py22CODE
LOWtest/external/external_test_optim.py33CODE
LOWtest/external/external_test_optim.py47CODE
LOWtest/external/mlperf_retinanet/model/transform.py163CODE
LOWtinygrad/nn/onnx.py565CODE
LOWtinygrad/nn/onnx.py743CODE
LOWtinygrad/nn/onnx.py787CODE
LOWtinygrad/nn/onnx.py1005CODE
LOWtinygrad/nn/onnx.py1051CODE
LOWtinygrad/nn/optim.py83CODE
LOWtinygrad/nn/optim.py101CODE
LOWtinygrad/nn/optim.py153CODE
LOWtinygrad/runtime/ops_amd.py136CODE
LOWtinygrad/runtime/support/autogen.py102CODE
LOWtinygrad/uop/ops.py1438CODE
LOWextra/multitensor.py28CODE
LOWextra/hcq1/ops_amd_old.py94CODE
LOWextra/models/llama.py196CODE
LOWextra/models/resnet.py33CODE
LOWextra/models/resnet.py62CODE
LOWextra/models/mask_rcnn.py867CODE
LOWextra/models/mask_rcnn.py879CODE
LOWextra/models/retinanet.py198CODE
LOWextra/models/bert.py14CODE
LOWextra/models/bert.py43CODE
LOWextra/models/rnnt.py10CODE
LOWextra/gemm/cdna_asm_gemm.py296CODE
LOWexamples/mamba.py93CODE
LOWexamples/beautiful_cartpole.py82CODE
LOWexamples/mixtral.py22CODE
LOWexamples/mlperf/metrics.py46CODE
LOWexamples/mlperf/optim.py40CODE
AI Slop Vocabulary12 hits · 23 pts
SeverityFileLineSnippetContext
MEDIUM⚡test/null/test_llm_tokenizer.py69 self.assertLess(min(tms), 4) # best-of-5 is robust to CI scheduling pauses; new code takes ~60msCODE
LOWtest/mockgpu/amd/emu.py806 # For PAD and SEXT, unused bits are zero (PAD) or sign-extended (SEXT). For DWORD, just return val.STRING
LOWtest/mockgpu/nv/nvdriver.py218 # Profiler commands - just pass through for mockgpuCOMMENT
MEDIUMtest/external/external_llm_eval.py2# uses Meta's exact ARC-Challenge prompt template from lm-evaluation-harness llama3 tasksCOMMENT
LOWtinygrad/nn/optim.py73# LARS is essentially just trust ratio to SGD so if we just set the trust coeff 0.0 it's just standard SGD.COMMENT
LOWtinygrad/nn/optim.py131# LAMB is essentially just the trust ratio part of LARS applied to Adam/W so if we just set the trust ratio to 1.0 it's COMMENT
LOWtinygrad/runtime/ops_metal.py32 # library is loaded first then RTLD_LOCAL library will just use it's symbols. On linux there is RTLD_DEEPBIND to preveCOMMENT
LOWtinygrad/runtime/ops_metal.py66 # Fields other than invoke are unused in this case so we can just use ctypes.byref with negative offset to invoke fiCOMMENT
LOWtinygrad/uop/ops.py1656 # without tracking, we just call the function (unless top-level, which always profiles)COMMENT
LOWextra/models/llama.py150 # if temperature is very low just use argmaxCOMMENT
MEDIUM⚡extra/gemm/amd_asm_matmul.py435# Test harnessCOMMENT
LOWexamples/tools/bandwidth_test.py19 # this copy would be optimized out, just add 1COMMENT
Cross-File Repetition3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHtest/amd/hw/test_dpp.py0.text .globl test .p2align 8 .type test,@function test: .byte {byte_str} .rodata .p2align 6 .amdhsa_kernel test .amdhsa_STRING
HIGHtest/amd/hw/test_cdna_vop3.py0.text .globl test .p2align 8 .type test,@function test: .byte {byte_str} .rodata .p2align 6 .amdhsa_kernel test .amdhsa_STRING
HIGHtest/amd/hw/helpers.py0.text .globl test .p2align 8 .type test,@function test: .byte {byte_str} .rodata .p2align 6 .amdhsa_kernel test .amdhsa_STRING
Redundant / Tautological Comments11 hits · 14 pts
SeverityFileLineSnippetContext
LOWtest/amd/hw/test_vopc.py830 # Set VCC to all 1s firstCOMMENT
LOWtest/amd/hw/test_vopc.py832 # Set EXEC to only lane 0COMMENT
LOWtest/null/test_simplify_valid_idx.py170 s.add(Not(load == simplifed_load)) # Check if they are NOT equivalentCODE
LOWtest/null/test_simplify_valid_idx.py178 s.add(Not(load == wrong_simplifed_load)) # Check if they are NOT equivalentCODE
LOWtest/mockgpu/usb.py103 # Check if upper 32 bits of a 64-bit BARCOMMENT
LOWtest/mockgpu/amd/pcode.py1365 # Check if any branch returned a value (lambda-style)COMMENT
LOWtest/mockgpu/amd/emu.py1841 # Check if instruction matches any cached canonical pattern (must also match instruction type to avoid variant conflicSTRING
LOWtinygrad/renderer/amd/generate.py404 # Check if this is a suffix-only variantCOMMENT
LOWtinygrad/runtime/support/system.py191 os.umask(0) # Set umask to 0 to allow creating files with 0666 permissionsCODE
LOWextra/hcq1/graph.py385 # Check if all devices are HCQCOMMENT
LOWextra/hcq1/graph.py392 # Check if all devices are within the same peer group. Allow cross-peer-group if all peer groups have RDMA devices.COMMENT
TODO Padding7 hits · 14 pts
SeverityFileLineSnippetContext
LOWtest/mockgpu/amd/amdgpu.py117 for _ in range(n + 1): self._next_dword() # TODO: implementCODE
LOW⚡extra/huggingface_onnx/huggingface_manager.py38 # TODO: implement attribute with graph type and Loop opCOMMENT
LOW⚡extra/huggingface_onnx/huggingface_manager.py40 # TODO: implement SimplifiedLayerNormalization, SkipSimplifiedLayerNormalization, GroupQueryAttentionCOMMENT
LOW⚡extra/huggingface_onnx/huggingface_manager.py42 # TODO: implement SimplifiedLayerNormalization, SkipSimplifiedLayerNormalization, RotaryEmbedding, MultiHeadAttentionCOMMENT
LOW⚡extra/huggingface_onnx/huggingface_manager.py44 # TODO: implement RandomNormalLikeCOMMENT
LOW⚡extra/huggingface_onnx/huggingface_manager.py46 # TODO: implement NonZeroCOMMENT
LOWexamples/mlperf/model_train.py984 # TODO: implement grad accumulation + mlperf loggingCOMMENT
Fake / Example Data8 hits · 8 pts
SeverityFileLineSnippetContext
LOW…re.com/ajax/libs/highlight.js/11.10.0/highlight.min.js317}),ie=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code",CODE
LOWexamples/mlperf/model_train.py1487 def fake_data(bs, samples):CODE
LOWexamples/mlperf/model_train.py1495 return fake_data(BS, SAMPLES)CODE
LOWexamples/mlperf/model_train.py1508 return fake_data(EVAL_BS, EVAL_SAMPLES)CODE
LOWexamples/mlperf/model_train.py1798 def fake_data(bs, samples):CODE
LOWexamples/mlperf/model_train.py1806 return fake_data(BS, SAMPLES)CODE
LOWexamples/mlperf/model_train.py1819 return fake_data(EVAL_BS, EVAL_SAMPLES)CODE
LOW…kg.com/@highlightjs/cdn-assets@11.9.0/highlight.min.js317}),re=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code",CODE
Modern Structural Boilerplate7 hits · 8 pts
SeverityFileLineSnippetContext
LOWtest/null/test_viz.py29 def set_data(self) -> None:CODE
LOWtinygrad/renderer/amd/dsl.py191 if not isinstance(val, Reg): raise TypeError(f"VGPRField requires Reg, got {type(val).__name__}")CODE
LOWtinygrad/renderer/amd/dsl.py207 if not isinstance(val, Reg): raise TypeError(f"{self.__class__.__name__} requires Reg, got {type(val).__name__}")CODE
LOW⚡tinygrad/renderer/amd/dsl.py224 if not isinstance(val, Reg): raise TypeError(f"VDSTYField requires Reg, got {type(val).__name__}")CODE
LOWtinygrad/runtime/autogen/am/__init__.py4__all__ = ["am", "pm4_soc15", "pm4_nv", "sdma_4_0_0", "sdma_5_0_0", "sdma_6_0_0", "smu_13_0_0", "smu_13_0_6", "smu_13_0_CODE
LOWtinygrad/runtime/autogen/nv_regs/__init__.py11__all__ = ["nv_ref", *swref.keys(), *hwref.keys()]CODE
LOWextra/torch_backend/backend.py39def _update_torch_metadata(tensor: torch.Tensor, tiny: Tensor) -> None:CODE
Self-Referential Comments2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMtest/amd/test_emu2_pcode.py213 # Create a mock LDS bufferCOMMENT
MEDIUMtinygrad/runtime/support/compiler_llvm.py33 # Create a per-instance context instead of using the global context to avoid shared state between parallel test procCOMMENT
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOW…ternal/mlperf_bert/external_test_checkpoint_loading.py2# Usage:COMMENT
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippetContext
LOWtest/runtime/test_linearizer.py175 def helper(t, max_ops=0):CODE