Repository Analysis

tinygrad/tinygrad

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

10.7 Low AI signal View on GitHub
10.7
Adjusted Score
10.7
Raw Score
100%
Time Factor
2026-05-30
Last Push
32,876
Stars
Python
Language
393,792
Lines of Code
1079
Files
4173
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 7HIGH 21MEDIUM 130LOW 4015

Pattern Findings

4173 matches across 13 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers2015 hits · 1992 pts
SeverityFileLineSnippet
LOWtest/testextra/test_hk_fa.py82 def test_fast_fa_bwd_causal_jitted(self):
LOWtest/testextra/test_bench_log.py16 def test_log_single_wall_time(self):
LOWtest/testextra/test_bench_log.py26 def test_log_double_wall_time(self):
LOWtest/testextra/test_bench_log.py42 def test_log_single_kernel_time(self):
LOWtest/testextra/test_bench_log.py59 def test_interleaved_wall_kernel_time(self):
LOWtest/testextra/test_bench_log.py81 def test_stacked_wall_kernel_time(self):
LOWtest/testextra/test_tk.py78 def test_simple_matmul_transposed(self):
LOWtest/testextra/test_tk.py164 def test_load_store_local_hop(self):
LOWtest/testextra/test_tk.py204 def test_load_store_multioutput(self):
LOWtest/testextra/test_tk.py887 def test_fast_fa_bwd_causal_jitted(self):
LOWtest/testextra/test_tk.py938 def test_fast_fa_bwd_multidevice(self):
LOWtest/testextra/test_lr_scheduler.py93 def test_reducelronplateau_max(self): self._test_reducelronplateau(100, {'mode': 'max'}, 1e-6, 1e-6)
LOWtest/testextra/test_lr_scheduler.py94 def test_reducelronplateau_factor(self): self._test_reducelronplateau(100, {'factor': 0.1337}, 1e-6, 1e-6)
LOWtest/testextra/test_lr_scheduler.py95 def test_reducelronplateau_patience(self): self._test_reducelronplateau(100, {'patience': 3}, 1e-6, 1e-6)
LOWtest/testextra/test_lr_scheduler.py96 def test_reducelronplateau_threshold(self): self._test_reducelronplateau(100, {'threshold': 1e-6}, 1e-6, 1e-6)
LOWtest/testextra/test_lr_scheduler.py97 def test_reducelronplateau_threshold_mode(self): self._test_reducelronplateau(100, {'threshold_mode': 'abs'}, 1e-6, 1e
LOWtest/testextra/test_lr_scheduler.py100 def test_cosineannealinglr_eta_min(self): self._test_cosineannealinglr(100, {'eta_min': 0.001}, 1e-6, 1e-6)
LOWtest/testextra/test_export_model.py21 def test_multi_input_model_export(self):
LOWtest/testextra/test_export_model.py36 def test_multi_output_model_export(self):
LOWtest/testextra/test_export_model.py54 def test_exported_input_output_dtypes(self):
LOWtest/testextra/test_export_model.py71 def test_weights_bound_to_safetensor(self):
LOWtest/testextra/test_mockgpu.py7 def test_import_typing_extensions(self):
LOWtest/unit/test_gradient.py21 def test_with_custom_gradient(self):
LOWtest/unit/test_gradient.py49 def test_non_float_tensor_raise(self):
LOWtest/unit/test_gradient.py54 def test_copy_to_device_gradient(self):
LOWtest/unit/test_gradient.py72 def test_gradient_through_clone_from_grad_src(self):
LOWtest/unit/test_gradient.py80 def test_gradient_through_clone_from_detached_src(self):
LOWtest/unit/test_gradient.py87 def test_setitem_on_grad_used_tensor_raises(self):
LOWtest/unit/test_gradient.py93 def test_gradient_through_chained_unrealized_setitem(self):
LOWtest/unit/test_gradient.py101 def test_bare_const_skipped_by_backward(self):
LOWtest/unit/test_gradient.py122 def test_custom_kernel_multi_output_backward(self):
LOWtest/unit/test_gradient.py134 def test_custom_kernel_multi_output_backward_interacting(self):
LOWtest/unit/test_gradient.py146 def test_custom_kernel_three_output_backward(self):
LOWtest/unit/test_tar.py34 def test_tar_extract_returns_dict(self):
LOWtest/unit/test_tar.py38 def test_tar_extract_correct_keys(self):
LOWtest/unit/test_tar.py42 def test_tar_extract_content_size(self):
LOWtest/unit/test_tar.py47 def test_tar_extract_content_values(self):
LOWtest/unit/test_tar.py52 def test_tar_extract_empty_file(self):
LOWtest/unit/test_tar.py56 def test_tar_extract_non_existent_file(self):
LOWtest/unit/test_tar.py60 def test_tar_extract_invalid_file(self):
LOWtest/unit/test_tar.py98 def test_tar_extract_returns_dict(self):
LOWtest/unit/test_tar.py102 def test_tar_extract_correct_keys(self):
LOWtest/unit/test_tar.py106 def test_tar_extract_content_size(self):
LOWtest/unit/test_tar.py111 def test_tar_extract_content_values(self):
LOWtest/unit/test_tar.py116 def test_tar_extract_empty_file(self):
LOWtest/unit/test_tar.py120 def test_tar_extract_non_existent_file(self):
LOWtest/unit/test_tar.py124 def test_tar_extract_invalid_file(self):
LOWtest/unit/test_tar.py128 def test_tar_extract_invalid_file_long(self):
LOWtest/unit/test_invalid_tensor.py46 def test_where_invalid_add_left(self):
LOWtest/unit/test_invalid_tensor.py78 def test_where_reduce_always_true(self):
LOWtest/unit/test_gguf.py114 def test_expected_failure_unknown_type(self):
LOWtest/unit/test_gguf.py250 def test_gguf_load_no_tensor_leak(self):
LOWtest/unit/test_assign.py139 def test_assign_changes_realized_alt(self): return self.test_assign_changes_alt(realize=True)
LOWtest/unit/test_assign.py141 def test_assign_changes_buffer_alt(self):
LOWtest/unit/test_assign.py146 def test_assign_diamond_cycle(self):
LOWtest/unit/test_assign.py155 def test_assign_diamond_contiguous_cycle(self):
LOWtest/unit/test_assign.py163 def test_assign_diamond_possible(self):
LOWtest/unit/test_assign.py170 def test_assign_diamond_possible_contiguous(self):
LOWtest/unit/test_assign.py177 def test_assign_diamond_both_contiguous(self):
LOWtest/unit/test_assign.py377 def test_permuted_assignment_correct(self):
1955 more matches not shown…
Over-Commented Block1000 hits · 678 pts
SeverityFileLineSnippet
LOWtest/unit/test_indexing.py1001 # setting values
LOWtest/unit/test_indexing.py1021 # strided = set_(reference, (2,), (4,), offset=4)
LOWtest/unit/test_indexing.py1121 # [9 11 13 15]]
LOWtest/unit/test_indexing.py1141 # [1, 0]])
LOWtest/unit/test_indexing.py1181 # reference = Tensor.arange(0., 24).realize().reshape(3, 8)
LOWtest/backend/test_jit_cases.py1import unittest
LOWtest/backend/test_edgecases.py1# end to end tests of tinygrad that you think might be edge cases.
LOWtest/null/test_uop_symbolic.py1161 # assert (idx0*(i*4+4)) // (i+1) == (idx0*4)
LOWtest/external/external_test_am.py41# * 56 F
LOWtest/external/mlperf_retinanet/model/utils.py101 """
LOW…l/mlperf_bert/preprocessing/create_pretraining_data.py221 # We *usually* want to fill up the entire sequence since we are padding
LOW…bert/preprocessing/external_test_preprocessing_part.py1# USAGE:
LOWtest/external/mlperf_resnet/lars_optimizer.py1# https://github.com/mlcommons/training/blob/e3769c8dcf88cd21e1001dd2f894b40a1513ec5d/image_classification/tensorflow2/l
LOWtest/external/mlperf_resnet/lars_util.py1# https://github.com/mlcommons/training/blob/e237206991d10449d9675d95606459a3cb6c21ad/image_classification/tensorflow2/l
LOWtinygrad/uop/symbolic.py421 # Skip if x contains DIV/MOD AND IMAGE mode is enabled -> image index e.g. openpilot
LOWextra/hook_cuda.py141 #if name == "exp2_kernel_vectorized4_kernel":
LOWextra/hook_cuda.py181 #install_hook(cuda.cuFuncGetModule, dummy)
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h201#define ATHUB_BASE__INST0_SEG1 0x02408C00
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h221#define ATHUB_BASE__INST3_SEG3 0
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h241
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h261#define CLK_BASE__INST3_SEG1 0x02402400
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h281#define CLK_BASE__INST6_SEG3 0
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h301
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h321#define DF_BASE__INST6_SEG1 0
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h341#define DIO_BASE__INST2_SEG3 0
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h361
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h381#define DCN_BASE__INST2_SEG1 0
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h401#define DCN_BASE__INST5_SEG3 0
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h421
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h441#define DPCS_BASE__INST5_SEG1 0
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h461#define FUSE_BASE__INST1_SEG3 0
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h481
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h501#define GC_BASE__INST1_SEG1 0
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h521#define GC_BASE__INST4_SEG3 0
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h541
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h561#define HDA_BASE__INST4_SEG1 0
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h581#define HDP_BASE__INST0_SEG3 0
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h601
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h621#define MMHUB_BASE__INST0_SEG1 0x02408800
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h641#define MMHUB_BASE__INST3_SEG3 0
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h661
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h681#define MP0_BASE__INST3_SEG1 0
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h701#define MP0_BASE__INST6_SEG3 0
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h721
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h741#define MP1_BASE__INST6_SEG1 0
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h761#define NBIO_BASE__INST2_SEG3 0
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h781
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h801#define OSSSYS_BASE__INST2_SEG1 0
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h821#define OSSSYS_BASE__INST5_SEG3 0
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h841
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h861#define PCIE0_BASE__INST5_SEG1 0
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h881#define SDMA0_BASE__INST1_SEG3 0
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h901
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h921#define SDMA1_BASE__INST1_SEG1 0
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h941#define SDMA1_BASE__INST4_SEG3 0
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h961
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h981#define SMUIO_BASE__INST4_SEG1 0
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h1001#define THM_BASE__INST0_SEG3 0
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h1021
LOWextra/hip_gpu_driver/sienna_cichlid_ip_offset.h1041#define UMC_BASE__INST0_SEG1 0x02425800
940 more matches not shown…
Unused Imports621 hits · 596 pts
SeverityFileLineSnippet
LOWtest/testextra/test_mockgpu.py8
LOWtest/backend/test_linearizer.py18
LOWtest/backend/test_uops.py6
LOWtest/backend/test_ops.py13
LOWtest/amd/test_sqtt_encoder.py9
LOWtest/amd/disasm.py2
LOWtest/amd/test_dsl2.py2
LOWtest/amd/test_formats.py7
LOWtest/amd/test_handwritten.py5
LOWtest/amd/test_integration.py4
LOWtest/amd/test_rdna3_asm.py3
LOWtest/amd/test_custom_kernel.py10
LOWtest/amd/hw/test_vop1.py8
LOWtest/amd/hw/test_scratch.py6
LOWtest/amd/hw/test_dpp.py8
LOWtest/amd/hw/test_flat.py6
LOWtest/amd/hw/test_sop.py7
LOWtest/amd/hw/test_vopc.py6
LOWtest/amd/hw/test_vop3p.py6
LOWtest/amd/hw/test_smem.py7
LOWtest/amd/hw/test_ds.py8
LOWtest/amd/hw/test_vop3.py7
LOWtest/amd/hw/test_vop2.py8
LOWtest/amd/hw/test_global.py6
LOWtest/amd/hw/helpers.py7
LOWtest/amd/hw/test_vinterp.py3
LOWtest/null/test_uops.py6
LOWtest/mockgpu/usb.py1
LOWtest/mockgpu/am/amgpu.py2
LOWtest/mockgpu/am/amdriver.py1
LOWtest/mockgpu/cuda/cuda.py1
LOWtest/mockgpu/amd/emu.py8
LOWtest/external/fuzz_shape_ops.py1
LOWtest/external/external_test_am_fault_recovery.py4
LOWtest/external/external_benchmark_op_conv.py2
LOWtest/external/external_benchmark_op_conv.py5
LOWtest/external/external_benchmark_op_conv.py5
LOWtest/external/mlperf_bert/preprocessing/tokenization.py5
LOWtest/external/mlperf_bert/preprocessing/tokenization.py6
LOWtest/external/mlperf_bert/preprocessing/tokenization.py7
LOW…l/mlperf_bert/preprocessing/create_pretraining_data.py6
LOW…l/mlperf_bert/preprocessing/create_pretraining_data.py7
LOW…l/mlperf_bert/preprocessing/create_pretraining_data.py8
LOWtest/external/mlperf_resnet/lars_optimizer.py20
LOWtest/external/mlperf_resnet/lars_optimizer.py21
LOWtest/external/mlperf_resnet/lars_optimizer.py22
LOWtest/external/mlperf_resnet/lars_optimizer.py26
LOWtest/external/mlperf_resnet/lars_util.py22
LOWtest/external/mlperf_resnet/lars_util.py23
LOWtest/external/mlperf_resnet/lars_util.py24
LOWtest/external/mlperf_resnet/lars_util.py30
LOWtinygrad/device.py1
LOWtinygrad/dtype.py1
LOWtinygrad/__init__.py5
LOWtinygrad/__init__.py6
LOWtinygrad/__init__.py7
LOWtinygrad/__init__.py10
LOWtinygrad/__init__.py11
LOWtinygrad/__init__.py11
LOWtinygrad/__init__.py11
561 more matches not shown…
Decorative Section Separators118 hits · 350 pts
SeverityFileLineSnippet
MEDIUMtest/amd/disasm.py41# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtest/amd/disasm.py43# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtest/amd/disasm.py63# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtest/amd/disasm.py65# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtest/amd/disasm.py81# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtest/amd/disasm.py83# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtest/amd/disasm.py103# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtest/amd/disasm.py105# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtest/amd/disasm.py171# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtest/amd/disasm.py173# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtest/amd/disasm.py640# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtest/amd/disasm.py642# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtest/amd/test_sqtt_examples.py20# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtest/amd/test_sqtt_examples.py22# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtest/mockgpu/amd/pcode.py84# ═════ FP8 (E4M3) and BF8 (E5M2) conversion helpers ═════
MEDIUMtest/mockgpu/amd/pcode.py380# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtest/mockgpu/amd/pcode.py382# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtest/mockgpu/amd/emu.py2103# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtest/mockgpu/amd/emu.py2105# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtest/mockgpu/amd/emu.py76# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtest/mockgpu/amd/emu.py78# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtest/mockgpu/amd/emu.py419# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtest/mockgpu/amd/emu.py421# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtest/mockgpu/amd/emu.py785# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtest/mockgpu/amd/emu.py787# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtest/mockgpu/amd/emu.py2047# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtest/mockgpu/amd/emu.py2049# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtest/mockgpu/amd/emu.py2155# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtest/mockgpu/amd/emu.py2157# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtest/external/mlperf_resnet/lars_optimizer.py17# ==============================================================================
MEDIUMtest/external/mlperf_resnet/lars_util.py19# ==============================================================================
MEDIUMtinygrad/renderer/amd/sqtt.py15# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtinygrad/renderer/amd/sqtt.py17# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtinygrad/renderer/amd/sqtt.py181# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtinygrad/renderer/amd/sqtt.py183# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtinygrad/renderer/amd/sqtt.py206# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtinygrad/renderer/amd/sqtt.py208# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtinygrad/renderer/amd/sqtt.py253# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtinygrad/renderer/amd/sqtt.py255# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtinygrad/renderer/amd/sqtt.py432# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtinygrad/renderer/amd/sqtt.py434# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtinygrad/renderer/amd/sqtt.py577# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtinygrad/renderer/amd/sqtt.py579# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtinygrad/renderer/amd/sqtt.py644# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtinygrad/renderer/amd/sqtt.py646# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtinygrad/renderer/amd/sqtt.py697# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtinygrad/renderer/amd/sqtt.py699# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtinygrad/renderer/amd/dsl.py4# ══════════════════════════════════════════════════════════════
MEDIUMtinygrad/renderer/amd/dsl.py6# ══════════════════════════════════════════════════════════════
MEDIUMtinygrad/renderer/amd/dsl.py91# ══════════════════════════════════════════════════════════════
MEDIUMtinygrad/renderer/amd/dsl.py93# ══════════════════════════════════════════════════════════════
MEDIUMtinygrad/renderer/amd/dsl.py142# ══════════════════════════════════════════════════════════════
MEDIUMtinygrad/renderer/amd/dsl.py144# ══════════════════════════════════════════════════════════════
MEDIUMtinygrad/renderer/amd/dsl.py234# ══════════════════════════════════════════════════════════════
MEDIUMtinygrad/renderer/amd/dsl.py236# ══════════════════════════════════════════════════════════════
MEDIUMtinygrad/renderer/amd/dsl.py244# ══════════════════════════════════════════════════════════════
MEDIUMtinygrad/renderer/amd/dsl.py246# ══════════════════════════════════════════════════════════════
MEDIUMtinygrad/renderer/amd/generate.py7# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtinygrad/renderer/amd/generate.py9# ═══════════════════════════════════════════════════════════════════════════════
MEDIUMtinygrad/renderer/amd/generate.py41# ═══════════════════════════════════════════════════════════════════════════════
58 more matches not shown…
Deep Nesting276 hits · 267 pts
SeverityFileLineSnippet
LOWsz.py17
LOWtest/testextra/test_bench_log.py81
LOWtest/unit/test_cpu.py11
LOWtest/unit/test_gguf.py194
LOWtest/unit/test_tinyfs.py9
LOWtest/speed/external_test_copy_speed.py80
LOWtest/backend/test_symbolic_ops.py272
LOWtest/backend/test_symbolic_ops.py300
LOWtest/backend/test_multitensor.py244
LOWtest/backend/test_multitensor.py1344
LOWtest/backend/test_nn.py16
LOWtest/backend/test_jit.py721
LOWtest/backend/test_uops.py88
LOWtest/backend/test_uops.py160
LOWtest/backend/test_ops.py712
LOWtest/backend/test_ops.py1798
LOWtest/backend/test_ops.py1813
LOWtest/backend/test_ops.py2319
LOWtest/backend/test_ops.py2348
LOWtest/backend/test_ops.py2357
LOWtest/backend/test_ops.py2481
LOWtest/amd/disasm.py47
LOWtest/amd/disasm.py151
LOWtest/amd/disasm.py284
LOWtest/amd/disasm.py334
LOWtest/amd/disasm.py724
LOWtest/amd/test_sqtt_examples.py24
LOWtest/amd/test_sqtt_examples.py45
LOWtest/amd/test_sqtt_examples.py110
LOWtest/amd/test_sqtt_examples.py121
LOWtest/amd/test_sqtt_examples.py165
LOWtest/amd/test_sqtt_examples.py195
LOWtest/amd/test_sqttmap.py84
LOWtest/amd/test_sqttmap.py95
LOWtest/amd/test_sqttmap.py119
LOWtest/amd/test_sqttmap.py149
LOWtest/amd/test_roundtrip.py57
LOWtest/amd/test_roundtrip.py115
LOWtest/amd/test_llvm.py84
LOWtest/amd/test_llvm.py85
LOWtest/amd/hw/helpers.py238
LOWtest/null/test_dtype_spec.py166
LOWtest/null/test_dtype_spec.py174
LOWtest/null/test_tqdm.py72
LOWtest/null/test_tqdm.py253
LOWtest/mockgpu/mockgpu.py41
LOWtest/mockgpu/usb.py144
LOWtest/mockgpu/usb.py171
LOWtest/mockgpu/am/amdriver.py99
LOWtest/mockgpu/amd/amdgpu.py46
LOWtest/mockgpu/amd/amdgpu.py90
LOWtest/mockgpu/amd/amdgpu.py267
LOWtest/mockgpu/amd/amddriver.py122
LOWtest/mockgpu/amd/amddriver.py185
LOWtest/mockgpu/amd/pcode.py402
LOWtest/mockgpu/amd/pcode.py922
LOWtest/mockgpu/amd/pcode.py932
LOWtest/mockgpu/amd/pcode.py535
LOWtest/mockgpu/amd/pcode.py549
LOWtest/mockgpu/amd/pcode.py664
216 more matches not shown…
Cross-Language Confusion21 hits · 108 pts
SeverityFileLineSnippet
HIGHtest/amd/test_formats.py154 # v_add3_u32 v5, null, exec_lo, 0xaf123456
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",
HIGHtinygrad/runtime/ops_metal.py108 proc = subprocess.Popen(f"cd {pathlib.Path(__file__).parents[2]}/extra/disassemblers/applegpu && python3 compiler_
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(
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 + signext
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)
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)
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)
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)
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)
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)
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)
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)
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.I
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.I
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
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(
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 + signext
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_driv
HIGHextra/nv_pma/cupti/cu_prof_ext.py53 if DEBUG >= 1: print(" CUPTI: PC sampling needs: echo 'options nvidia NVreg_RestrictProfilingToAdminUsers=0'|
HIGHexamples/webgpu/stable_diffusion/compile.py134 const metadata = safetensor ? getTensorMetadata(safetensor[0]) : null;
Excessive Try-Catch Wrapping86 hits · 94 pts
SeverityFileLineSnippet
LOWtest/helpers.py107 except Exception as e: self.skipTest(f"second device not available: {e}")
LOWtest/backend/test_multitensor.py1157 except Exception as e:
LOWtest/backend/test_jit.py815 except Exception: raise unittest.SkipTest("no multidevice")
LOWtest/backend/test_jit.py838 except Exception: raise unittest.SkipTest("no multidevice")
LOWtest/backend/test_profiler.py100 except Exception as e: self.skipTest(f"second device not available {e}")
LOWtest/backend/test_profiler.py115 except Exception as e: self.skipTest(f"second device not available {e}")
LOWtest/backend/test_profiler.py127 except Exception as e: self.skipTest(f"second device not available {e}")
LOWtest/backend/test_profiler.py152 except Exception as e: self.skipTest(f"multiple devices not available {e}")
LOWtest/backend/test_ops.py52 except Exception as e:
LOWtest/backend/test_asm_gemm.py227 except Exception: return False
LOWtest/amd/test_sqtt_examples.py84 except Exception as e: exc = e
LOWtest/amd/test_sqttmap.py29 except Exception as e: self.skipTest(f"latest rocprof not available, install with extra/sqtt/install_rocprof_decoder
LOWtest/amd/test_roundtrip.py152 except Exception as e:
LOWtest/amd/test_emu2_pcode.py374 except Exception as e: self.fail(f"[{arch}] {op.name}: {e}\nPcode: {pcode[:200]}")
LOWtest/amd/test_llvm.py117 except Exception: skipped += 1
LOWtest/amd/test_llvm.py129 except Exception: pass
LOWtest/null/test_device.py74 except Exception as e: self.skipTest(f"skipping compiler test: not all compilers: {e}")
LOWtest/null/test_device.py86 except Exception as e: self.skipTest(f"skipping compiler test: not all compilers: {e}")
LOWtest/null/test_device.py101 except Exception as e: self.skipTest(f"skipping compiler test: not all compilers: {e}")
LOWtest/null/test_device.py117 except Exception as e: self.skipTest(f"skipping: LLVM not available: {e}")
LOWtest/mockgpu/am/amgpu.py38 except Exception: return {}
LOWtest/mockgpu/cuda/cuda.py132 except Exception as e:
MEDIUMtest/mockgpu/cuda/cuda.py133 print("Error in cuLaunchKernel:", e)
LOWtest/mockgpu/amd/pcode.py1159 except Exception: pass
LOWtest/mockgpu/amd/emu.py2098 except Exception as e:
LOWtest/mockgpu/amd/emu.py2100 except Exception: inst_str = f"<{type(inst).__name__}>"
LOWtest/mockgpu/amd/emu.py38 except Exception: return None, 0
LOWtest/mockgpu/nv/nvgpu.py103 except Exception as e: print("failed to execute:", e)
LOWtest/device/test_hcq.py316 except Exception: self.skipTest("no multidevice, test skipped")
LOWtest/device/test_hcq.py374 except Exception: self.skipTest("no multidevice, test skipped")
LOWtest/device/test_hcq.py452 except Exception: self.skipTest("no multidevice, test skipped")
LOWtest/device/test_hcq.py568 except Exception: break
LOWtest/device/test_hcq.py597 except Exception: self.skipTest("no AMD device, test skipped")
LOWtest/device/test_hcq.py600 except Exception: self.skipTest("no NV device, test skipped")
LOWtest/device/test_hcq.py611 except Exception: self.skipTest("no AMD device, test skipped")
LOWtest/device/test_hcq.py616 except Exception: self.skipTest("no NV device, test skipped")
LOWtest/device/test_hcq.py627 except Exception: self.skipTest("no multidevice, test skipped")
MEDIUMtest/device/test_hcq.py607def test_multidevice_p2p(self):
LOWtest/external/external_test_process_count.py15 except Exception as e:
LOWtest/external/external_model_benchmark.py77 except Exception as e:
LOWtest/external/external_model_benchmark.py83 except Exception as e: print(f"{m:16s}torch_cpu {type(e).__name__:>25}")
LOWtest/external/external_model_benchmark.py89 except Exception as e: print(f"{m:16s}torch_{torch_device} {type(e).__name__:>25}")
LOWtest/external/external_model_benchmark.py101 except Exception as e: print(f"{m:16s}onnxruntime_{backend.lower()} {type(e).__name__:>25}")
LOWtest/external/external_test_example.py19 except Exception:
LOWtest/external/external_test_example.py58 except Exception:
MEDIUMtest/external/external_test_example.py55def test_example_matmul(self, device):
LOWtest/external/external_fuzz_hcq_mp.py33 except Exception as e:
LOWtest/external/external_test_gpu_crash.py41 except Exception:
LOWtest/external/external_benchmark_pyrender.py28 except Exception: ren = "PYRENDER_ERR"
LOWtest/external/process_replay/process_replay.py94 except Exception as e:
LOWtest/external/process_replay/process_replay.py126 except Exception as e:
LOWtinygrad/device.py363 except Exception as e: iface_results.append(f"{colored('-', 'red')} {iface.__name__[:-5]}: {e}")
LOWtinygrad/device.py370 except Exception as e: ren_results.append(f"{colored('-', 'red')} {d._renderer_name(r)}: {e}")
LOWtinygrad/device.py373 except Exception as e: result = f"{colored('FAIL', 'red')} {e}"
LOWtinygrad/helpers.py146 except Exception as e: excs.append(e)
LOWtinygrad/runtime/ops_cpu.py41 except Exception as e: self.dev.error_state = e
LOWtinygrad/runtime/ops_amd.py689 except Exception as e:
LOWtinygrad/runtime/support/autogen.py288 except Exception as e: raise Exception("parsing failed") from e
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 com
LOWtinygrad/runtime/support/compiler_cuda.py42 except Exception as e: print("Failed to generate SASS", str(e), "Make sure your PATH contains ptxas/nvdisasm binary of
26 more matches not shown…
Hallucination Indicators7 hits · 75 pts
SeverityFileLineSnippet
CRITICALtinygrad/renderer/llvmir.py60 # example: %wmma0 = call <8 x float> @llvm.amdgcn.wmma.f32.16x16x16.f16(<16 x half> %v99,<16 x half> %v100,<8 x float>
CRITICALtinygrad/renderer/llvmir.py256do_bf8: %packed_bf8 = call i32 @llvm.amdgcn.cvt.pk.bf8.f32(float %phi_val, float %phi_val, i32 0, i1 false)\n br label
CRITICALtinygrad/renderer/llvmir.py257do_fp8: %packed_fp8 = call i32 @llvm.amdgcn.cvt.pk.fp8.f32(float %phi_val, float %phi_val, i32 0, i1 false)\n br label
CRITICALtinygrad/runtime/ops_amd.py663 self.dev.iface.pci_dev.usb.scsi_read_arm(lsize:=min(cp_size, dest.nbytes - i))
CRITICALtinygrad/runtime/support/system.py275 if b.owner != self.dev: self.dev.iface.dev_impl.mm.unmap_range(b.va_addr, b.size)
CRITICALextra/hcq2/hcq2.py106 self.dev.iface.dev_impl.mm.unmap_range(int(mb.va_addr), round_up(mb.size, 0x1000))
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?def
AI Slop Vocabulary11 hits · 20 pts
SeverityFileLineSnippet
LOWtest/mockgpu/amd/emu.py926 # For PAD and SEXT, unused bits are zero (PAD) or sign-extended (SEXT). For DWORD, just return val.
LOWtest/mockgpu/nv/nvdriver.py218 # Profiler commands - just pass through for mockgpu
MEDIUMtest/external/external_llm_eval.py2# uses Meta's exact ARC-Challenge prompt template from lm-evaluation-harness llama3 tasks
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.
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
LOWtinygrad/runtime/ops_metal.py64 # library is loaded first then RTLD_LOCAL library will just use it's symbols. On linux there is RTLD_DEEPBIND to preve
LOWtinygrad/runtime/ops_metal.py98 # Fields other than invoke are unused in this case so we can just use ctypes.byref with negative offset to invoke fi
LOWtinygrad/uop/ops.py1436 # without tracking, we just call the function
LOWextra/models/llama.py150 # if temperature is very low just use argmax
MEDIUMextra/gemm/amd_asm_matmul.py435# Test harness
LOWexamples/tools/bandwidth_test.py19 # this copy would be optimized out, just add 1
Redundant / Tautological Comments13 hits · 16 pts
SeverityFileLineSnippet
LOWtest/amd/hw/test_vopc.py816 # Set VCC to all 1s first
LOWtest/amd/hw/test_vopc.py818 # Set EXEC to only lane 0
LOWtest/null/test_simplify_valid_idx.py185 s.add(Not(load == simplifed_load)) # Check if they are NOT equivalent
LOWtest/null/test_simplify_valid_idx.py193 s.add(Not(load == wrong_simplifed_load)) # Check if they are NOT equivalent
LOWtest/mockgpu/usb.py160 # Check if upper 32 bits of a 64-bit BAR
LOWtest/mockgpu/amd/pcode.py1302 # Check if any branch returned a value (lambda-style)
LOWtest/mockgpu/amd/emu.py1346 # Check if sources are VGPRs (offset >= 256) vs inline constants/SGPRs
LOWtest/mockgpu/amd/emu.py2060 # Check if instruction matches any cached canonical pattern (must also match instruction type to avoid variant conflic
LOWtinygrad/renderer/amd/generate.py394 # Check if this is a suffix-only variant
LOWtinygrad/runtime/graph/hcq.py320 # Check if all devices are HCQ
LOWtinygrad/runtime/graph/hcq.py327 # Check if all devices are within the same peer group. Allow cross-peer-group if all peer groups have RDMA devices.
LOWtinygrad/runtime/support/hcq.py596 # Check if the next buffer is safe to be used (its signal has passed) and reserve it.
LOWtinygrad/runtime/support/system.py141 os.umask(0) # Set umask to 0 to allow creating files with 0666 permissions
Self-Referential Comments3 hits · 9 pts
SeverityFileLineSnippet
MEDIUMtest/backend/test_multitensor.py649 # Create a copy from device 0 to 1: 1 entry.
MEDIUMtest/amd/test_emu2_pcode.py200 # Create a mock LDS buffer
MEDIUMtinygrad/runtime/support/compiler_cpu.py58 # Create a per-instance context instead of using the global context to avoid shared state between parallel test proc
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippet
LOW…ternal/mlperf_bert/external_test_checkpoint_loading.py2# Usage:
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippet
LOWtest/backend/test_linearizer.py303 def helper(t, max_ops=0):