{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D5","name":"Coupling","shortDescription":{"text":"Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D5"},{"id":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D11","name":"Test Reliability","shortDescription":{"text":"Test Reliability"},"helpUri":"https://codehealth.canine.dev/dimensions/D11"},{"id":"D12","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/D12"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D14","name":"License Compliance","shortDescription":{"text":"License Compliance"},"helpUri":"https://codehealth.canine.dev/dimensions/D14"},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D16","name":"Bus Factor","shortDescription":{"text":"Bus Factor"},"helpUri":"https://codehealth.canine.dev/dimensions/D16"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D31","name":"IaC \u0026 Container Security","shortDescription":{"text":"IaC \u0026 Container Security"},"helpUri":"https://codehealth.canine.dev/dimensions/D31","relationships":[{"target":{"id":"CWE-1032","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-732","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-16","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A02:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1032","CWE-732","CWE-16"],"owasp":"A02:2025"}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D36","name":"Supply-chain Provenance \u0026 Signing","shortDescription":{"text":"Supply-chain Provenance \u0026 Signing"},"helpUri":"https://codehealth.canine.dev/dimensions/D36","relationships":[{"target":{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1357","CWE-494"],"owasp":"A03:2025"}},{"id":"D44","name":"Platform End-of-Life","shortDescription":{"text":"Platform End-of-Life"},"helpUri":"https://codehealth.canine.dev/dimensions/D44"},{"id":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AX3","name":"Project dependency cycles","shortDescription":{"text":"Project dependency cycles"},"helpUri":"https://codehealth.canine.dev/dimensions/AX3"},{"id":"AX4","name":"Dependency direction","shortDescription":{"text":"Dependency direction"},"helpUri":"https://codehealth.canine.dev/dimensions/AX4"},{"id":"AX6","name":"Interface segregation","shortDescription":{"text":"Interface segregation"},"helpUri":"https://codehealth.canine.dev/dimensions/AX6"},{"id":"ED5","name":"Idempotency","shortDescription":{"text":"Idempotency"},"helpUri":"https://codehealth.canine.dev/dimensions/ED5"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"M4","name":"Documentation accuracy","shortDescription":{"text":"Documentation accuracy"},"helpUri":"https://codehealth.canine.dev/dimensions/M4"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P10","name":"Library API \u0026 versioning","shortDescription":{"text":"Library API \u0026 versioning"},"helpUri":"https://codehealth.canine.dev/dimensions/P10"},{"id":"P12","name":"CI test-gate honesty","shortDescription":{"text":"CI test-gate honesty"},"helpUri":"https://codehealth.canine.dev/dimensions/P12"},{"id":"P2","name":"Observability","shortDescription":{"text":"Observability"},"helpUri":"https://codehealth.canine.dev/dimensions/P2"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P4","name":"Deployment \u0026 Rollback","shortDescription":{"text":"Deployment \u0026 Rollback"},"helpUri":"https://codehealth.canine.dev/dimensions/P4"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"PF1","name":"Benchmark discipline","shortDescription":{"text":"Benchmark discipline"},"helpUri":"https://codehealth.canine.dev/dimensions/PF1"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X12","name":"Unreachable branch","shortDescription":{"text":"Unreachable branch"},"helpUri":"https://codehealth.canine.dev/dimensions/X12"},{"id":"X13","name":"Undrained process stream","shortDescription":{"text":"Undrained process stream"},"helpUri":"https://codehealth.canine.dev/dimensions/X13"},{"id":"X14","name":"Bypassable address classification","shortDescription":{"text":"Bypassable address classification"},"helpUri":"https://codehealth.canine.dev/dimensions/X14"},{"id":"X15","name":"Unvalidated length from an untrusted reader","shortDescription":{"text":"Unvalidated length from an untrusted reader"},"helpUri":"https://codehealth.canine.dev/dimensions/X15"},{"id":"X17","name":"Uncapped recursion over a caller-supplied document","shortDescription":{"text":"Uncapped recursion over a caller-supplied document"},"helpUri":"https://codehealth.canine.dev/dimensions/X17"},{"id":"X19","name":"Unrestored process-global state","shortDescription":{"text":"Unrestored process-global state"},"helpUri":"https://codehealth.canine.dev/dimensions/X19"},{"id":"X20","name":"Mistyped argument guard","shortDescription":{"text":"Mistyped argument guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X20"},{"id":"X21","name":"Side-effecting pattern guard","shortDescription":{"text":"Side-effecting pattern guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X21"},{"id":"X22","name":"Contradicted release guard","shortDescription":{"text":"Contradicted release guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X22"},{"id":"X23","name":"Unguarded diagnostic materialisation","shortDescription":{"text":"Unguarded diagnostic materialisation"},"helpUri":"https://codehealth.canine.dev/dimensions/X23"},{"id":"X24","name":"Document value interpolated into markup unescaped","shortDescription":{"text":"Document value interpolated into markup unescaped"},"helpUri":"https://codehealth.canine.dev/dimensions/X24"},{"id":"X25","name":"Inert configuration knob","shortDescription":{"text":"Inert configuration knob"},"helpUri":"https://codehealth.canine.dev/dimensions/X25"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"id":"X30","name":"Support guard that admits what it rejects","shortDescription":{"text":"Support guard that admits what it rejects"},"helpUri":"https://codehealth.canine.dev/dimensions/X30"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"X4","name":"Structured logging","shortDescription":{"text":"Structured logging"},"helpUri":"https://codehealth.canine.dev/dimensions/X4"},{"id":"X6","name":"Hand-rolled structured-format parsing","shortDescription":{"text":"Hand-rolled structured-format parsing"},"helpUri":"https://codehealth.canine.dev/dimensions/X6"},{"id":"X7","name":"Silent fallback defaults","shortDescription":{"text":"Silent fallback defaults"},"helpUri":"https://codehealth.canine.dev/dimensions/X7"},{"id":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"interface._flash_attn_fwd (cyclomatic 212): interface._flash_attn_fwd has cyclomatic complexity 212 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/interface.py"},"region":{"startLine":567}}}],"partialFingerprints":{"codehealthFindingId/v1":"04fb254d95d7c5856c0a3ebdc12abebc6b55c4458d6d8443c3fb86449faf0f34"}},{"ruleId":"D1","level":"warning","message":{"text":"_SwapABCore.attn_cta (cyclomatic 124): _SwapABCore.attn_cta has cyclomatic complexity 124 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_decode_sm100.py"},"region":{"startLine":626}}}],"partialFingerprints":{"codehealthFindingId/v1":"8951722d03a2da02c977ce16f988441ca06acca37eb764478dc961520be9361b"}},{"ruleId":"D1","level":"warning","message":{"text":"interface._flash_attn_bwd (cyclomatic 108): interface._flash_attn_bwd has cyclomatic complexity 108 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/interface.py"},"region":{"startLine":2033}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc65ccc70b23d2cbbf157c2498238f77bc29549907fca78345e2d9366613d902"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionBackwardSm100.compute_loop (cyclomatic 99): FlashAttentionBackwardSm100.compute_loop has cyclomatic complexity 99 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":3920}}}],"partialFingerprints":{"codehealthFindingId/v1":"d42eb2ce1f3b24d5911a0c078d526e4711e436116b76e2bacff98575f8759784"}},{"ruleId":"D1","level":"warning","message":{"text":"interface._flash_attn_bwd_sparse_mla (cyclomatic 75): interface._flash_attn_bwd_sparse_mla has cyclomatic complexity 75 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/interface.py"},"region":{"startLine":2824}}}],"partialFingerprints":{"codehealthFindingId/v1":"cabdb6f86f22f43d344712cd947a40a680b1dd3e274d59c6a0a5ef4ea49b7a6b"}},{"ruleId":"D1","level":"warning","message":{"text":"config.validate_fwd_config (cyclomatic 73): config.validate_fwd_config has cyclomatic complexity 73 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/config.py"},"region":{"startLine":1807}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c1dd8d97795b416d048d864c23ef1a44b889c706ad41613d141fd102d0ccd56"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionForwardSm100.correction_loop (cyclomatic 68): FlashAttentionForwardSm100.correction_loop has cyclomatic complexity 68 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":2984}}}],"partialFingerprints":{"codehealthFindingId/v1":"952be2183be12ef7cfa4e8b08010afa055fa5fa0eb9b0c3050bcba34b18ab0e7"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionForwardSm100.__call__ (cyclomatic 61): FlashAttentionForwardSm100.__call__ has cyclomatic complexity 61 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":456}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff7f074b682717d0eca3c3cb544a43cdacd2ef84642fac76db1d78d91ac198fe"}},{"ruleId":"D1","level":"warning","message":{"text":"AttentionMask.apply_mask (cyclomatic 61): AttentionMask.apply_mask has cyclomatic complexity 61 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/mask.py"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"af33cbf638c1bd208bce617933da36ee1efc9ccfef62bf0809924e4a3cf77bb9"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaSm100.__call__ (cyclomatic 60): FlashAttentionMLAForward1CtaSm100.__call__ has cyclomatic complexity 60 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":560}}}],"partialFingerprints":{"codehealthFindingId/v1":"53305e0889ff2b6d2330ca97d3276d296a640238ef637b8144772809cb69639f"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionForwardSm100.load (cyclomatic 59): FlashAttentionForwardSm100.load has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":1593}}}],"partialFingerprints":{"codehealthFindingId/v1":"706199066b47b435a2bcb6e13aaf233bd058418c5564127a2937a6cbea214fa3"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionBackwardSm100.__call__ (cyclomatic 58): FlashAttentionBackwardSm100.__call__ has cyclomatic complexity 58 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":818}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8258ab9e94e9005ec9d40f4bc1ff7dd05d978cc21208007de6a7cd4bc4e8599"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionForwardCombine.kernel (cyclomatic 56): FlashAttentionForwardCombine.kernel has cyclomatic complexity 56 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_combine.py"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"23d265576d4a5a9b534badffc2c72b5658011fd71d6de605efeebf61b00a2c96"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionForwardSm100.__init__ (cyclomatic 55): FlashAttentionForwardSm100.__init__ has cyclomatic complexity 55 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"d04ff26ff603a8804bfac985787b5f9695a23856a68b8a7cee984734bd8d42d5"}},{"ruleId":"D1","level":"warning","message":{"text":"dQdQvGemmKernel.kernel (cyclomatic 54): dQdQvGemmKernel.kernel has cyclomatic complexity 54 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":445}}}],"partialFingerprints":{"codehealthFindingId/v1":"423ab8b5ea2bb112b13483dc6dc4f7e69ee40ba17e99535bb21a84d3ead97145"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionBackwardSm100.dQacc_reduce (cyclomatic 54): FlashAttentionBackwardSm100.dQacc_reduce has cyclomatic complexity 54 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":4753}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4a38539e6cbfc8db21165a935f2459ae26a2cc2c6844bda3135f9385899a888"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionBackwardSm100.load (cyclomatic 53): FlashAttentionBackwardSm100.load has cyclomatic complexity 53 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":2388}}}],"partialFingerprints":{"codehealthFindingId/v1":"78397a6a6821ad930fa09021fff4724dff36c61711a48b8b4b886789803e127d"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionMLAForwardSm100.__call__ (cyclomatic 53): FlashAttentionMLAForwardSm100.__call__ has cyclomatic complexity 53 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6336ec66aaf72cf6e2d52265e4a75c2657d6b46b8bd839cd9afdc18ba108106"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionForwardSm100.kernel (cyclomatic 53): FlashAttentionForwardSm100.kernel has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":981}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5f5ddd80e9f9cafbd9458523215964d9e90b7bc6eaf70982eff73b7c9c8fd7c"}},{"ruleId":"D1","level":"warning","message":{"text":"dQdQvGemmKernelH64.kernel (cyclomatic 50): dQdQvGemmKernelH64.kernel has cyclomatic complexity 50 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py"},"region":{"startLine":483}}}],"partialFingerprints":{"codehealthFindingId/v1":"73abd945d3fc4cac1674a329bf0f7a130d44f22afb7cc5a05470e5b194ea6f1a"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionSparseMLABackwardSm100.__call__ (cyclomatic 50): FlashAttentionSparseMLABackwardSm100.__call__ has cyclomatic complexity 50 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":503}}}],"partialFingerprints":{"codehealthFindingId/v1":"4742176942df8fe64cf3bbbe8a0bdeb20ee44ac7b011df571cffb59158ae29a7"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaSm100.kernel (cyclomatic 49): FlashAttentionMLAForward1CtaSm100.kernel has cyclomatic complexity 49 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":1091}}}],"partialFingerprints":{"codehealthFindingId/v1":"811b791a5ed6176fd66d46708f7200f4556d7679032e26a43340e64faf9459c6"}},{"ruleId":"D1","level":"warning","message":{"text":"config.validate_bwd_config (cyclomatic 48): config.validate_bwd_config has cyclomatic complexity 48 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/config.py"},"region":{"startLine":3267}}}],"partialFingerprints":{"codehealthFindingId/v1":"760f9d0e5ecda2c51e742c1275ee1e9774be87f13eca736088d167bd0832e007"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionSparseMLABackwardSm100.kernel (cyclomatic 48): FlashAttentionSparseMLABackwardSm100.kernel has cyclomatic complexity 48 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":998}}}],"partialFingerprints":{"codehealthFindingId/v1":"08df12f1bdbf06699ca061d3841fc7095ef9428549add59210da4f3e7a9bed4f"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionMLAForwardSm100.kernel (cyclomatic 48): FlashAttentionMLAForwardSm100.kernel has cyclomatic complexity 48 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":830}}}],"partialFingerprints":{"codehealthFindingId/v1":"77f0bd65b9456a491c923b2f0d6d7165e9034b13e90101ffcbb4db115bf41cba"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionBackwardSm100.kernel (cyclomatic 45): FlashAttentionBackwardSm100.kernel has cyclomatic complexity 45 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":1499}}}],"partialFingerprints":{"codehealthFindingId/v1":"cddb587da4e2cf422ae9df813a1def5860cb98e4c8952fc19912dd8f4e0c422e"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionForwardSm100.softmax_loop (cyclomatic 45): FlashAttentionForwardSm100.softmax_loop has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":2415}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc073d5f348c8eb52f5a8330b137accce6a2d6a79aa9629d93e56266cb4808f6"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionBackwardPreprocess.kernel (cyclomatic 44): FlashAttentionBackwardPreprocess.kernel has cyclomatic complexity 44 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_preprocess.py"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ffdf0cc1cc9b2c84d685ac58de0e0a7636e82064786dca1daaeb057cb8f5789"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionBackwardSm100.mma (cyclomatic 43): FlashAttentionBackwardSm100.mma has cyclomatic complexity 43 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":2997}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec76568b80288322c3114bca872294fe0a10724af03432af117c17a6cb1be374"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionMLAForwardSm100.load_cpasync (cyclomatic 43): FlashAttentionMLAForwardSm100.load_cpasync has cyclomatic complexity 43 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":1438}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec513a5b195404cfed88ed4a88e431d2ed5fe7b7ca08b81e6ff35564e4dd31d7"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionForwardSm90.__call__ (cyclomatic 43): FlashAttentionForwardSm90.__call__ has cyclomatic complexity 43 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm90.py"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"598003a8d79b3cc8b696184e3ffa23f29ed3dfff8f433d682524772af08bfff5"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionSparseMLABackwardSm100.load (cyclomatic 42): FlashAttentionSparseMLABackwardSm100.load has cyclomatic complexity 42 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1851}}}],"partialFingerprints":{"codehealthFindingId/v1":"eac9da0d4626b4ac10d4e4c9e05635d5b892610c3c019af2fe0bdcb20e2b49eb"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaKb64Sm100.__call__ (cyclomatic 42): FlashAttentionMLAForward1CtaKb64Sm100.__call__ has cyclomatic complexity 42 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d1117128477a2891561109d058383f26916727c7b0469cb1b0a69230f699693"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionMLAForwardSm100.load (cyclomatic 42): FlashAttentionMLAForwardSm100.load has cyclomatic complexity 42 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":1909}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9bb9add6a0ce763e778eef87cbdff77395582f160ee2c9a2791f37492931e3d"}},{"ruleId":"D1","level":"warning","message":{"text":"AttentionMask.apply_mask_sm100_transposed (cyclomatic 42): AttentionMask.apply_mask_sm100_transposed has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/mask.py"},"region":{"startLine":774}}}],"partialFingerprints":{"codehealthFindingId/v1":"60fb9e5680e09b3630814df18a5fcf30311fbc6ce9020fe7d63a940c51a8a2b5"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionForwardSm90.load (cyclomatic 41): FlashAttentionForwardSm90.load has cyclomatic complexity 41 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm90.py"},"region":{"startLine":675}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba046ff1224a1d2c0d9ed6977ec8bb89983a2bb5bf6d38f12607e34dda174ae4"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaKb64Sm100.kernel (cyclomatic 39): FlashAttentionMLAForward1CtaKb64Sm100.kernel has cyclomatic complexity 39 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":756}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0bb130a15511f0352d4628c625e8b41bae376b54e12740c15f586019e4dce12"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionMLAForwardSm100.correction_loop (cyclomatic 39): FlashAttentionMLAForwardSm100.correction_loop has cyclomatic complexity 39 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":2953}}}],"partialFingerprints":{"codehealthFindingId/v1":"981fc404c51f36ab6513920cba304c860347a79b1677ded06ee40e76979a141d"}},{"ruleId":"D1","level":"warning","message":{"text":"testing.attention_ref (cyclomatic 38): testing.attention_ref has cyclomatic complexity 38 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/testing.py"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"d233ce5a7255cb112f5a9e5666cab01b34f2fc143d372a37ef9ad5b55dd1a4bb"}},{"ruleId":"D1","level":"warning","message":{"text":"layer_norm._layer_norm_bwd_kernel (cyclomatic 38): layer_norm._layer_norm_bwd_kernel has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/layer_norm.py"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a3ed54a584445dccc01419763bdde46930d311d58aa0ccbad4843797a81eedf"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionMLAForwardSm100.mma (cyclomatic 37): FlashAttentionMLAForwardSm100.mma has cyclomatic complexity 37 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":2228}}}],"partialFingerprints":{"codehealthFindingId/v1":"8065d7b1d248bfe00db1d9635b9005c78b7bab84c06403138597b1e8cda9b19f"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionForwardSm100.mma (cyclomatic 37): FlashAttentionForwardSm100.mma has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":1941}}}],"partialFingerprints":{"codehealthFindingId/v1":"443c7622d3cae38e54959ebe9cc0740ee49ff99f1e5e1f98812d0d5b0c568947"}},{"ruleId":"D1","level":"warning","message":{"text":"FusedMLPFunc.backward (cyclomatic 37): FusedMLPFunc.backward has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/fused_dense.py"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dc80b245384fc57b98288ca2c5a1dd37bd47bd56fc0b61e9def41e2387c9da4"}},{"ruleId":"D1","level":"warning","message":{"text":"VarlenDecoder.decode (cyclomatic 36): VarlenDecoder.decode has cyclomatic complexity 36 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/tile_scheduler.py"},"region":{"startLine":1109}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffafa1856199ea089d62926d3adfcfcb8677b988a57b910cebb4d2f7b6f33330"}},{"ruleId":"D1","level":"warning","message":{"text":"BlockSparsityKernel.kernel (cyclomatic 35): BlockSparsityKernel.kernel has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/compute_block_sparsity.py"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"322023e85d36344023dcad2557e664d1b077bd4fcd2fddc5d33a501733b3bc48"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionSparseMLABackwardSm100.compute_loop (cyclomatic 35): FlashAttentionSparseMLABackwardSm100.compute_loop has cyclomatic complexity 35 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":2729}}}],"partialFingerprints":{"codehealthFindingId/v1":"5eefa17908ce2752edd43d25a28b346fbd087b7308d4638c49fa41e78a2b2241"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaSm100.__init__ (cyclomatic 35): FlashAttentionMLAForward1CtaSm100.__init__ has cyclomatic complexity 35 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"be3e17095b7da0d2210725b35cbd46d971ad3a3295e882d5b76dbc3157027c1c"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionBackwardPreprocess.__call__ (cyclomatic 34): FlashAttentionBackwardPreprocess.__call__ has cyclomatic complexity 34 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_preprocess.py"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"03606a444e5fbe88d2f1fecf2585f9f1e0e668eea45a51f053b2d561b0e6f50e"}},{"ruleId":"D1","level":"warning","message":{"text":"AttentionMask.apply_mask_sm100 (cyclomatic 33): AttentionMask.apply_mask_sm100 has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/mask.py"},"region":{"startLine":612}}}],"partialFingerprints":{"codehealthFindingId/v1":"acd1d5fb2e4d62c05edc957169a5990a87a59afbe104c1d749ce1a77145d64c2"}},{"ruleId":"D1","level":"warning","message":{"text":"dKGemmKernel.kernel (cyclomatic 32): dKGemmKernel.kernel has cyclomatic complexity 32 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dk_sm100.py"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e461ba2a577946e9b3f54f287363c1b9fb42af11678ca77d9be8bd9ecb9f799"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionBackwardSm90.mma (cyclomatic 32): FlashAttentionBackwardSm90.mma has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm90.py"},"region":{"startLine":1207}}}],"partialFingerprints":{"codehealthFindingId/v1":"439a22bfb033362c040492f6b9d9a0f53d18f4ddecf0b64589b8298bf9015d4d"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaSm100.load (cyclomatic 32): FlashAttentionMLAForward1CtaSm100.load has cyclomatic complexity 32 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":1539}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d1e3a372f420385f9a8a4cef8e3110324d649674780504adf97fc24f99f23c2"}},{"ruleId":"D1","level":"warning","message":{"text":"config._select_fwd_config (cyclomatic 31): config._select_fwd_config has cyclomatic complexity 31 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/config.py"},"region":{"startLine":1522}}}],"partialFingerprints":{"codehealthFindingId/v1":"10604e0d2b050c5eb11aa3620d91f298d4e051940dff9875d4ebe0a8ece1a0b4"}},{"ruleId":"D1","level":"warning","message":{"text":"config.validate_mla_fwd_config (cyclomatic 31): config.validate_mla_fwd_config has cyclomatic complexity 31 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/config.py"},"region":{"startLine":2305}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab50931d78a1a71ce2224c424b43f92694699b9d2c25bbd14f9eae61698f26e4"}},{"ruleId":"D1","level":"warning","message":{"text":"benchmark_flash_attention_fp8.main (cyclomatic 30): benchmark_flash_attention_fp8.main has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/benchmark_flash_attention_fp8.py"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2803630246ee62573988556fb5a5495a87d2b149002627cbf7f13ba46abc7aa"}},{"ruleId":"D1","level":"warning","message":{"text":"flash_attn_triton._bwd_kernel_one_col_block (cyclomatic 30): flash_attn_triton._bwd_kernel_one_col_block has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_triton.py"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c527056bd209aaad68bc5f9e016daaa6e1bf0187e7a487edf5c3798aa8a9602"}},{"ruleId":"D1","level":"warning","message":{"text":"Block.forward (cyclomatic 30): Block.forward has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/block.py"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"69c2a7d69f9e76bbad4914d2cf65420c40a83d9d884d9afc606f0ce0184eadbc"}},{"ruleId":"D1","level":"warning","message":{"text":"MHA.forward (cyclomatic 30): MHA.forward has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/mha.py"},"region":{"startLine":573}}}],"partialFingerprints":{"codehealthFindingId/v1":"2635aa7bec64c33731aeba05a31836175d8cfbc119b2754b067b00abd52d5f27"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionBackwardSm90.__call__ (cyclomatic 29): FlashAttentionBackwardSm90.__call__ has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm90.py"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"a12fb9c7249c919a2259a411d2494c45cd6ab8473a945c484a7ef7c965d4e40d"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionForwardSm90.mma (cyclomatic 29): FlashAttentionForwardSm90.mma has cyclomatic complexity 29 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm90.py"},"region":{"startLine":1023}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d5f0215162681efc50af23c95493852feaf5a83700f49b8cd82197407a92892"}},{"ruleId":"D1","level":"warning","message":{"text":"layer_norm._layer_norm_bwd_impl (cyclomatic 29): layer_norm._layer_norm_bwd_impl has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/layer_norm.py"},"region":{"startLine":702}}}],"partialFingerprints":{"codehealthFindingId/v1":"f852c2dbc1032336344a94eb02353d7844aa981739c3625ded286a5148595705"}},{"ruleId":"D1","level":"warning","message":{"text":"param_grouping.group_parameters_for_optimizer (cyclomatic 29): param_grouping.group_parameters_for_optimizer has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/optim/param_grouping.py"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"c62ed45bce1e9361c28b7762f888532667dea4b64be76529a09f47633354d555"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionBackwardSm100.__init__ (cyclomatic 28): FlashAttentionBackwardSm100.__init__ has cyclomatic complexity 28 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"2507278d6f1e9412c2468d957590addebe054c25a6ebd53eb3f3d349dab9fb3f"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaKb64Sm100.correction_loop (cyclomatic 28): FlashAttentionMLAForward1CtaKb64Sm100.correction_loop has cyclomatic complexity 28 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":2078}}}],"partialFingerprints":{"codehealthFindingId/v1":"02cf2787fed885216dcd8818bf82965253308cf51ecd74acb34a1a3922ebe3c5"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaSm100.load_cpasync (cyclomatic 28): FlashAttentionMLAForward1CtaSm100.load_cpasync has cyclomatic complexity 28 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":1938}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1a3782088e9d27e005fce9027cf1021184fc1bcbb5e7d77b78fd7215470c790"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionMLAForwardSm100.softmax_loop (cyclomatic 28): FlashAttentionMLAForwardSm100.softmax_loop has cyclomatic complexity 28 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":2554}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3ded0e4cee1c6d5e88c2228e91c3b8726d7d727087d93986fce361f03838068"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionForwardSm80.kernel (cyclomatic 27): FlashAttentionForwardSm80.kernel has cyclomatic complexity 27 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd.py"},"region":{"startLine":755}}}],"partialFingerprints":{"codehealthFindingId/v1":"f67f52654218fd787b8b6a6f7a1cbf2450fdd7d8b85bb8ec99b094e86022e4e0"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaSm100.correction_loop (cyclomatic 27): FlashAttentionMLAForward1CtaSm100.correction_loop has cyclomatic complexity 27 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":3111}}}],"partialFingerprints":{"codehealthFindingId/v1":"d083a1956db489a058e02ac5108bb171b20eb48d927e9631ca085e498b62f7b6"}},{"ruleId":"D1","level":"warning","message":{"text":"train.train (cyclomatic 27): train.train has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/train.py"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"eee541a9f93ab06bffaf78d5df2c60881afc077dbcb7b100fda68ed599a2ddf7"}},{"ruleId":"D1","level":"warning","message":{"text":"AttentionMask.apply_mask_mod_sm100_vector (cyclomatic 26): AttentionMask.apply_mask_mod_sm100_vector has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/mask.py"},"region":{"startLine":494}}}],"partialFingerprints":{"codehealthFindingId/v1":"e347423eb6288fbc4ad461edde4ed68b11b560e19c7fd40ff9aea69f2b3110a1"}},{"ruleId":"D1","level":"warning","message":{"text":"testing.attention_ref (cyclomatic 26): testing.attention_ref has cyclomatic complexity 26 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/utils/testing.py"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"824a8a504917653ebebbd1b15ded1a234ee25cecaf4ac23654c27c1d1b182b7d"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionBackwardSm80.compute_one_m_block (cyclomatic 25): FlashAttentionBackwardSm80.compute_one_m_block has cyclomatic complexity 25 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd.py"},"region":{"startLine":882}}}],"partialFingerprints":{"codehealthFindingId/v1":"89a104a02a39828046b383135e952bd6fdd2659e5f02c2bf212b23ea610dfbee"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionSparseMLABackwardSm100.mma (cyclomatic 25): FlashAttentionSparseMLABackwardSm100.mma has cyclomatic complexity 25 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":2237}}}],"partialFingerprints":{"codehealthFindingId/v1":"dec7df7aab34361e723839d00e422519cb44f2a40de82424e0251e211072a553"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionBackwardPostprocess.kernel (cyclomatic 25): FlashAttentionBackwardPostprocess.kernel has cyclomatic complexity 25 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_postprocess.py"},"region":{"startLine":488}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc6d0acbc8662de21a577cb5d2e98ab6b14728e3fb5b2dea32240d08f92b675e"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionBackwardSm100.epilogue_dK_or_dV_tma (cyclomatic 25): FlashAttentionBackwardSm100.epilogue_dK_or_dV_tma has cyclomatic complexity 25 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":5456}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad2daf02dc5585b45546f6ca8580ad34bd6b32c7b006241e057dcbdded15125c"}},{"ruleId":"D1","level":"warning","message":{"text":"generation.decode_speculative (cyclomatic 25): generation.decode_speculative has cyclomatic complexity 25 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/utils/generation.py"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d6cad8c2959c4d0a5dc01fde96e904d0ca133307e488ebc9cf4c65dff94414e"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaSm100.mma (cyclomatic 24): FlashAttentionMLAForward1CtaSm100.mma has cyclomatic complexity 24 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":2214}}}],"partialFingerprints":{"codehealthFindingId/v1":"108784a60fbb23ac023f563663f4e14c159bf805ba204554a26ff1991d2c39e2"}},{"ruleId":"D1","level":"warning","message":{"text":"flash_attn_triton._fwd_kernel (cyclomatic 24): flash_attn_triton._fwd_kernel has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_triton.py"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"0624f7a932f7ea9f37c14c3950aafb7be92527511cb60e9e5e6380da4da64677"}},{"ruleId":"D1","level":"warning","message":{"text":"gpt.create_mlp_cls (cyclomatic 24): gpt.create_mlp_cls has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/gpt.py"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"35897dd7129933d77388785de957084dd688fc164ac0f3eca5608a126c462280"}},{"ruleId":"D1","level":"warning","message":{"text":"FusedMLPFunc.forward (cyclomatic 24): FusedMLPFunc.forward has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/fused_dense.py"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"54dfdacbfc842e096f1a37fc4d5589add86eae23b963ec4a3d122e0079cbc295"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionMLAForwardSm100.__init__ (cyclomatic 23): FlashAttentionMLAForwardSm100.__init__ has cyclomatic complexity 23 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"72389c6d2ad9301e92802d370e39016d45716f95ab03fb6b42e233d1778d4c11"}},{"ruleId":"D1","level":"warning","message":{"text":"layer_norm._layer_norm_fwd_1pass_kernel (cyclomatic 23): layer_norm._layer_norm_fwd_1pass_kernel has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/layer_norm.py"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1b9d1b7ec95b7c5be3e4197abac89e6d8d8f00926d8995afcf51fa023d4533a"}},{"ruleId":"D1","level":"warning","message":{"text":"block_sparse_utils.produce_block_sparse_q_loads_bwd_sm100_default (cyclomatic 22): block_sparse_utils.produce_block_sparse_q_loads_bwd_sm100_default has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparse_utils.py"},"region":{"startLine":1180}}}],"partialFingerprints":{"codehealthFindingId/v1":"6966ad3ad26af504ab64f51ae2c94ad58a1877be8aa7bb396c7393f1a44c54b3"}},{"ruleId":"D1","level":"warning","message":{"text":"block_sparsity.infer_block_sparse_expected_shapes (cyclomatic 22): block_sparsity.infer_block_sparse_expected_shapes has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparsity.py"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee56790598d9b1d49527bb7af76a4e1cc9c13e92ffaf7535d917bb68cc32bade"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionBackwardSm80.kernel (cyclomatic 22): FlashAttentionBackwardSm80.kernel has cyclomatic complexity 22 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd.py"},"region":{"startLine":493}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3f3e048f378b2230557ab18c2260f6883eae89d935264d4bf4c3ae7eef4054c"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionBackwardSm100.epilogue_dK_or_dV_tma_m64 (cyclomatic 22): FlashAttentionBackwardSm100.epilogue_dK_or_dV_tma_m64 has cyclomatic complexity 22 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":5268}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdb1b41c59e4ef81b1089f7a88a78871db706123e2b3d61b2bcef2b1b97aa7e2"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionBackwardSm90.load (cyclomatic 22): FlashAttentionBackwardSm90.load has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm90.py"},"region":{"startLine":879}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7a548ca59add36282a9596ac8f850481ebc4b678a417335891d71c844a10ee8"}},{"ruleId":"D1","level":"warning","message":{"text":"layer_norm.rms_norm_ref (cyclomatic 22): layer_norm.rms_norm_ref has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/layer_norm.py"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c8df701061b8d77973ea2ba92e949e5e5985624c3ac90580ff8c7a7613fb7ae"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionSparseMLABackwardSm100.dVacc_store (cyclomatic 21): FlashAttentionSparseMLABackwardSm100.dVacc_store has cyclomatic complexity 21 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":3127}}}],"partialFingerprints":{"codehealthFindingId/v1":"58e08fcf858c8dd077c48c04a70b71a6a6f80316e3e0791ca551190aef3013f8"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionBackwardSm90.mma_one_m_block (cyclomatic 21): FlashAttentionBackwardSm90.mma_one_m_block has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm90.py"},"region":{"startLine":1585}}}],"partialFingerprints":{"codehealthFindingId/v1":"7906ca9011448955b951590c5c33725f936902d3786d2bfa6bb139152bee9062"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionForwardSm100.softmax_step (cyclomatic 21): FlashAttentionForwardSm100.softmax_step has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":2806}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c651b9095f4b1c875e616214708d34591898546b18d796e758b38897596f821"}},{"ruleId":"D1","level":"warning","message":{"text":"sm90_config_search.find_feasible_bwd_configs (cyclomatic 21): sm90_config_search.find_feasible_bwd_configs has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/sm90_config_search.py"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff3a7951f7405c75775ae20d2422a06a0992c331c8b8332108b8d668b1531cbe"}},{"ruleId":"D1","level":"warning","message":{"text":"CuSeqlensToBlocksKernel.kernel (cyclomatic 20): CuSeqlensToBlocksKernel.kernel has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/cu_blocks_kernel.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"d64cb88b5ed1aab4deff99f97f6b464eaf035038fe8b5eb78abdc48e68b6449d"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionBackwardSm90.dQaccum_store (cyclomatic 20): FlashAttentionBackwardSm90.dQaccum_store has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm90.py"},"region":{"startLine":1896}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9d1130e4fa6db5d8722fd5b7a9e446460eb2c4639708e1684f8c1e40226fa49"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionForwardCombine.__call__ (cyclomatic 20): FlashAttentionForwardCombine.__call__ has cyclomatic complexity 20 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_combine.py"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"489808fe70d99758584540fcb3f65553ceb9965c558793ac2298efd49f78bb6b"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaKb64Sm100.load_tma (cyclomatic 20): FlashAttentionMLAForward1CtaKb64Sm100.load_tma has cyclomatic complexity 20 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":1101}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0f65c778d20af81590aac2c2e1ea13c4d8ba5ad31842d74636748596a9f7e27"}},{"ruleId":"D1","level":"warning","message":{"text":"interface._get_scheduler_metadata (cyclomatic 20): interface._get_scheduler_metadata has cyclomatic complexity 20 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/interface.py"},"region":{"startLine":4282}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac9af1d5713e5de00eaa694aa347623eb584a9183281f6d37b89b9a8c0fe1e35"}},{"ruleId":"D1","level":"warning","message":{"text":"CpasyncGatherKVManagerH64.load_X (cyclomatic 20): CpasyncGatherKVManagerH64.load_X has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/topk_gather_kv.py"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5bb1252d8fb5d06fcf17fab2033410f097ed96f398cc95def292605376a01bd"}},{"ruleId":"D1","level":"warning","message":{"text":"layer_norm.layer_norm_ref (cyclomatic 20): layer_norm.layer_norm_ref has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/layer_norm.py"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d6e581b03f0b6a3735339b3fa1a8dfc1d0e77744c421110444ddd42e73d9b50"}},{"ruleId":"D1","level":"warning","message":{"text":"layer_norm._layer_norm_fwd_impl (cyclomatic 20): layer_norm._layer_norm_fwd_impl has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/layer_norm.py"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e321a65207f77f844f8c782d350d50db86184bf94a06e9547464c21208d87c3"}},{"ruleId":"D1","level":"warning","message":{"text":"compute_block_sparsity.compute_block_sparsity (cyclomatic 19): compute_block_sparsity.compute_block_sparsity has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/compute_block_sparsity.py"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"f966ba2ac6587794d1bb0f10a2912638258677eb678de258c3f41552552a4cc3"}},{"ruleId":"D1","level":"warning","message":{"text":"config.select_bwd_fold (cyclomatic 19): config.select_bwd_fold has cyclomatic complexity 19 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/config.py"},"region":{"startLine":2809}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfa8abc2dc1781c964a2eb49ca65178060eceadbd13edc9c756d91fd438b3020"}},{"ruleId":"D1","level":"warning","message":{"text":"ParallelMHA.forward (cyclomatic 19): ParallelMHA.forward has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/mha.py"},"region":{"startLine":910}}}],"partialFingerprints":{"codehealthFindingId/v1":"169c5caa03342e4b252ee355fe98572eaf73a7155550fd64ea450c49ec9fafe2"}},{"ruleId":"D1","level":"warning","message":{"text":"LayerNormFn.forward (cyclomatic 19): LayerNormFn.forward has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/layer_norm.py"},"region":{"startLine":849}}}],"partialFingerprints":{"codehealthFindingId/v1":"6936dbd1565231da1e03779046735535d24f5a966924696490c1f5f37b8b34bd"}},{"ruleId":"D1","level":"warning","message":{"text":"autotune._normalize_kwargs (cyclomatic 18): autotune._normalize_kwargs has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/autotune.py"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cbfbe587feb71e05d6632a8e2996da81915a6466e5e36c83ab97b0baaa2b7fa"}},{"ruleId":"D1","level":"warning","message":{"text":"blackwell_helpers.gemm_ptx_partial (cyclomatic 18): blackwell_helpers.gemm_ptx_partial has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/blackwell_helpers.py"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"915338d3baf74430d51812f73da8791b01ac69a5f82b88750d4369d5141f93df"}},{"ruleId":"D1","level":"warning","message":{"text":"config.select_mla_fwd_config (cyclomatic 18): config.select_mla_fwd_config has cyclomatic complexity 18 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/config.py"},"region":{"startLine":2223}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6b3afec86d23de348714f451bda9d1bc9b60b39b9a6c719bbc287e845e55780"}},{"ruleId":"D1","level":"warning","message":{"text":"config.validate_sm90_bwd_mma (cyclomatic 18): config.validate_sm90_bwd_mma has cyclomatic complexity 18 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/config.py"},"region":{"startLine":3213}}}],"partialFingerprints":{"codehealthFindingId/v1":"62d76b4c7babb03ab4572988b20541f1f2113cf630ef95ff6f0d17464aa1b340"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionMLAForwardSm100.softmax_step (cyclomatic 18): FlashAttentionMLAForwardSm100.softmax_step has cyclomatic complexity 18 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":2841}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ce18409e62a575cbf21976dc554add77a69647e0333a07026b9e125a9f099b6"}},{"ruleId":"D1","level":"warning","message":{"text":"interface._validate_block_scales (cyclomatic 18): interface._validate_block_scales has cyclomatic complexity 18 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/interface.py"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"49b78d290a9062c7175a5ca19b21a519ce9ffe007ac2ecd5d73eea2e096ef2d3"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashPrepareScheduler.kernel (cyclomatic 18): FlashPrepareScheduler.kernel has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/prepare_scheduler.py"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a1eb931ee3317547ae7943ea5385bb4d02e7e809380009582f997b99a5743e0"}},{"ruleId":"D1","level":"warning","message":{"text":"GPTModel.forward (cyclomatic 18): GPTModel.forward has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/gpt.py"},"region":{"startLine":514}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d89015f6b688a3160a1ce581c6f0f0f34d03684f58c297eab31655d9defb770"}},{"ruleId":"D1","level":"warning","message":{"text":"benchmark.pytorch_profiler (cyclomatic 17): benchmark.pytorch_profiler has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/benchmark.py"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7e444370a4cf37c543c6b078e78db6707252b63be2dcc81d23c4d473e6b4534"}},{"ruleId":"D1","level":"warning","message":{"text":"block_sparse_utils.consume_block_sparse_loads (cyclomatic 17): block_sparse_utils.consume_block_sparse_loads has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparse_utils.py"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ed3a13c598bcb5340d8de40c4048b18acc601af0586fce537974e1af40fc5e4"}},{"ruleId":"D1","level":"warning","message":{"text":"config.select_tuned_sm100_overrides (cyclomatic 17): config.select_tuned_sm100_overrides has cyclomatic complexity 17 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/config.py"},"region":{"startLine":1420}}}],"partialFingerprints":{"codehealthFindingId/v1":"05cda0221507c4126ed1fec2487f3b369892f2a1001752d4ffbaccaf53af758b"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionSparseMLABackwardSm100._get_shared_storage_cls (cyclomatic 17): FlashAttentionSparseMLABackwardSm100._get_shared_storage_cls has cyclomatic complexity 17 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"26a29118c6b83f9748cbeb65d071abc58255eab61a57704cca3da1699ca283f9"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaKb64Sm100.__init__ (cyclomatic 17): FlashAttentionMLAForward1CtaKb64Sm100.__init__ has cyclomatic complexity 17 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b9f05c26d55590bb8bdbb32da39e99238160f08b5529ce979f98f5b35fa53f5"}},{"ruleId":"D1","level":"warning","message":{"text":"benchmark.pytorch_profiler (cyclomatic 17): benchmark.pytorch_profiler has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/utils/benchmark.py"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"2feca4231776adf8d23e3f5542a720dd3e0bdf52ab3d78a6806b631d83caf920"}},{"ruleId":"D1","level":"warning","message":{"text":"LMDataModule.process_dataset (cyclomatic 17): LMDataModule.process_dataset has cyclomatic complexity 17 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/datamodules/language_modeling_hf.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"d35cfe4b4752c815fa0561b7a16cb7c2270a66dbc34a7b76871f93286f25b48e"}},{"ruleId":"D1","level":"warning","message":{"text":"eval.evaluate (cyclomatic 17): eval.evaluate has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/eval.py"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c270f19db385e38d113f51c43df1dd6e9a1381b23047318a97b6fd55024980e"}},{"ruleId":"D1","level":"warning","message":{"text":"seq_common.pooling (cyclomatic 17): seq_common.pooling has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/models/modules/seq_common.py"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e1e0fa246e7c9e32125de4f9a884f498cd79bc141de87469448f6a641d3d7e0"}},{"ruleId":"D1","level":"warning","message":{"text":"block_sparse_utils.handle_block_sparse_empty_tile_correction_sm100 (cyclomatic 16): block_sparse_utils.handle_block_sparse_empty_tile_correction_sm100 has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparse_utils.py"},"region":{"startLine":833}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcd04ca8a0abc6d675c8dba5727e553272c32abfa050591167c4a5a5b07e29f8"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionBackwardSm80.epilogue (cyclomatic 16): FlashAttentionBackwardSm80.epilogue has cyclomatic complexity 16 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd.py"},"region":{"startLine":1071}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee7159bc02edc798971ecee984a0736be601a15f7b8a5c1f5625fe464c3fd6ba"}},{"ruleId":"D1","level":"warning","message":{"text":"dQdQvGemmKernel.__call__ (cyclomatic 16): dQdQvGemmKernel.__call__ has cyclomatic complexity 16 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"81219e7fb7bd438b74491fc119dfe6b0876fbfbb928df5af98e89eb9762a8add"}},{"ruleId":"D1","level":"warning","message":{"text":"FlashAttentionBackwardSm100._check_accum_tile_orders (cyclomatic 16): FlashAttentionBackwardSm100._check_accum_tile_orders has cyclomatic complexity 16 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":506}}}],"partialFingerprints":{"codehealthFindingId/v1":"93f3ec54561f1182955ff26ab36259b69acb42ce9378397d2e2fe4a04d474e70"}},{"ruleId":"D1","level":"warning","message":{"text":"AttentionMask.apply_mask_mod_sm100_scalar (cyclomatic 16): AttentionMask.apply_mask_mod_sm100_scalar has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/mask.py"},"region":{"startLine":424}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd9529a7a7077805bc561c5f138b7bfe4d2843dc74c610eedc31d12090699914"}},{"ruleId":"D1","level":"warning","message":{"text":"softmax.apply_score_mod_inner (cyclomatic 16): softmax.apply_score_mod_inner has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (softmax.apply_score_mod_bwd_inner) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/softmax.py"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4805fd55f6a34f25c03315dced19bbef878c0b1ec00d8ef30ab8ac2f16d859f"}},{"ruleId":"D1","level":"warning","message":{"text":"softmax.apply_score_mod_bwd_inner (cyclomatic 16): softmax.apply_score_mod_bwd_inner has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (softmax.apply_score_mod_inner) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/softmax.py"},"region":{"startLine":653}}}],"partialFingerprints":{"codehealthFindingId/v1":"202812b7b9056c3a1e36f1b4ab8bbf251b6bf9fe8c399d17701ff70843acfd7e"}},{"ruleId":"D1","level":"warning","message":{"text":"VarlenDecoder._num_m_blocks (cyclomatic 16): VarlenDecoder._num_m_blocks has cyclomatic complexity 16 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/tile_scheduler.py"},"region":{"startLine":1043}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1720c5cbdc64ccecfe537f9b144b8c56f72164dc07d290cf26497d94cf08dfd"}},{"ruleId":"D1","level":"warning","message":{"text":"flash_attn_interface._get_block_size_n (cyclomatic 16): flash_attn_interface._get_block_size_n has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_interface.py"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"c58ebece47f32fecbfbbe5b552fc458c4587b37e5417b3c69e0dedd76d07524e"}},{"ruleId":"D2","level":"warning","message":{"text":"interface._flash_attn_fwd (cognitive 367): interface._flash_attn_fwd has cognitive complexity 367 (threshold 15). Drivers by points: if/else 103 (174 pts), ternaries 63 (129 pts), boolean chains 52, loops 3 (11 pts), match/switch 1 (nesting depth added 145). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/interface.py"},"region":{"startLine":567}}}],"partialFingerprints":{"codehealthFindingId/v1":"538ccd30c730f7f9f842cb71b5ed013e0dd8fe3acd32662374f8f9d92882b7df"}},{"ruleId":"D2","level":"warning","message":{"text":"_SwapABCore.attn_cta (cognitive 360): _SwapABCore.attn_cta has cognitive complexity 360 (threshold 15). Drivers by points: if/else 66 (212 pts), loops 41 (127 pts), ternaries 3 (11 pts), boolean chains 10 (nesting depth added 240). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_decode_sm100.py"},"region":{"startLine":626}}}],"partialFingerprints":{"codehealthFindingId/v1":"927aea814f345f7c88c5f2da3b4432e79c4dca99ea56b81e46385e73125a2553"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardSm100.compute_loop (cognitive 330): FlashAttentionBackwardSm100.compute_loop has cognitive complexity 330 (threshold 15). Drivers by points: if/else 81 (251 pts), loops 11 (46 pts), ternaries 8 (23 pts), boolean chains 10 (nesting depth added 220). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":3920}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f3f98eaddc477f30590e642a39b80bf8b748bcaa78916d7d0cf2e27b81ed5b8"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionForwardSm100.correction_loop (cognitive 216): FlashAttentionForwardSm100.correction_loop has cognitive complexity 216 (threshold 15). Drivers by points: if/else 52 (147 pts), ternaries 10 (33 pts), loops 8 (24 pts), boolean chains 12 (nesting depth added 134). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":2984}}}],"partialFingerprints":{"codehealthFindingId/v1":"52669f5f54685f4fb4099ece5163c7e183f8aefb17b0209cf94da97e552fa37d"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardSm100.load (cognitive 204): FlashAttentionBackwardSm100.load has cognitive complexity 204 (threshold 15). Drivers by points: if/else 34 (140 pts), ternaries 9 (33 pts), loops 7 (25 pts), boolean chains 6 (nesting depth added 148). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":2388}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dd280f2012729dea3223da8de9031cb0d436d11f807a5de3386f062a10718d7"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionForwardCombine.kernel (cognitive 196): FlashAttentionForwardCombine.kernel has cognitive complexity 196 (threshold 15). Drivers by points: if/else 31 (110 pts), loops 16 (59 pts), ternaries 6 (19 pts), boolean chains 8 (nesting depth added 135). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_combine.py"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ce7088ccb2f1ee0b47c0660485ef6ae033f40d7f628c25a0b5d1a4291089ffb"}},{"ruleId":"D2","level":"warning","message":{"text":"AttentionMask.apply_mask (cognitive 193): AttentionMask.apply_mask has cognitive complexity 193 (threshold 15). Drivers by points: if/else 31 (77 pts), ternaries 16 (62 pts), loops 12 (44 pts), boolean chains 10 (nesting depth added 124). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/mask.py"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bbcab95c1b81a881a28a69a9978d3fb8c05a913177635a42c7f88914b086092"}},{"ruleId":"D2","level":"warning","message":{"text":"interface._flash_attn_bwd (cognitive 163): interface._flash_attn_bwd has cognitive complexity 163 (threshold 15). Drivers by points: if/else 63 (83 pts), ternaries 37 (60 pts), boolean chains 19, loops 1 (nesting depth added 43). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/interface.py"},"region":{"startLine":2033}}}],"partialFingerprints":{"codehealthFindingId/v1":"38d6767546d0c6698ec3c78079f8a3481d68fc2bd1a45491bbc8d1d3ac0da53b"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionForwardSm100.load (cognitive 160): FlashAttentionForwardSm100.load has cognitive complexity 160 (threshold 15). Drivers by points: if/else 38 (103 pts), ternaries 9 (36 pts), boolean chains 16, loops 2 (5 pts) (nesting depth added 95). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":1593}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffe524a25253b7b88d1b2e25cb62ebd3946b8fcfff7071835aba8c4b1b2be706"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionForwardSm90.load (cognitive 152): FlashAttentionForwardSm90.load has cognitive complexity 152 (threshold 15). Drivers by points: if/else 26 (80 pts), ternaries 10 (51 pts), loops 3 (14 pts), boolean chains 7 (nesting depth added 106). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm90.py"},"region":{"startLine":675}}}],"partialFingerprints":{"codehealthFindingId/v1":"1360bd4e0f5410c114019f03548c5006bfe71b933eff00c16fc642f1d4f84c83"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionForwardSm100.mma (cognitive 142): FlashAttentionForwardSm100.mma has cognitive complexity 142 (threshold 15). Drivers by points: if/else 27 (93 pts), loops 8 (30 pts), ternaries 5 (17 pts), boolean chains 2 (nesting depth added 100). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":1941}}}],"partialFingerprints":{"codehealthFindingId/v1":"65757403ce4f52145993d5e8facda53a7a02d7337b92df330151d54529ca786f"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardSm100.dQacc_reduce (cognitive 140): FlashAttentionBackwardSm100.dQacc_reduce has cognitive complexity 140 (threshold 15). Drivers by points: if/else 30 (108 pts), boolean chains 17, loops 5 (14 pts), ternaries 1 (nesting depth added 87). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":4753}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c79ae1b8322c7e3f64290c17162abeb53ef48fb86573371b4dce3b9fa7e2baa"}},{"ruleId":"D2","level":"warning","message":{"text":"dQdQvGemmKernelH64.kernel (cognitive 134): dQdQvGemmKernelH64.kernel has cognitive complexity 134 (threshold 15). Drivers by points: if/else 28 (72 pts), loops 14 (41 pts), ternaries 6 (19 pts), boolean chains 2 (nesting depth added 84). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py"},"region":{"startLine":483}}}],"partialFingerprints":{"codehealthFindingId/v1":"951aa7943d2ca3d09751709bca27e8ca9f336316f7c52e19b0a40fec0ccf6c5d"}},{"ruleId":"D2","level":"warning","message":{"text":"dQdQvGemmKernel.kernel (cognitive 128): dQdQvGemmKernel.kernel has cognitive complexity 128 (threshold 15). Drivers by points: if/else 36 (88 pts), loops 10 (26 pts), ternaries 4 (10 pts), boolean chains 4 (nesting depth added 74). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":445}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ba277bf307bf5162d46b477246f3d876285c11d7a6172b62e8748257f0e979f"}},{"ruleId":"D2","level":"warning","message":{"text":"interface._flash_attn_bwd_sparse_mla (cognitive 127): interface._flash_attn_bwd_sparse_mla has cognitive complexity 127 (threshold 15). Drivers by points: ternaries 32 (64 pts), if/else 35 (47 pts), boolean chains 15, loops 1 (nesting depth added 44). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/interface.py"},"region":{"startLine":2824}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e670e8064bf57ef4de5a542546ddfa94663fd70f102e84e0ca5a59c16546913"}},{"ruleId":"D2","level":"warning","message":{"text":"AttentionMask.apply_mask_sm100_transposed (cognitive 122): AttentionMask.apply_mask_sm100_transposed has cognitive complexity 122 (threshold 15). Drivers by points: if/else 24 (62 pts), ternaries 7 (27 pts), loops 6 (25 pts), boolean chains 8 (nesting depth added 77). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/mask.py"},"region":{"startLine":774}}}],"partialFingerprints":{"codehealthFindingId/v1":"eea68c53f193e879c9ff84984ed678084c850f67c680ed8773766a78e1e5c13e"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForwardSm100.load_cpasync (cognitive 118): FlashAttentionMLAForwardSm100.load_cpasync has cognitive complexity 118 (threshold 15). Drivers by points: if/else 28 (66 pts), loops 11 (35 pts), ternaries 4 (13 pts), boolean chains 4 (nesting depth added 71). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":1438}}}],"partialFingerprints":{"codehealthFindingId/v1":"d867c64a3d4443efe3dcd4c3e45cb21fc7baf3a7ec4495b89b67d2963b487317"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionSparseMLABackwardSm100.compute_loop (cognitive 117): FlashAttentionSparseMLABackwardSm100.compute_loop has cognitive complexity 117 (threshold 15). Drivers by points: loops 12 (49 pts), if/else 21 (48 pts), ternaries 3 (19 pts), boolean chains 1 (nesting depth added 80). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":2729}}}],"partialFingerprints":{"codehealthFindingId/v1":"df66ef3df765ace25221cb247bf45dd015bed8fbf32e3431971ba9235b768add"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardPreprocess.kernel (cognitive 115): FlashAttentionBackwardPreprocess.kernel has cognitive complexity 115 (threshold 15). Drivers by points: if/else 26 (69 pts), ternaries 10 (29 pts), loops 4 (13 pts), boolean chains 4 (nesting depth added 71). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_preprocess.py"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fc4c3eff9b4639aa72b03e416f25337c89f509c7ff4feaffe3e9066e70ed733"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForwardSm100.load (cognitive 114): FlashAttentionMLAForwardSm100.load has cognitive complexity 114 (threshold 15). Drivers by points: if/else 29 (69 pts), loops 10 (35 pts), ternaries 3 (8 pts), boolean chains 2 (nesting depth added 70). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":1909}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f5825b839c29c18d733da1c21020af6ca655eb404e655e90266f2d21a34e55b"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionSparseMLABackwardSm100.load (cognitive 111): FlashAttentionSparseMLABackwardSm100.load has cognitive complexity 111 (threshold 15). Drivers by points: if/else 38 (80 pts), loops 9 (29 pts), ternaries 1 (2 pts) (nesting depth added 63). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1851}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6fdef413fa98a23e92021047867e006a6ef4a38cc5fef77f8041352d7c34dd8"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForwardSm100.correction_loop (cognitive 109): FlashAttentionMLAForwardSm100.correction_loop has cognitive complexity 109 (threshold 15). Drivers by points: if/else 24 (68 pts), loops 6 (18 pts), ternaries 6 (17 pts), boolean chains 6 (nesting depth added 67). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":2953}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bae6fe262ac7f80fa656895d04feb335880a9396970f38ae637a3bebdb4f4d6"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForwardSm100.mma (cognitive 103): FlashAttentionMLAForwardSm100.mma has cognitive complexity 103 (threshold 15). Drivers by points: if/else 23 (54 pts), loops 11 (41 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 63). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":2228}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d7ab308e0baaf0f7229173d8e31e474999305c07e89fe5e5331ab6468e3be5b"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardSm100.mma (cognitive 101): FlashAttentionBackwardSm100.mma has cognitive complexity 101 (threshold 15). Drivers by points: if/else 28 (73 pts), loops 4 (12 pts), ternaries 6 (11 pts), boolean chains 5 (nesting depth added 58). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":2997}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd6287de9123b4e65e1b30cb00bc3f9c0582560b0b03499d6d9049c90ecd8101"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionForwardSm100.softmax_loop (cognitive 97): FlashAttentionForwardSm100.softmax_loop has cognitive complexity 97 (threshold 15). Drivers by points: if/else 26 (54 pts), ternaries 10 (21 pts), loops 4 (12 pts), boolean chains 10 (nesting depth added 47). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":2415}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9810af265b12547087042c78fdf0ac260778dc49af98f3d9a136677fefcfe6b"}},{"ruleId":"D2","level":"warning","message":{"text":"VarlenDecoder.decode (cognitive 97): VarlenDecoder.decode has cognitive complexity 97 (threshold 15). Drivers by points: if/else 26 (53 pts), ternaries 8 (33 pts), boolean chains 9, loops 1 (2 pts) (nesting depth added 53). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/tile_scheduler.py"},"region":{"startLine":1109}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3dcb5b72a4332ab13112b0e1a91cc22a5a1ce0f7ca4fdb6265883d831bd0f07"}},{"ruleId":"D2","level":"warning","message":{"text":"sm90_config_search.find_feasible_bwd_configs (cognitive 95): sm90_config_search.find_feasible_bwd_configs has cognitive complexity 95 (threshold 15). Drivers by points: loops 9 (45 pts), if/else 6 (35 pts), ternaries 2 (12 pts), boolean chains 3 (nesting depth added 75). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/sm90_config_search.py"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab3378964c4e14957a98e0dbb85b14f083e4e4e301fb0243cfc9f00f7996cd1f"}},{"ruleId":"D2","level":"warning","message":{"text":"benchmark_flash_attention_fp8.main (cognitive 92): benchmark_flash_attention_fp8.main has cognitive complexity 92 (threshold 15). Drivers by points: if/else 18 (57 pts), error handling 4 (17 pts), loops 5 (12 pts), boolean chains 4, ternaries 2 (nesting depth added 59). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/benchmark_flash_attention_fp8.py"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"31b8eae4723fe1de27133c944c6d9e01a161d77e0eecfbb7f5fdb416848ea683"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaSm100.load (cognitive 92): FlashAttentionMLAForward1CtaSm100.load has cognitive complexity 92 (threshold 15). Drivers by points: if/else 22 (54 pts), ternaries 6 (21 pts), loops 5 (17 pts) (nesting depth added 59). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":1539}}}],"partialFingerprints":{"codehealthFindingId/v1":"18bcc134485550b3f052d88c4774e180697d90129de550b6ae5ebe0cc2622758"}},{"ruleId":"D2","level":"warning","message":{"text":"dKGemmKernel.kernel (cognitive 89): dKGemmKernel.kernel has cognitive complexity 89 (threshold 15). Drivers by points: loops 13 (45 pts), if/else 12 (34 pts), ternaries 3 (8 pts), boolean chains 2 (nesting depth added 59). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dk_sm100.py"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"29b6b7700eb1f933cb5daf18dd91f89c7489c926aa26e23082c3db97c477fa78"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaKb64Sm100.correction_loop (cognitive 89): FlashAttentionMLAForward1CtaKb64Sm100.correction_loop has cognitive complexity 89 (threshold 15). Drivers by points: if/else 13 (52 pts), loops 6 (21 pts), ternaries 4 (13 pts), boolean chains 3 (nesting depth added 63). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":2078}}}],"partialFingerprints":{"codehealthFindingId/v1":"548eb1a2d3cb1a50de3244ca9ad0568d8041cebe2d9921c8906dcb7e519ee4c7"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionSparseMLABackwardSm100.kernel (cognitive 88): FlashAttentionSparseMLABackwardSm100.kernel has cognitive complexity 88 (threshold 15). Drivers by points: if/else 47 (80 pts), loops 3 (5 pts), ternaries 2, boolean chains 1 (nesting depth added 35). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":998}}}],"partialFingerprints":{"codehealthFindingId/v1":"e22619ad44cd308695c2c7cf5238871c966b300eb5b54594d2233df359619216"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForwardSm100.kernel (cognitive 87): FlashAttentionMLAForwardSm100.kernel has cognitive complexity 87 (threshold 15). Drivers by points: if/else 40 (73 pts), ternaries 6 (7 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 36). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":830}}}],"partialFingerprints":{"codehealthFindingId/v1":"9356b96381e8b5f5431dbaceb39b96d087166f38e33bf50c0c66792133bd1011"}},{"ruleId":"D2","level":"warning","message":{"text":"AttentionMask.apply_mask_sm100 (cognitive 86): AttentionMask.apply_mask_sm100 has cognitive complexity 86 (threshold 15). Drivers by points: if/else 19 (35 pts), ternaries 8 (29 pts), loops 5 (17 pts), boolean chains 5 (nesting depth added 49). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/mask.py"},"region":{"startLine":612}}}],"partialFingerprints":{"codehealthFindingId/v1":"b28ac974e77507838036836f741aa847c37e210a2935423339b40ae35e9fbb38"}},{"ruleId":"D2","level":"warning","message":{"text":"config.validate_fwd_config (cognitive 84): config.validate_fwd_config has cognitive complexity 84 (threshold 15). Drivers by points: if/else 42 (55 pts), boolean chains 27, match/switch 1 (2 pts) (nesting depth added 14). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/config.py"},"region":{"startLine":1807}}}],"partialFingerprints":{"codehealthFindingId/v1":"09b18a87f87cd6fccc5752bb36b9030bb0873134feb2b3331a1697b746589ce1"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionForwardSm100.kernel (cognitive 84): FlashAttentionForwardSm100.kernel has cognitive complexity 84 (threshold 15). Drivers by points: if/else 39 (58 pts), boolean chains 13, ternaries 7 (10 pts), loops 2 (3 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":981}}}],"partialFingerprints":{"codehealthFindingId/v1":"36bb59437ca9305ebf14e90b63ebb59d1b6269b2b21b3d5e8c3cf14743250c6e"}},{"ruleId":"D2","level":"warning","message":{"text":"Block.forward (cognitive 83): Block.forward has cognitive complexity 83 (threshold 15). Drivers by points: if/else 27 (56 pts), ternaries 7 (23 pts), boolean chains 4 (nesting depth added 45). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/block.py"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"94ab3e929e6b095d813037c178b32d75cc98bad9867697ed9c8fce5e1da77cc7"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaSm100.kernel (cognitive 81): FlashAttentionMLAForward1CtaSm100.kernel has cognitive complexity 81 (threshold 15). Drivers by points: if/else 32 (62 pts), ternaries 14, loops 2 (4 pts), boolean chains 1 (nesting depth added 32). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":1091}}}],"partialFingerprints":{"codehealthFindingId/v1":"061c78e697f5e0ca60f54ec9497eebc73062afe79b7d727888ba303726cec144"}},{"ruleId":"D2","level":"warning","message":{"text":"BlockSparsityKernel.kernel (cognitive 80): BlockSparsityKernel.kernel has cognitive complexity 80 (threshold 15). Drivers by points: if/else 24 (56 pts), loops 3 (10 pts), ternaries 2 (8 pts), boolean chains 6 (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/compute_block_sparsity.py"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"59f182d5ad7895410f83966c17230739300972f65447bc185adc3eb137b2abd9"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaSm100.correction_loop (cognitive 80): FlashAttentionMLAForward1CtaSm100.correction_loop has cognitive complexity 80 (threshold 15). Drivers by points: if/else 14 (50 pts), ternaries 5 (16 pts), loops 4 (11 pts), boolean chains 3 (nesting depth added 54). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":3111}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe0134cf34d41dca7090bdec2719b22ffad82f6d2512616a2be8cb1252b1f3b2"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardSm100.kernel (cognitive 78): FlashAttentionBackwardSm100.kernel has cognitive complexity 78 (threshold 15). Drivers by points: if/else 51 (67 pts), ternaries 4 (6 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 20). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":1499}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd841a5406c3f829fa79a2980e97bf2c35d17d79c7e39da7a9fda46102c2047c"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaSm100.__call__ (cognitive 77): FlashAttentionMLAForward1CtaSm100.__call__ has cognitive complexity 77 (threshold 15). Drivers by points: ternaries 29 (39 pts), if/else 22 (25 pts), boolean chains 9, loops 4 (nesting depth added 13). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":560}}}],"partialFingerprints":{"codehealthFindingId/v1":"5df37b9aa6ed98595ef6bb46a99cedb7627d42a3d6d723fc45af05ce6e00d692"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardSm100.__call__ (cognitive 76): FlashAttentionBackwardSm100.__call__ has cognitive complexity 76 (threshold 15). Drivers by points: if/else 33 (37 pts), ternaries 19 (28 pts), boolean chains 11 (nesting depth added 13). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":818}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b59582a178cea35b04966acd85598125d217277e0cd95516a1e163515ba11d2"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionSparseMLABackwardSm100.dVacc_store (cognitive 75): FlashAttentionSparseMLABackwardSm100.dVacc_store has cognitive complexity 75 (threshold 15). Drivers by points: loops 11 (44 pts), if/else 10 (31 pts) (nesting depth added 54). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":3127}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bf4092267666414d83153ed97facdde409841f30b52c4c5c6e97baf3b944e22"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaSm100.mma (cognitive 73): FlashAttentionMLAForward1CtaSm100.mma has cognitive complexity 73 (threshold 15). Drivers by points: if/else 11 (36 pts), loops 8 (29 pts), ternaries 4 (7 pts), boolean chains 1 (nesting depth added 49). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":2214}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb1a9074dbabf0a5581a0f148bd2c5f97b1b2e3c5731ea4862b51aa064160237"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaKb64Sm100.load_tma (cognitive 71): FlashAttentionMLAForward1CtaKb64Sm100.load_tma has cognitive complexity 71 (threshold 15). Drivers by points: if/else 17 (51 pts), loops 6 (20 pts) (nesting depth added 48). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":1101}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bebe0ec6e07a5e0d9550fb4186b9431851e22a5a2e4b78a1cfe8932e284ed97"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionForwardSm100.__call__ (cognitive 71): FlashAttentionForwardSm100.__call__ has cognitive complexity 71 (threshold 15). Drivers by points: ternaries 29 (35 pts), if/else 25 (26 pts), boolean chains 9, loops 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":456}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a678e920e4cf3e7e337fa0b27e4c4105cdd88bb1c65fd64c463287ac0a285bf"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionSparseMLABackwardSm100.__call__ (cognitive 68): FlashAttentionSparseMLABackwardSm100.__call__ has cognitive complexity 68 (threshold 15). Drivers by points: if/else 30 (43 pts), ternaries 15 (18 pts), boolean chains 4, loops 3 (nesting depth added 16). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":503}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b24f0584e58ba58791f462dbbbaa3d7631f367a66f3b15371b89f3a0ce4619d"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaSm100.load_cpasync (cognitive 68): FlashAttentionMLAForward1CtaSm100.load_cpasync has cognitive complexity 68 (threshold 15). Drivers by points: if/else 15 (36 pts), ternaries 6 (17 pts), loops 5 (15 pts) (nesting depth added 42). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":1938}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e392c5f0f73874ba976a2ddc8327bfe298816bcace881d22d6f12f6e22bba80"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionForwardSm90.mma (cognitive 68): FlashAttentionForwardSm90.mma has cognitive complexity 68 (threshold 15). Drivers by points: if/else 15 (31 pts), loops 5 (16 pts), ternaries 6 (15 pts), boolean chains 6 (nesting depth added 36). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm90.py"},"region":{"startLine":1023}}}],"partialFingerprints":{"codehealthFindingId/v1":"51fe2967f9bd2a93e36cacc8e326b053f6a2031df217ed8e91295c78d3ade2ba"}},{"ruleId":"D2","level":"warning","message":{"text":"config.validate_bwd_config (cognitive 66): config.validate_bwd_config has cognitive complexity 66 (threshold 15). Drivers by points: if/else 26 (41 pts), boolean chains 18, ternaries 3 (7 pts) (nesting depth added 19). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/config.py"},"region":{"startLine":3267}}}],"partialFingerprints":{"codehealthFindingId/v1":"affd4907e7dfd5d7ee25e9c35262d7d932fcf18963aab693a17aaf52de2b8923"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardSm90.load (cognitive 66): FlashAttentionBackwardSm90.load has cognitive complexity 66 (threshold 15). Drivers by points: ternaries 6 (24 pts), if/else 9 (21 pts), loops 5 (18 pts), boolean chains 3 (nesting depth added 43). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm90.py"},"region":{"startLine":879}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d06ee1be401724952a12594b760d873c215b128890794e6ad41dacf54f8adb3"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForwardSm100.__call__ (cognitive 65): FlashAttentionMLAForwardSm100.__call__ has cognitive complexity 65 (threshold 15). Drivers by points: ternaries 29 (35 pts), if/else 18 (21 pts), boolean chains 6, loops 3 (nesting depth added 9). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1765aff647b5d49eec56b311179fba8ae0c848805b794bfd2529d9f0a3f6d8d"}},{"ruleId":"D2","level":"warning","message":{"text":"layer_norm._layer_norm_bwd_kernel (cognitive 65): layer_norm._layer_norm_bwd_kernel has cognitive complexity 65 (threshold 15). Drivers by points: if/else 35 (58 pts), ternaries 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/layer_norm.py"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e488e5a290f6679c6989ae39360a22ad78be4dde6f7d8b6bec07916c62489a1"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaKb64Sm100.kernel (cognitive 64): FlashAttentionMLAForward1CtaKb64Sm100.kernel has cognitive complexity 64 (threshold 15). Drivers by points: if/else 31 (51 pts), loops 3 (7 pts), ternaries 4 (5 pts), boolean chains 1 (nesting depth added 25). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":756}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8fc01d49691acf76d08876f49eee49e8e1d62ec7249e63bb04ad5098c29670d"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardSm90.dQaccum_store (cognitive 61): FlashAttentionBackwardSm90.dQaccum_store has cognitive complexity 61 (threshold 15). Drivers by points: if/else 15 (40 pts), loops 5 (18 pts), boolean chains 3 (nesting depth added 38). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm90.py"},"region":{"startLine":1896}}}],"partialFingerprints":{"codehealthFindingId/v1":"0528b3c2dd66bddfcf8509b11e4ffd0fa306153a411b65ff2cc4fc4299275493"}},{"ruleId":"D2","level":"warning","message":{"text":"MHA.forward (cognitive 60): MHA.forward has cognitive complexity 60 (threshold 15). Drivers by points: if/else 23 (42 pts), ternaries 7 (11 pts), boolean chains 7 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/mha.py"},"region":{"startLine":573}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed2a2166d0fe8ac6f1de1b158b199bdedfc671a3ab1373ce376cdbe99c5dec01"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionForwardSm80.kernel (cognitive 59): FlashAttentionForwardSm80.kernel has cognitive complexity 59 (threshold 15). Drivers by points: if/else 19 (38 pts), ternaries 5 (10 pts), loops 3 (7 pts), boolean chains 4 (nesting depth added 28). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd.py"},"region":{"startLine":755}}}],"partialFingerprints":{"codehealthFindingId/v1":"eab1de9f17ea2150e24a94f2dd05731cb3a8db9977eaffa556f82d3069f876a4"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForwardSm100.softmax_loop (cognitive 58): FlashAttentionMLAForwardSm100.softmax_loop has cognitive complexity 58 (threshold 15). Drivers by points: if/else 12 (23 pts), ternaries 5 (15 pts), loops 5 (13 pts), boolean chains 7 (nesting depth added 29). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":2554}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d2e38352496cce798a11c5f52b25b08a49137cc178caed6b02d28d0b2bbb38c"}},{"ruleId":"D2","level":"warning","message":{"text":"AttentionMask.apply_mask_mod_sm100_vector (cognitive 58): AttentionMask.apply_mask_mod_sm100_vector has cognitive complexity 58 (threshold 15). Drivers by points: if/else 11 (28 pts), ternaries 6 (15 pts), loops 5 (11 pts), boolean chains 4 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/mask.py"},"region":{"startLine":494}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1cdb59ed7b162c4ec7adcf6b6b3cc700bdd51b8f5f27102f76a1f91e41d4bf0"}},{"ruleId":"D2","level":"warning","message":{"text":"flash_attn_triton._bwd_kernel_one_col_block (cognitive 58): flash_attn_triton._bwd_kernel_one_col_block has cognitive complexity 58 (threshold 15). Drivers by points: if/else 31 (56 pts), loops 1, ternaries 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_triton.py"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad69895e21001bd8ddf66e6630f9820e02d01cd14ed60e5556a5063c4c6f3e2a"}},{"ruleId":"D2","level":"warning","message":{"text":"FusedMLPFunc.backward (cognitive 58): FusedMLPFunc.backward has cognitive complexity 58 (threshold 15). Drivers by points: if/else 25 (36 pts), ternaries 7 (14 pts), boolean chains 8 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/fused_dense.py"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"390512ef23fbd67b6673c3642bf75c69bac3899ed028fb4cc01a86e3d76e0e7f"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardSm80.kernel (cognitive 57): FlashAttentionBackwardSm80.kernel has cognitive complexity 57 (threshold 15). Drivers by points: if/else 19 (44 pts), loops 2 (6 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 31). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd.py"},"region":{"startLine":493}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f396c9ee6bd41393b34fc030af60dad9124c3023279233b51e95f601f47972b"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionSparseMLABackwardSm100.mma (cognitive 56): FlashAttentionSparseMLABackwardSm100.mma has cognitive complexity 56 (threshold 15). Drivers by points: if/else 21 (34 pts), loops 6 (20 pts), boolean chains 2 (nesting depth added 27). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":2237}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6f0064712eeb8a89a411a7560d16aedd8533ec460224f4ffbad4e96be76a0fd"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardPostprocess.kernel (cognitive 55): FlashAttentionBackwardPostprocess.kernel has cognitive complexity 55 (threshold 15). Drivers by points: if/else 15 (27 pts), ternaries 6 (16 pts), loops 3 (9 pts), boolean chains 3 (nesting depth added 28). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_postprocess.py"},"region":{"startLine":488}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c63a02834b7875daff8f3d7fa7841ef2205a23d543b68abe600107a68c48e64"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaKb64Sm100.__call__ (cognitive 55): FlashAttentionMLAForward1CtaKb64Sm100.__call__ has cognitive complexity 55 (threshold 15). Drivers by points: ternaries 19 (25 pts), if/else 19 (23 pts), boolean chains 5, loops 2 (nesting depth added 10). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"e82192843d4fb7f2d3f8bd4f9cf1dbc23c26fe55275fff63d004f481c980cec2"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionForwardSm100.__init__ (cognitive 55): FlashAttentionForwardSm100.__init__ has cognitive complexity 55 (threshold 15). Drivers by points: boolean chains 30, if/else 12 (14 pts), ternaries 11 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"baab4fa2eec80a5621fc3f0ef0f0fc4388ef50688f06b7c6c409d00ed3e1bfb4"}},{"ruleId":"D2","level":"warning","message":{"text":"gpt.create_mlp_cls (cognitive 55): gpt.create_mlp_cls has cognitive complexity 55 (threshold 15). Drivers by points: ternaries 10 (31 pts), if/else 13 (22 pts), boolean chains 2 (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/gpt.py"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"3328d5c1b81c8718cec5bb1af2731e9a81ecb7333e6125c27e2c92ff2a16ef23"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardSm100._check_accum_tile_orders (cognitive 52): FlashAttentionBackwardSm100._check_accum_tile_orders has cognitive complexity 52 (threshold 15). Drivers by points: loops 13 (44 pts), if/else 4 (8 pts) (nesting depth added 35). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":506}}}],"partialFingerprints":{"codehealthFindingId/v1":"4607bb70055b5354395b8457f7cd0e1d37382f0b86a66df59656b892dc326daa"}},{"ruleId":"D2","level":"warning","message":{"text":"block_sparse_utils.produce_block_sparse_q_loads_bwd_sm100_default (cognitive 51): block_sparse_utils.produce_block_sparse_q_loads_bwd_sm100_default has cognitive complexity 51 (threshold 15). Drivers by points: if/else 15 (39 pts), ternaries 2 (7 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparse_utils.py"},"region":{"startLine":1180}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdebf033b189c77bb4d6896c18df80972f18781784351c590edd322e400fbae5"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardSm90.mma (cognitive 50): FlashAttentionBackwardSm90.mma has cognitive complexity 50 (threshold 15). Drivers by points: if/else 18 (25 pts), ternaries 6 (12 pts), boolean chains 8, loops 2 (5 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm90.py"},"region":{"startLine":1207}}}],"partialFingerprints":{"codehealthFindingId/v1":"62ca3801482cd119b22c2e170296771064108696a53d494b217975fdc4427609"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardPreprocess.__call__ (cognitive 49): FlashAttentionBackwardPreprocess.__call__ has cognitive complexity 49 (threshold 15). Drivers by points: if/else 24 (32 pts), ternaries 11 (17 pts) (nesting depth added 14). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_preprocess.py"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"932543b83e150c169c0b90a9147e749c8b7c3b49d57c85078b7ff02ec5000359"}},{"ruleId":"D2","level":"warning","message":{"text":"CuSeqlensToBlocksKernel.kernel (cognitive 48): CuSeqlensToBlocksKernel.kernel has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (41 pts), loops 4 (7 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/cu_blocks_kernel.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e4d5cfcecbb83894dd1d99aeab23d1a498679a627ba583fc161771f40949f63"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionForwardSm90.__call__ (cognitive 48): FlashAttentionForwardSm90.__call__ has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 22 (25 pts), if/else 10 (12 pts), boolean chains 11 (nesting depth added 5). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm90.py"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6b3484b7853bf46f533e7e42614d8d3c3d016aa6ab0e215d62cdf88429041e0"}},{"ruleId":"D2","level":"warning","message":{"text":"testing.attention_ref (cognitive 47): testing.attention_ref has cognitive complexity 47 (threshold 15). Drivers by points: if/else 24, ternaries 11 (19 pts), boolean chains 4 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/testing.py"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b9b74a69fbd97a9855622a988dfbacc9f7bc3afe32a2146063095b3c9fdb391"}},{"ruleId":"D2","level":"warning","message":{"text":"flash_attn_triton._fwd_kernel (cognitive 47): flash_attn_triton._fwd_kernel has cognitive complexity 47 (threshold 15). Drivers by points: if/else 26 (45 pts), loops 1, ternaries 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_triton.py"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"18d4ddf6b26cab5edc844f7c38777cd67fa55d74ca967b55b6a68f3caa0bdbf0"}},{"ruleId":"D2","level":"warning","message":{"text":"block_sparse_utils.consume_block_sparse_loads (cognitive 46): block_sparse_utils.consume_block_sparse_loads has cognitive complexity 46 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 5 (17 pts), ternaries 2 (6 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparse_utils.py"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed52547ceb2c890a129378717551e70101fab795b2aa02ef806f31247c187e2f"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardSm100.epilogue_dK_or_dV_tma (cognitive 44): FlashAttentionBackwardSm100.epilogue_dK_or_dV_tma has cognitive complexity 44 (threshold 15). Drivers by points: if/else 22 (33 pts), ternaries 5 (6 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 14). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":5456}}}],"partialFingerprints":{"codehealthFindingId/v1":"7efed245f0762abf1e18030bb24d06ce4b5a63b0d6849362199c36a2efe5726c"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionForwardBase.load_V (cognitive 44): FlashAttentionForwardBase.load_V has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 5 (19 pts), loops 3 (13 pts), if/else 4 (9 pts), boolean chains 3 (nesting depth added 29). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd.py"},"region":{"startLine":529}}}],"partialFingerprints":{"codehealthFindingId/v1":"405570a367f5224bc65808f01aa46aa5eb10a6872e3c6530ca047b0da0c723ee"}},{"ruleId":"D2","level":"warning","message":{"text":"generation.decode_speculative (cognitive 42): generation.decode_speculative has cognitive complexity 42 (threshold 15). Drivers by points: if/else 22 (36 pts), ternaries 3 (5 pts), loops 1 (nesting depth added 16). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/utils/generation.py"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3ad7315f4a929ec7aafe239bd8aa51c003947dfad31d5bb9a4b40613c4f4d79"}},{"ruleId":"D2","level":"warning","message":{"text":"ParallelMHA.forward (cognitive 41): ParallelMHA.forward has cognitive complexity 41 (threshold 15). Drivers by points: if/else 18 (34 pts), boolean chains 4, ternaries 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/mha.py"},"region":{"startLine":910}}}],"partialFingerprints":{"codehealthFindingId/v1":"a509f8710f049007ba3a2e457ea252549bab6af0445604fc8e61557e1644d077"}},{"ruleId":"D2","level":"warning","message":{"text":"train.train (cognitive 41): train.train has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 8, loops 2 (4 pts), error handling 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/train.py"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"0148b61f01fc32f0c824a25294c3579e393e41ba63022aca4ef45b81c023fb55"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardSm100.epilogue_dK_or_dV_tma_m64 (cognitive 40): FlashAttentionBackwardSm100.epilogue_dK_or_dV_tma_m64 has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (21 pts), loops 5 (13 pts), boolean chains 3, ternaries 3 (nesting depth added 16). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":5268}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d1bfc69355e8d255368e7fb1f078836904a17c59f123e3b6c27ee7a31cc3b88"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardSm80.epilogue (cognitive 39): FlashAttentionBackwardSm80.epilogue has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (20 pts), ternaries 4 (11 pts), loops 4 (8 pts) (nesting depth added 19). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd.py"},"region":{"startLine":1071}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8ddcdec7f93179a546cfc7c70875abbcb1cede1aab150fa75f490c55f2e38ca"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionForwardSm100.epilogue_s2g (cognitive 38): FlashAttentionForwardSm100.epilogue_s2g has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 4 (13 pts), ternaries 1 (5 pts), boolean chains 3 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":3568}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3b5b63e6207dc0a636abddb2171e540c0d6ba8b09092c0925b430fb93218fc3"}},{"ruleId":"D2","level":"warning","message":{"text":"config.validate_mla_fwd_config (cognitive 37): config.validate_mla_fwd_config has cognitive complexity 37 (threshold 15). Drivers by points: if/else 19 (28 pts), boolean chains 9 (nesting depth added 9). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/config.py"},"region":{"startLine":2305}}}],"partialFingerprints":{"codehealthFindingId/v1":"94046210e4867dbd48563f37a698bd7dede9ab8cd8e5844817075f4c9c1371fd"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionForwardBase.epilogue (cognitive 37): FlashAttentionForwardBase.epilogue has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 2 (7 pts), ternaries 1 (5 pts), boolean chains 2 (nesting depth added 21). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd.py"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"f06d158750a45fd4769076ce6105f501f7428c06459e03d7d1c1c296ad67d94b"}},{"ruleId":"D2","level":"warning","message":{"text":"GPTModel.forward (cognitive 37): GPTModel.forward has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (18 pts), ternaries 6 (16 pts), boolean chains 2, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/gpt.py"},"region":{"startLine":514}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f9dc8a9b1b45d52ce99c811c5098298634005d7b45d456040f5788e4539be31"}},{"ruleId":"D2","level":"warning","message":{"text":"layer_norm.rms_norm_ref (cognitive 37): layer_norm.rms_norm_ref has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (20 pts), ternaries 9 (17 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/layer_norm.py"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0b1025a31777876574da421a4799b8f67e85d7dd699d5d4d0bacee3daff95fe"}},{"ruleId":"D2","level":"warning","message":{"text":"param_grouping.group_parameters_for_optimizer (cognitive 37): param_grouping.group_parameters_for_optimizer has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 6, ternaries 3 (5 pts), loops 3 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/optim/param_grouping.py"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"caf52dc862b43831611fab17746442a02eff857bf69767fa37a15ff4ce4bad91"}},{"ruleId":"D2","level":"warning","message":{"text":"compute_block_sparsity.compute_block_sparsity (cognitive 36): compute_block_sparsity.compute_block_sparsity has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (19 pts), ternaries 7 (12 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/compute_block_sparsity.py"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"2019654d346ed578b19d415a0f03f4e439327a26b2330a30865959a395721da2"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaSm100.softmax_loop (cognitive 36): FlashAttentionMLAForward1CtaSm100.softmax_loop has cognitive complexity 36 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 5 (17 pts), boolean chains 2 (nesting depth added 23). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":2737}}}],"partialFingerprints":{"codehealthFindingId/v1":"52079e328860dc2d4cda087800735f00c44aa84758992e5e42b793aa025f4da6"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardSm90.__call__ (cognitive 35): FlashAttentionBackwardSm90.__call__ has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16, ternaries 11 (14 pts), boolean chains 5 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm90.py"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"66d6fc3d07159492336f01822a1c6eb25232008457231fd13a5f9fe4dc50b022"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaKb64Sm100.mma (cognitive 35): FlashAttentionMLAForward1CtaKb64Sm100.mma has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 3 (9 pts) (nesting depth added 20). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":1603}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f229e6e8f1542a736feb4140f73736975cd26a51ec3445c36ff8e06f9be661d"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaSm100.__init__ (cognitive 35): FlashAttentionMLAForward1CtaSm100.__init__ has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 17, ternaries 11, if/else 7. This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf91eb83bb7ec7a6d5474f6ac64e063421911d1a551192cb1430321c1345d1f6"}},{"ruleId":"D2","level":"warning","message":{"text":"softmax.apply_score_mod_inner (cognitive 34): softmax.apply_score_mod_inner has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (softmax.apply_score_mod_bwd_inner) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/softmax.py"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b4f58a16dfec733bac980bb844414a401e0aca1d75c87f343e8d782343d104d"}},{"ruleId":"D2","level":"warning","message":{"text":"softmax.apply_score_mod_bwd_inner (cognitive 34): softmax.apply_score_mod_bwd_inner has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (softmax.apply_score_mod_inner) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/softmax.py"},"region":{"startLine":653}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d69307e47c1677c3c2178ab3175b713b49bf147af585f9e0fe5f0aec3f05b96"}},{"ruleId":"D2","level":"warning","message":{"text":"layer_norm.layer_norm_ref (cognitive 34): layer_norm.layer_norm_ref has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (20 pts), ternaries 7 (14 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/layer_norm.py"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c73320a3bac488de78188f48d64a538720a1ae8cdd3e6cc0934940180602c6a"}},{"ruleId":"D2","level":"warning","message":{"text":"config._select_fwd_config (cognitive 33): config._select_fwd_config has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 17, if/else 10 (12 pts), ternaries 4 (nesting depth added 2). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/config.py"},"region":{"startLine":1522}}}],"partialFingerprints":{"codehealthFindingId/v1":"a265f68d7092ecb5a46eb9d9efe85e6b9d4efa8a350b49e17ced4899f7ca55db"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardSm100.__init__ (cognitive 32): FlashAttentionBackwardSm100.__init__ has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 15, if/else 8 (9 pts), ternaries 7 (8 pts) (nesting depth added 2). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"228eb0c372ee4051fa9805ba48e44c6b065289deba7a94aa3a0042cf6c5d954c"}},{"ruleId":"D2","level":"warning","message":{"text":"cross_entropy.cross_entropy_fwd_kernel (cognitive 32): cross_entropy.cross_entropy_fwd_kernel has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (18 pts), ternaries 3 (11 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/cross_entropy.py"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"f107b3ecf8ec496473d98cc89a605c0851647b4f310985de8192f041f39524fb"}},{"ruleId":"D2","level":"warning","message":{"text":"interface._get_scheduler_metadata (cognitive 31): interface._get_scheduler_metadata has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (15 pts), ternaries 5 (11 pts), boolean chains 4, loops 1 (nesting depth added 9). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/interface.py"},"region":{"startLine":4282}}}],"partialFingerprints":{"codehealthFindingId/v1":"64b16ceb57d426a5501a8a1b0ad5f0ab5b7e14ea3bcb927ba28dc75e3e16f4d9"}},{"ruleId":"D2","level":"warning","message":{"text":"layer_norm._layer_norm_fwd_1pass_kernel (cognitive 31): layer_norm._layer_norm_fwd_1pass_kernel has cognitive complexity 31 (threshold 15). Drivers by points: if/else 20 (27 pts), ternaries 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/layer_norm.py"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"830f8a216fb5f3ed467d74bfa108b94518d1ac4931a7348023a46873950710c4"}},{"ruleId":"D2","level":"warning","message":{"text":"testing.attention_ref (cognitive 31): testing.attention_ref has cognitive complexity 31 (threshold 15). Drivers by points: if/else 23, ternaries 4 (7 pts), boolean chains 1 (nesting depth added 3). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/utils/testing.py"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"fff7a6121092550bc4a569fef2df925b7c8fc29df19f3d0cf04541c3037cb8b1"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionForwardSm100.softmax_step (cognitive 30): FlashAttentionForwardSm100.softmax_step has cognitive complexity 30 (threshold 15). Drivers by points: if/else 22 (25 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":2806}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bea60f8f96cce28aca8d43ed6029f672df067783e80b003baaf76b085fe2997"}},{"ruleId":"D2","level":"warning","message":{"text":"AttentionMask.apply_mask_mod_sm100_scalar (cognitive 30): AttentionMask.apply_mask_mod_sm100_scalar has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 5 (12 pts), boolean chains 3, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/mask.py"},"region":{"startLine":424}}}],"partialFingerprints":{"codehealthFindingId/v1":"f21b8f0dcd13331a269844a297a02ebecb6b61b73a307a1494aaa8f03b818a01"}},{"ruleId":"D2","level":"warning","message":{"text":"CpasyncGatherKVManagerH64.load_X (cognitive 30): CpasyncGatherKVManagerH64.load_X has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 7, ternaries 3 (6 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/topk_gather_kv.py"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"7115de5cd1b9d9334b5fb24bd93e2f22cf07b7b25e4415aaabebc0cec4c5b3c9"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionSparseMLABackwardSm100.load_cpasync (cognitive 29): FlashAttentionSparseMLABackwardSm100.load_cpasync has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 3 (6 pts), ternaries 1 (3 pts) (nesting depth added 13). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1678}}}],"partialFingerprints":{"codehealthFindingId/v1":"eac1dd2cd58fe7f8e9bc1f78b61b2583ef864a27c713a4497f5ff47a87d1c617"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardSm90.mma_one_m_block (cognitive 29): FlashAttentionBackwardSm90.mma_one_m_block has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (18 pts), loops 4 (6 pts), ternaries 3, boolean chains 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm90.py"},"region":{"startLine":1585}}}],"partialFingerprints":{"codehealthFindingId/v1":"64d8ec59682b594afb0e2c74328b66d12c78f893a5a5ff7cffd5490ba94b1512"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardSm90.epilogue_dKV (cognitive 29): FlashAttentionBackwardSm90.epilogue_dKV has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2 (6 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm90.py"},"region":{"startLine":1745}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8a1161e496224bb5d593781b946682cda7d99216a729eba054ecf04f05b2638"}},{"ruleId":"D2","level":"warning","message":{"text":"VarlenDecoder._num_m_blocks (cognitive 29): VarlenDecoder._num_m_blocks has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (23 pts), ternaries 3 (5 pts), boolean chains 1 (nesting depth added 11). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/tile_scheduler.py"},"region":{"startLine":1043}}}],"partialFingerprints":{"codehealthFindingId/v1":"d40805fce98e88f3b34751de63c7c600f8fc5ac21b848ee48800329e6db13a9b"}},{"ruleId":"D2","level":"warning","message":{"text":"layer_norm._layer_norm_bwd_impl (cognitive 29): layer_norm._layer_norm_bwd_impl has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 16 (17 pts), if/else 9, boolean chains 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/layer_norm.py"},"region":{"startLine":702}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d0e6e42df7f6dac33771a5d6e3f75a47f573c633164b7b4fefc11868d6b7c89"}},{"ruleId":"D2","level":"warning","message":{"text":"seq_common.pooling (cognitive 29): seq_common.pooling has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 6 (15 pts), if/else 9 (14 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/models/modules/seq_common.py"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"30708be963bb70fe01343c663a66064dbedcd59317abde1bee2ddc436a85f39f"}},{"ruleId":"D2","level":"warning","message":{"text":"benchmark.pytorch_profiler (cognitive 28): benchmark.pytorch_profiler has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 3 (6 pts), ternaries 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/benchmark.py"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc94a1c1308baf80afd99ded40850ad12195df842836eec73ed51c243368c3bb"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardSm80.compute_one_m_block (cognitive 28): FlashAttentionBackwardSm80.compute_one_m_block has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (13 pts), ternaries 11, loops 3 (4 pts) (nesting depth added 2). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd.py"},"region":{"startLine":882}}}],"partialFingerprints":{"codehealthFindingId/v1":"1abba58c5fe389db13d7a0d4e5021da9d1696c2ec3eb63d759deca439c1f36d4"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaKb64Sm100.softmax_loop (cognitive 28): FlashAttentionMLAForward1CtaKb64Sm100.softmax_loop has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 3 (8 pts) (nesting depth added 18). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":1838}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccabc883902fceed78d5bbecc055f0c938b6def9a7892f3c66b8d5b951c14ba5"}},{"ruleId":"D2","level":"warning","message":{"text":"FusedMLPFunc.forward (cognitive 28): FusedMLPFunc.forward has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (13 pts), ternaries 7 (11 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/fused_dense.py"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7b1b353c0d6fe458075630c1ee983484a21bcef7cb81a99f54ac48a0a46146e"}},{"ruleId":"D2","level":"warning","message":{"text":"benchmark.pytorch_profiler (cognitive 28): benchmark.pytorch_profiler has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 3 (6 pts), ternaries 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/utils/benchmark.py"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dac2cae0a4b0d501bb83111b235ce1a071f702fd94f325ab0a92d8761ae9755"}},{"ruleId":"D2","level":"warning","message":{"text":"NormMonitor.on_before_optimizer_step (cognitive 28): NormMonitor.on_before_optimizer_step has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 4 (9 pts), ternaries 1 (5 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/callbacks/norm_monitor.py"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2615a0f62700519193dca19f71eceb62c420cec1471e9b99817d0eb86041a8e"}},{"ruleId":"D2","level":"warning","message":{"text":"blackwell_helpers.gemm_ptx_partial (cognitive 27): blackwell_helpers.gemm_ptx_partial has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 11 (16 pts), if/else 10 (11 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/blackwell_helpers.py"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f1ba731216ed0fcae06ee77ea45e3f5360c8744a1ffeb171175e11eb643025a"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardSm80.load_Q_LSE (cognitive 26): FlashAttentionBackwardSm80.load_Q_LSE has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 3 (11 pts), loops 4 (9 pts), if/else 2 (4 pts), boolean chains 2 (nesting depth added 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages. This shape REPEATS in the file: one other method here (FlashAttentionBackwardSm80.load_dO_dPsum) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd.py"},"region":{"startLine":1261}}}],"partialFingerprints":{"codehealthFindingId/v1":"951262ee33a52b5cd8d31217088edb8ac457487cb4ab3c2ba3d04f688dd5769f"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardSm80.load_dO_dPsum (cognitive 26): FlashAttentionBackwardSm80.load_dO_dPsum has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 3 (11 pts), loops 4 (9 pts), if/else 2 (4 pts), boolean chains 2 (nesting depth added 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages. This shape REPEATS in the file: one other method here (FlashAttentionBackwardSm80.load_Q_LSE) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd.py"},"region":{"startLine":1305}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5a33b156d7df6413fb47bbe97f7aef43292f7509a38cbf9de10d54da78c2c55"}},{"ruleId":"D2","level":"warning","message":{"text":"testing.generate_qkv (cognitive 26): testing.generate_qkv has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (16 pts), ternaries 4 (8 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/testing.py"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b23c7b3b2f8885f238d09aae3878aa4ce01f9d56b80e713bd86f48647dd1748"}},{"ruleId":"D2","level":"warning","message":{"text":"FusedDenseFunc.backward (cognitive 26): FusedDenseFunc.backward has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (18 pts), ternaries 2 (5 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/fused_dense.py"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6de5fb03cdcf86a5638a2a6fe9ae2e75839eaafe23dd0b5234fd79da0b51351"}},{"ruleId":"D2","level":"warning","message":{"text":"LayerNormFn.forward (cognitive 26): LayerNormFn.forward has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 10 (16 pts), if/else 9 (10 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/layer_norm.py"},"region":{"startLine":849}}}],"partialFingerprints":{"codehealthFindingId/v1":"06e2624005da0e25412f04c1f047d16ec26ae2972b0dbffdba8d0f40038b1485"}},{"ruleId":"D2","level":"warning","message":{"text":"testing.generate_qkv (cognitive 26): testing.generate_qkv has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (16 pts), ternaries 4 (8 pts), boolean chains 2 (nesting depth added 7). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/utils/testing.py"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba8d32599cfbde4d370ec178a1cd156366a688dd4a293ac265b1bfcb091ed048"}},{"ruleId":"D2","level":"warning","message":{"text":"block_sparse_utils.handle_block_sparse_empty_tile_correction_sm100 (cognitive 25): block_sparse_utils.handle_block_sparse_empty_tile_correction_sm100 has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 6, ternaries 2 (4 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparse_utils.py"},"region":{"startLine":833}}}],"partialFingerprints":{"codehealthFindingId/v1":"54ae1cd3d710e7f8cb039df5e28798c7c812cd0f9f5fb4bbf6ef2e60db78282b"}},{"ruleId":"D2","level":"warning","message":{"text":"block_sparsity.infer_block_sparse_expected_shapes (cognitive 25): block_sparsity.infer_block_sparse_expected_shapes has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 5, loops 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparsity.py"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"b963ccff4da6bd3c5f5910ab6857306ebd79769cfbc6b9d35df33bdcc3abb8cb"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaKb64Sm100.softmax_step (cognitive 25): FlashAttentionMLAForward1CtaKb64Sm100.softmax_step has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 4 (11 pts), if/else 6 (7 pts), loops 4 (7 pts) (nesting depth added 11). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":1955}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ca63804f24047c97f1aca62d969c482f093c73073237da3239515fece4a3cfd"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForwardSm100.relay (cognitive 25): FlashAttentionMLAForwardSm100.relay has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 5 (10 pts) (nesting depth added 12). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":1344}}}],"partialFingerprints":{"codehealthFindingId/v1":"0820e03dc8ab530223fba793788a8c70ce34a18b84fd3b288a242c67117124b2"}},{"ruleId":"D2","level":"warning","message":{"text":"mma_sm100_desc.make_smem_desc_base (cognitive 25): mma_sm100_desc.make_smem_desc_base has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 10). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/mma_sm100_desc.py"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"4551d5bfb4d7a90b62e86ec1a8337c4a2206098fcdf4465bab596f4a2abf47c3"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashPrepareScheduler.kernel (cognitive 25): FlashPrepareScheduler.kernel has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/prepare_scheduler.py"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"93cbf739b0bf00001beed34f573a76d0473aec0c68201576d24208558c86661d"}},{"ruleId":"D2","level":"warning","message":{"text":"rotary._apply_rotary_emb_qkv (cognitive 25): rotary._apply_rotary_emb_qkv has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (20 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/layers/rotary.py"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"f84a7e61ca997bf198e4a52b916e86df0de63fb8f5f96f85d94507ed12185726"}},{"ruleId":"D2","level":"warning","message":{"text":"layer_norm._layer_norm_fwd_impl (cognitive 25): layer_norm._layer_norm_fwd_impl has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (17 pts), ternaries 6 (7 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/layer_norm.py"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bcb794321c562e066674175a1172735a2681ce9d4467611c5179def23db2275"}},{"ruleId":"D2","level":"warning","message":{"text":"setup.add_cuda_gencodes (cognitive 25): setup.add_cuda_gencodes has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"setup.py"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"2594fcf8b1b80466148f08cfe6cafd46419e8973656f84b396b38f978a6025dd"}},{"ruleId":"D2","level":"warning","message":{"text":"LMDataModule.process_dataset (cognitive 25): LMDataModule.process_dataset has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 3 (7 pts), ternaries 3 (nesting depth added 7). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/datamodules/language_modeling_hf.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd6571b09455f5ad6b611deea5b954302886b376848a4753226203c42267b8d2"}},{"ruleId":"D2","level":"warning","message":{"text":"eval.evaluate (cognitive 25): eval.evaluate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 2 (4 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/eval.py"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"1275862cdf85f421ef88be76e71388a5a7da5a1bf2173227c5b6c3af6dac35c1"}},{"ruleId":"D2","level":"warning","message":{"text":"ampere_helpers.gemm (cognitive 23): ampere_helpers.gemm has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/ampere_helpers.py"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5b8bd0cb06046ec4fc4e04524edbbf22d961cf99b0c38c5dac8558612e38195"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardSm100.fold_stats (cognitive 23): FlashAttentionBackwardSm100.fold_stats has cognitive complexity 23 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 3 (8 pts), ternaries 1 (4 pts) (nesting depth added 14). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":3803}}}],"partialFingerprints":{"codehealthFindingId/v1":"0049fc6d27cda0393c537eaa5562e38875dd44e66e29b2da408f1d3a60bf63e1"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionForwardBase.load_K (cognitive 23): FlashAttentionForwardBase.load_K has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 5 (8 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 12). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd.py"},"region":{"startLine":483}}}],"partialFingerprints":{"codehealthFindingId/v1":"87d20043bf5649b5106e12234dccd6521b8074ed313fbc0f090813e4492b0034"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionForwardSm100SwapAB.__call__ (cognitive 23): FlashAttentionForwardSm100SwapAB.__call__ has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 2, ternaries 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_decode_sm100.py"},"region":{"startLine":1670}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc74044363286d1fd96dd6bad1bb14c617533315b64e8f7ac82f970de0f1f382"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForwardSm100.__init__ (cognitive 23): FlashAttentionMLAForwardSm100.__init__ has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 8, ternaries 7 (8 pts), if/else 7 (nesting depth added 1). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8fada8636331265236b11607318dcc4ec92ac7ea6a0490c87916c9513993831"}},{"ruleId":"D2","level":"warning","message":{"text":"ParallelBlock.forward (cognitive 23): ParallelBlock.forward has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 5 (12 pts), if/else 8 (11 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/block.py"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"7eaac1c3a511e25f98aef701579121025ba8e14a7c97963721e458b5d2eba094"}},{"ruleId":"D2","level":"warning","message":{"text":"config.bwd_fold_candidates (cognitive 22): config.bwd_fold_candidates has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 10). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/config.py"},"region":{"startLine":2758}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a25c7991f6615ba8a25cb33eff8ada6c070ba895016e8a53fb2fbd4d5245c22"}},{"ruleId":"D2","level":"warning","message":{"text":"config.select_bwd_fold (cognitive 22): config.select_bwd_fold has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 7, loops 1, ternaries 1 (nesting depth added 4). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/config.py"},"region":{"startLine":2809}}}],"partialFingerprints":{"codehealthFindingId/v1":"265c60aacc4cf9313bece30b04570d58d32c5a6c1012398550911048516949b4"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForwardSm100.softmax_step (cognitive 22): FlashAttentionMLAForwardSm100.softmax_step has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 4, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 5). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":2841}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f56a0b056d76dff2af3e19b58770785d87b7ffcc74acb04c9123ea444e0825d"}},{"ruleId":"D2","level":"warning","message":{"text":"BertEncoder.forward (cognitive 22): BertEncoder.forward has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (8 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/bert.py"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc1c2f0470d8f8d51386276d3daf85f315ce336d01b0ed735dfbb7ebab14f189"}},{"ruleId":"D2","level":"warning","message":{"text":"Block.__init__ (cognitive 22): Block.__init__ has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (11 pts), loops 4 (10 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/block.py"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fd96bb2ac74cf6ac8dbd2057afaaa0a2782008e4a55387095c616840c5dd58b"}},{"ruleId":"D2","level":"warning","message":{"text":"BlockInfo.get_n_block_min_max (cognitive 21): BlockInfo.get_n_block_min_max has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 2 (5 pts), boolean chains 3 (nesting depth added 7). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_info.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"b573d2df6e74b313dc92bf09f0e49b23f427d6f0086af284c1cb3a20e3f828d8"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardSm90.kernel (cognitive 21): FlashAttentionBackwardSm90.kernel has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 1 (2 pts), ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm90.py"},"region":{"startLine":647}}}],"partialFingerprints":{"codehealthFindingId/v1":"05bfe17f3b55f01f491dcb59df41c89e4c1d5142d982e8e53480d01b69f27b68"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionForwardSm90.kernel (cognitive 21): FlashAttentionForwardSm90.kernel has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 6, loops 1 (2 pts) (nesting depth added 3). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm90.py"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f3ca624f9a0d3fcfe33d31f361f0bd03977d9d92a5e61da7f285169e89e46c5"}},{"ruleId":"D2","level":"warning","message":{"text":"mask.mask_r2p_lambda (cognitive 21): mask.mask_r2p_lambda has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 3 (10 pts), loops 3 (7 pts), if/else 2 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/mask.py"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"063025665346988b179787019a3b528402442b0aff8d6566c710d856b2483dce"}},{"ruleId":"D2","level":"warning","message":{"text":"ParallelBlock.__init__ (cognitive 21): ParallelBlock.__init__ has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 4 (10 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/block.py"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6f77095a48ed35523465e355098de63fc0cb7242ea30be0001b0352fc4c061a"}},{"ruleId":"D2","level":"warning","message":{"text":"FusedMLP.forward (cognitive 21): FusedMLP.forward has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 4 (10 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/fused_dense.py"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea61c866adfebb4d7389e9c89ba849d49f1820222e3428c18fe3d0def733bcca"}},{"ruleId":"D2","level":"warning","message":{"text":"config.validate_sm90_bwd_mma (cognitive 20): config.validate_sm90_bwd_mma has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, ternaries 2, loops 1 (nesting depth added 3). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/config.py"},"region":{"startLine":3213}}}],"partialFingerprints":{"codehealthFindingId/v1":"61282a6860427de2225fc57819f87dee263f86457e19fdecd12a4eecce12652d"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionForwardCombine.__call__ (cognitive 20): FlashAttentionForwardCombine.__call__ has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10, ternaries 7, boolean chains 3. This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_combine.py"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ded7a6621fdf72157013eba60a10c8f734f727e5122e88f31a92a2cf4fa23ce"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaKb64Sm100.load_cpasync_paged (cognitive 20): FlashAttentionMLAForward1CtaKb64Sm100.load_cpasync_paged has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (8 pts) (nesting depth added 12). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":1463}}}],"partialFingerprints":{"codehealthFindingId/v1":"afedaf9a0182cf4601b231919be6c6e3bfa8c501fa351930970451c56cbf5707"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionForwardSm100.load_KV (cognitive 20): FlashAttentionForwardSm100.load_KV has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 5 (7 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":3736}}}],"partialFingerprints":{"codehealthFindingId/v1":"eaaec51c9f53f9ba5de2ea190ce53a2db7a032695ef6325678fc96fce1703bb7"}},{"ruleId":"D2","level":"warning","message":{"text":"SeqlenInfoQK.offset_batch_Q (cognitive 20): SeqlenInfoQK.offset_batch_Q has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 3 (9 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/seqlen_info.py"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff758217f27c5504c9a1ba904272da9d53636ba4c93da44c85997b1d0c62566f"}},{"ruleId":"D2","level":"warning","message":{"text":"SeqlenInfoQKNewK.create (cognitive 20): SeqlenInfoQKNewK.create has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10, ternaries 7 (10 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/seqlen_info.py"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ad05b559e3cda88678159c5b8c18429e6df32ed7f7daa153c604e953d4a8218"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashBlocksparseAttention.forward (cognitive 20): FlashBlocksparseAttention.forward has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 6 (8 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_blocksparse_attention.py"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5cea0ad99291456f941c1cc0fe556aad44523067e137b4ba400c1024219b698"}},{"ruleId":"D2","level":"warning","message":{"text":"autotune._normalize_kwargs (cognitive 19): autotune._normalize_kwargs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15 (17 pts), loops 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/autotune.py"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6dc53af766d53a6e0d882ef3fe982015b8cc7d9e9348f6731618bbe29961385"}},{"ruleId":"D2","level":"warning","message":{"text":"config.validate_bwd_registers (cognitive 19): config.validate_bwd_registers has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 5). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/config.py"},"region":{"startLine":3132}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a2db79584fcb477ddbaa8c028498ff05455455b266bf369271a78ac1c366955"}},{"ruleId":"D2","level":"warning","message":{"text":"dKGemmKernel.epilogue_scatter_reduce (cognitive 19): dKGemmKernel.epilogue_scatter_reduce has cognitive complexity 19 (threshold 15). Drivers by points: loops 4 (12 pts), if/else 3 (7 pts) (nesting depth added 12). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dk_sm100.py"},"region":{"startLine":1005}}}],"partialFingerprints":{"codehealthFindingId/v1":"834fc0c438c15895555204ca3a048df906105f99de5a31a29517713909509458"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardPostprocess.__call__ (cognitive 19): FlashAttentionBackwardPostprocess.__call__ has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (19 pts) (nesting depth added 6). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_postprocess.py"},"region":{"startLine":380}}}],"partialFingerprints":{"codehealthFindingId/v1":"71e6af697bcc8f996411f91ded9ddd0d96100a91782a4964686ee5707bff7833"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardSm100._setup_attributes (cognitive 19): FlashAttentionBackwardSm100._setup_attributes has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (13 pts), if/else 4 (5 pts), boolean chains 1 (nesting depth added 7). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":572}}}],"partialFingerprints":{"codehealthFindingId/v1":"0635c05cf3d7ddae6b7a5e23e562cbd9422a4aaaa95d8e2da1dcebb0bc20fb74"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaKb64Sm100.__init__ (cognitive 19): FlashAttentionMLAForward1CtaKb64Sm100.__init__ has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7, boolean chains 6, ternaries 4 (5 pts), loops 1 (nesting depth added 1). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e1c70839b544f2ef23c190a3fe649b5a4d580b7a514a13f56d444766fcd86ea"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaKb64Sm100.load_cpasync (cognitive 19): FlashAttentionMLAForward1CtaKb64Sm100.load_cpasync has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 3 (8 pts), loops 3 (6 pts), if/else 3 (5 pts) (nesting depth added 10). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":1267}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7536986de451a44efb6609875d429fc695ee4ccd824e746bac4029ca82047e8"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionMLAForward1CtaSm100.store_lse (cognitive 19): FlashAttentionMLAForward1CtaSm100.store_lse has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 3 (6 pts), boolean chains 1 (nesting depth added 8). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":3426}}}],"partialFingerprints":{"codehealthFindingId/v1":"d18599b32c6dfd064bd62e4e2c2c8006b9a53786106b9037d2ee9e9b25569d62"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionForwardSm100.correction_epilogue (cognitive 19): FlashAttentionForwardSm100.correction_epilogue has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (7 pts), ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":3408}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8e03440e214adbe5bc01dae7d5b46ef84700bf79c498d0cda30de57df8c9f65"}},{"ruleId":"D2","level":"warning","message":{"text":"interface._validate_block_scales (cognitive 19): interface._validate_block_scales has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 7, loops 1 (nesting depth added 2). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/interface.py"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a9227bc07467f9cdffa2ca92417e82c354f6a208203c611f138973956b74843"}},{"ruleId":"D2","level":"warning","message":{"text":"config.select_sm90_tile (cognitive 18): config.select_sm90_tile has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (6 pts), boolean chains 3 (nesting depth added 6). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/config.py"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bb4361bfa283d2c42a07d1c4f5727d98865e6ccde9100559b7f645a68336744"}},{"ruleId":"D2","level":"warning","message":{"text":"config.select_mla_fwd_config (cognitive 18): config.select_mla_fwd_config has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (7 pts), boolean chains 5, if/else 5, match/switch 1 (nesting depth added 2). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/config.py"},"region":{"startLine":2223}}}],"partialFingerprints":{"codehealthFindingId/v1":"e55b2f4e9f898c78157a8b9420d529fdb40b4e505a67ce324c866846612c3868"}},{"ruleId":"D2","level":"warning","message":{"text":"_SwapABCore.store_split_stats (cognitive 18): _SwapABCore.store_split_stats has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (18 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_decode_sm100.py"},"region":{"startLine":1574}}}],"partialFingerprints":{"codehealthFindingId/v1":"57506ec73a274af9d13920ee79275a55b43825385cd8bb28ac11f7a5d4d42187"}},{"ruleId":"D2","level":"warning","message":{"text":"blackwell_helpers.gemm_ptx (cognitive 17): blackwell_helpers.gemm_ptx has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 3 (4 pts), boolean chains 2, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/blackwell_helpers.py"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fa8d0035e39aba6681c0abdf5dc8b9938dff0ded2f577a806ddf16d107b4fa6"}},{"ruleId":"D2","level":"warning","message":{"text":"blackwell_helpers.gemm_ptx_precomputed (cognitive 17): blackwell_helpers.gemm_ptx_precomputed has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (9 pts), if/else 7 (8 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/blackwell_helpers.py"},"region":{"startLine":1071}}}],"partialFingerprints":{"codehealthFindingId/v1":"674ef0dc146c68e6b723e3f3dd6244198ea8e02aacf6cac936be5691b038f4a6"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardSm80.load_K (cognitive 17): FlashAttentionBackwardSm80.load_K has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (8 pts), ternaries 1 (5 pts), boolean chains 2, if/else 1 (2 pts) (nesting depth added 10). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages. This shape REPEATS in the file: one other method here (FlashAttentionBackwardSm80.load_V) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd.py"},"region":{"startLine":1204}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3237673d124f1f67f9b574c34e92292b85aad8c5268bfef9faeb566fa489b39"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionBackwardSm80.load_V (cognitive 17): FlashAttentionBackwardSm80.load_V has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (8 pts), ternaries 1 (5 pts), boolean chains 2, if/else 1 (2 pts) (nesting depth added 10). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages. This shape REPEATS in the file: one other method here (FlashAttentionBackwardSm80.load_K) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd.py"},"region":{"startLine":1233}}}],"partialFingerprints":{"codehealthFindingId/v1":"76e571aca325c668c418ae68ef3b89f2de09b5fabae721f3471727e9ee94dff2"}},{"ruleId":"D2","level":"warning","message":{"text":"FlashAttentionSparseMLABackwardSm100._get_shared_storage_cls (cognitive 17): FlashAttentionSparseMLABackwardSm100._get_shared_storage_cls has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 14, if/else 2, boolean chains 1. This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"feb22cccec8b9deaaf8ca6bfd1526c9a6527c3f5fdedccab15392abd988a47a3"}},{"ruleId":"D2","level":"warning","message":{"text":"flash_attn_interface._get_block_size_n (cognitive 17): flash_attn_interface._get_block_size_n has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 4 (5 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_interface.py"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"597df322e2a49d88ca01c6ca8e460d8e530607cb630ed9ea28ffb16cf5dd2a17"}},{"ruleId":"D2","level":"warning","message":{"text":"GPTModel.__init__ (cognitive 17): GPTModel.__init__ has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/gpt.py"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"728c303c86ec6a157b81f67d11a91d5f14176c59bb002de645ae6156d00672ca"}},{"ruleId":"D2","level":"warning","message":{"text":"DropoutAddLayerNormParallelResidualFn.forward (cognitive 17): DropoutAddLayerNormParallelResidualFn.forward has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 10 (14 pts), if/else 2, boolean chains 1 (nesting depth added 4). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/layer_norm.py"},"region":{"startLine":533}}}],"partialFingerprints":{"codehealthFindingId/v1":"97c4e2fd4a6e1bf0068b65afae8cf86b6700640b206412927398e8b7a8dda68e"}},{"ruleId":"D2","level":"warning","message":{"text":"CrossEntropyLoss.forward (cognitive 17): CrossEntropyLoss.forward has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 5, boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/cross_entropy.py"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab6f1bf6c90f623f47fc4470a335602cdc406759e6830725c52978f4faa41884"}},{"ruleId":"D2","level":"warning","message":{"text":"linear.kernel_fwd (cognitive 17): linear.kernel_fwd has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (16 pts), loops 1 (nesting depth added 3). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/linear.py"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a1103a3556ff8bf45ca2b67d713a8975449f5566bfc76f39709343e416d36e9"}},{"ruleId":"D2","level":"warning","message":{"text":"gpu_affinity.set_socket_unique_affinity (cognitive 17): gpu_affinity.set_socket_unique_affinity has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 4 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/utils/gpu_affinity.py"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"58d551b40401853558e8fb0a597d87e1a45bafb82663f6033d373b3ae1880acf"}},{"ruleId":"D2","level":"warning","message":{"text":"autotune._measure_configs (cognitive 16): autotune._measure_configs has cognitive complexity 16 (threshold 15). Drivers by points: loops 7 (14 pts), error handling 1 (2 pts) (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/autotune.py"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"babbf2f5109cfec3ecbd27731c9fc9c8b786318b1e5d22d3533c31cde9e93010"}},{"ruleId":"D2","level":"warning","message":{"text":"config.select_tuned_sm100_overrides (cognitive 16): config.select_tuned_sm100_overrides has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 14, if/else 1, match/switch 1. This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/config.py"},"region":{"startLine":1420}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa852ff4ae9d6250ad9031f08a45538c7369fb974f77b2c32b600f5b1e45734e"}},{"ruleId":"D2","level":"warning","message":{"text":"config.select_sm90_bwd_tile (cognitive 16): config.select_sm90_bwd_tile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 3 (6 pts), boolean chains 3 (nesting depth added 6). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/config.py"},"region":{"startLine":2958}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef80a0e961ffc78f0d169777907402ccf096ca3dc9259fd3fa0f155f77c83777"}},{"ruleId":"D2","level":"warning","message":{"text":"sm90_config_search.find_feasible_fwd_configs (cognitive 16): sm90_config_search.find_feasible_fwd_configs has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 2 (6 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/sm90_config_search.py"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5cc3addd5785d24b686028343be35d2fcf90c375eeec79146831ed6924c7292"}},{"ruleId":"D2","level":"warning","message":{"text":"Softmax.finalize (cognitive 16): Softmax.finalize has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 3 (6 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/softmax.py"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"509cc3427c1e527a4e9300ecd3b58283de8468cf9a38e2148c445b9b4dc5c22e"}},{"ruleId":"D2","level":"warning","message":{"text":"pretrained.state_dict_from_pretrained (cognitive 16): pretrained.state_dict_from_pretrained has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 1 (2 pts), ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/utils/pretrained.py"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"194306f5605717d840f2bb985798fae21ecfd6aa00d218d26bde734dc0a5664d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cute/flash_bwd_sm100.py: FileTooLong \u2014 4225 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3725 over it, 8.45\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"df518fac119578b5390ebcc353e6b41e6d9863ca3dd4acb4453b42bdc0a40830"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cute/interface.py: FileTooLong \u2014 3591 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3091 over it, 7.18\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/interface.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7873395fd3519943bd94fc553b81d299d60c70116e0cb4cf1ee503a3f30f79f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cute/flash_fwd_sm100.py: FileTooLong \u2014 2924 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2424 over it, 5.85\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb37d7063037c0ae2f7b02a35840f584d7da553ba7f21fc85a69272aec8fca57"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cute/flash_fwd_mla_sm100.py: FileTooLong \u2014 2549 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2049 over it, 5.10\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"613cd7563957d2332cbffab92c55867bf9c3ff0b2151fe7b6bce84012f9e39c0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cute/flash_bwd_mla_sm100.py: FileTooLong \u2014 2479 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1979 over it, 4.96\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"55ed6d6cf22de258d65dbb678e464a161e945b85aa52961df9f5c378ba9d2216"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cute/flash_fwd_mla_1cta_sm100.py: FileTooLong \u2014 2476 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1976 over it, 4.95\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"619b35f4b380d1ff63a0f61a1e8825c85ef176d529280ee6393faab41ce90514"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cute/config.py: FileTooLong \u2014 2245 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1745 over it, 4.49\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/config.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa41e5b22d1554eb67cd3102f9c9dc09224639b12dcd97af4785bc25ef399d50"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cute/flash_fwd_mla_1cta_kb64_sm100.py: FileTooLong \u2014 1738 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1238 over it, 3.48\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f2f1f55636fae22aaa044533415d5263a11c08d7e98be07cdbe5147126d0cd8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cute/flash_bwd_sm90.py: FileTooLong \u2014 1677 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1177 over it, 3.35\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm90.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7ba85ab6578ca395b813ba222c8c876e4703497cc33e34c772a6fe034c720c3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cute/block_sparse_utils.py: FileTooLong \u2014 1461 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 961 over it, 2.92\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparse_utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"aace3b2a75a89692350cce5611b124511a7c84a0aec6cf5606b6c8bfa8c11478"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cute/flash_fwd_decode_sm100.py: FileTooLong \u2014 1381 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 881 over it, 2.76\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_decode_sm100.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"589dbf5819eb67f97173be42bcf1fa8799214958e67c0f65dae54790ca112531"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cute/tile_scheduler.py: FileTooLong \u2014 1313 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 813 over it, 2.63\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/tile_scheduler.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbba521396ce493e0c24958c03187e57a59819a776347381bca329c0931c2263"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cute/flash_fwd_sm90.py: FileTooLong \u2014 1299 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 799 over it, 2.60\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm90.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f00c901ae6ec83dbdee16b7c81440c7037cc074760bfbf4d1c8e759a2ecdf6f2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: flash_attn/flash_attn_interface.py: FileTooLong \u2014 1138 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 638 over it, 2.28\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_interface.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e8b8bdcb70aaf72f12590dd8a881d6fd51c13153aa88fd0cc42ac46ccc603c9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: triton/layer_norm.py: FileTooLong \u2014 1113 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 613 over it, 2.23\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/layer_norm.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e1498143f2b64020bc7392cc7b8a8c2a34fcb5cbe7bcc948f30c4b7436aa9d9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cute/blackwell_helpers.py: FileTooLong \u2014 1062 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 562 over it, 2.12\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/blackwell_helpers.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c92f025d5aac670bbcb07cb66177e0564dbc311ed184adf80c135edb35ef9b7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cute/flash_bwd.py: FileTooLong \u2014 1050 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 550 over it, 2.10\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4bea0bf78b8e698f6e16706947da3220c05e732e5b8ddafc479223be4f57df9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cute/flash_fwd.py: FileTooLong \u2014 945 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 445 over it, 1.89\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab9fb849dddb54e950641f4a7be9b30e66c43c03841f75ed574f6ce19adccfd1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: flash_attn/flash_attn_triton.py: FileTooLong \u2014 889 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 389 over it, 1.78\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_triton.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d1c6391b7e8964b6487b17257910362d7dc382ed6e4d9ce94f11932b2ebd08d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cute/flash_bwd_mla_dq_dqv_sm100.py: FileTooLong \u2014 865 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 365 over it, 1.73\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"49a7cdeb19effc58d262561818ff2caba6ada1f212ef1e4f4ef33d1fbb884647"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cute/flash_bwd_mla_dq_dqv_sm100_h64.py: FileTooLong \u2014 861 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 361 over it, 1.72\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"450e46e9105de7a50a1241a7498c35a1a4f162f2f338f7c04a245567b3a7d5ad"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: models/gpt.py: FileTooLong \u2014 829 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 329 over it, 1.66\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/gpt.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"47fbb7c8c120598b424d979f3fe2028ae3aaa035ecb94a8a2994d7f4d92b57df"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: modules/mha.py: FileTooLong \u2014 739 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 239 over it, 1.48\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/mha.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c93cc30b5cf95de21059a191eb9752dbc35a10123ce5ce895c87e2a495fc014"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cute/mask.py: FileTooLong \u2014 721 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 221 over it, 1.44\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/mask.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"52a4809c685e3425aa3f49e518cca1218b597fc0c30c71075c00ba525a6573cf"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cute/flash_bwd_mla_dk_sm100.py: FileTooLong \u2014 712 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 212 over it, 1.42\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dk_sm100.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2225938094102c5e943713506361c4968c825db84531bdf79a8a182d908d4e19"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ops/layer_norm.py: FileTooLong \u2014 686 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 186 over it, 1.37\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/layer_norm.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2eeb21150e1496df17268d0c6f9e9c62a6752747f2f4885c9e88c05d0ee51c15"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cute/utils.py: FileTooLong \u2014 664 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 164 over it, 1.33\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1bee78ad77b1afbd4cfb90fbe78f0fdd186bc237805916369a0e7859e06ef7b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cute/flash_bwd_postprocess.py: FileTooLong \u2014 552 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 52 over it, 1.10\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_postprocess.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5620e67b17f8510a610cb6285bb23d565b286e1ae0fe37bca3123a724aff8b53"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: FlashAttentionMLAForward1CtaSm100: TooManyMethods \u2014 33 methods. The bar is 30 methods; this is 3 over it, 1.10\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d724ec4717f111c2a00b74e840fc93b5adb7ad0d4825d7d2c28fe007e1a1c7c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: utils/generation.py: FileTooLong \u2014 546 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 46 over it, 1.09\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/utils/generation.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a277578e9ef7a3dfad019fa76a1b616809ee223a3becf390247ba747e1c84156"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ops/fused_dense.py: FileTooLong \u2014 544 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 44 over it, 1.09\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/fused_dense.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdbe24722e5da8c44d5d4c59c52162064a736ab47146fae4a4358ac9d6fb8755"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cute/softmax.py: FileTooLong \u2014 539 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 39 over it, 1.08\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/softmax.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"19caab10a06cfc07b24e04fe0da5f2a9724bf71c120fd9ef3bb0deb3764d8c33"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: models/bert.py: FileTooLong \u2014 531 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 31 over it, 1.06\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/bert.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9c903d6d50e1285020364f877fda9fb886ae8b386031db0d7ec644fc3146279"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cute/block_sparsity.py: FileTooLong \u2014 518 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 18 over it, 1.04\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparsity.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff0a0006fc34abeda1118022cc1573a75da5ecbe5edbc3ca60921a3e2397b122"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cute/flash_fwd_combine.py: FileTooLong \u2014 518 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 18 over it, 1.04\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_combine.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fedefd5f8bbb1b9b8704337b568fd7b0d254a96330ef64104e1d1fe5d4f72197"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ./setup.py: FileTooLong \u2014 507 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 7 over it, 1.01\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"setup.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e107b707ebdae1a8ee117e9e5f380161e9efffca134b91f7f58d44890fb28b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 63 shared lines): flash_attn/cute/flash_bwd_mla_sm100.py:1057-1570 | flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:802-1074 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1136-1516 | flash_attn/cute/flash_fwd_mla_sm100.py:877-1308 \u2014 These 4 members are variants of one another: a block of 63 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1057}}}],"partialFingerprints":{"codehealthFindingId/v1":"90fb60853fb9845f95da8c9086526d3b961362bc6840139f629aa535ef583a65"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 24 shared lines): flash_attn/models/baichuan.py:18-112 | flash_attn/models/gpt.py:988-1080 | flash_attn/models/llama.py:118-216 | flash_attn/models/llama.py:222-326 \u2014 These 4 members are variants of one another: a block of 24 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/baichuan.py"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"32638021bb1d8d8430678d1a1d7128aaf314cfba6b9f9913330e5ad0fd4e8d79"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 16 shared lines): flash_attn/cute/testing.py:262-291 | flash_attn/cute/testing.py:303-323 | flash_attn/utils/testing.py:169-192 | flash_attn/utils/testing.py:204-225 \u2014 These 4 members are variants of one another: a block of 16 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/testing.py"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"46170324ee76f4a50666d9fc0d95cea9a4a535d9a9a901f9c4d21c23377a566c"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 13 shared lines): flash_attn/models/btlm.py:19-75 | flash_attn/models/gpt.py:932-984 | flash_attn/models/gpt_neox.py:14-98 | flash_attn/models/gptj.py:13-79 \u2014 These 4 members are variants of one another: a block of 13 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/btlm.py"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"5beefc230f8fee768db68f635cf6e7754e1c293a08b0f2f6c7afa54ec7fdee1e"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (3 members, 40 shared lines): flash_attn/models/baichuan.py:18-112 | flash_attn/models/llama.py:22-112 | flash_attn/models/llama.py:118-216 \u2014 These 3 members are variants of one another: a block of 40 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/baichuan.py"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"4179f2e94709b70162bcb040643605cc4b8992fbfb7aa73d7aea475ac0297f25"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (3 members, 30 shared lines): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:2098-2276 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:3142-3423 | flash_attn/cute/flash_fwd_mla_sm100.py:2985-3280 \u2014 These 3 members are variants of one another: a block of 30 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":2098}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8d2106a78cc79085d137f51479735943305dd08b229b5a2940aada128f7d1fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (223 shared lines): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:472-1190 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:513-1173 \u2014 These two members are variants of one another: 223 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":472}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb4ef0f67f9aa41691c04d0f296c3d5c84cf23198143410a82b5a219581b5ded"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (170 shared lines): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:142-441 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:144-479 \u2014 These two members are variants of one another: 170 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"84775e31de8c02200b2a07d140fdd594e30fda934646354b1cad963519e74952"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (80 shared lines): flash_attn/cute/blackwell_helpers.py:433-637 | flash_attn/cute/blackwell_helpers.py:1087-1247 \u2014 These two members are variants of one another: 80 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/blackwell_helpers.py"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d5871ac2186931806adbae0843bd305ade0f7a17894f988d67afc0dcb95b677"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (51 shared lines): flash_attn/cute/testing.py:352-470 | flash_attn/utils/testing.py:250-360 \u2014 These two members are variants of one another: 51 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/testing.py"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"3782b42bb69e603fe02b513a9861197c1757958f753ca7620f99225971e11188"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (46 shared lines): flash_attn/ops/triton/linear.py:168-255 | flash_attn/ops/triton/linear.py:460-526 \u2014 These two members are variants of one another: 46 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/linear.py"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d24d568957c4fcf1110df7575e71a00c93d59c14ae39977ee4e79e734cd54c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (31 shared lines): flash_attn/ops/triton/layer_norm.py:372-468 | flash_attn/ops/triton/layer_norm.py:724-843 \u2014 These two members are variants of one another: 31 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/layer_norm.py"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5aaddbff519b5eae7b890721c8546a230679fa4b135944f34970a310bc5cb9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (20 shared lines): flash_attn/cute/sm90_config_search.py:225-252 | flash_attn/cute/sm90_config_search.py:337-360 \u2014 These two members are variants of one another: 20 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/sm90_config_search.py"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"90d28c093a6cf2036cb147fcae087eeb8d471efca9d0a25ad2d96395dea88a5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (32 corresponding lines): flash_attn/flash_attn_interface.py:476-508 | flash_attn/flash_attn_interface.py:653-687 \u2014 These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_interface.py"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"799bbf4efd17a18561e5d54a4164b2509a571f37f6f226483f31441441a6c39c"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): flash_attn/flash_attn_interface.py:512-540 | flash_attn/flash_attn_interface.py:602-634 | flash_attn/flash_attn_interface.py:691-721 | flash_attn/flash_attn_interface.py:791-825 | flash_attn/flash_attn_interface.py:882-911 | flash_attn/flash_attn_interface.py:983-1016 \u2014 These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_interface.py"},"region":{"startLine":512}}}],"partialFingerprints":{"codehealthFindingId/v1":"62be5aaa786559c0ecc529e3b969f61a1c27ca0a53ba8dced122619c403c1aae"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): flash_attn/cute/block_sparse_utils.py:66-76 | flash_attn/cute/block_sparse_utils.py:1562-1582 | flash_attn/cute/block_sparse_utils.py:1690-1761 | flash_attn/cute/block_sparse_utils.py:1785-1867 | flash_attn/cute/block_sparse_utils.py:1914-1958 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparse_utils.py"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ae0e023112074046bf3186c79bdc05a9238cb000a426ede46fd8a2c890642a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): flash_attn/cute/flash_bwd_sm100.py:1570-2212 | flash_attn/cute/flash_bwd_sm90.py:697-876 | flash_attn/cute/flash_fwd_sm100.py:489-965 | flash_attn/cute/interface.py:3901-4026 | hopper/flash_attn_interface.py:96-150 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":1570}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0a246fd110521e51ed9378cd3325c5fc8d911c6c3d272140b1746935c528145"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): flash_attn/cute/benchmark.py:128-151 | flash_attn/cute/benchmark.py:165-199 | flash_attn/utils/benchmark.py:128-151 | flash_attn/utils/benchmark.py:165-199 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/benchmark.py"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"4468213c41db8fcba453af87d1b7634ca623350e563f0d6bd26f71163f6776f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): flash_attn/cute/benchmark_flash_attention_fp8.py:106-219 | hopper/benchmark_attn.py:92-143 | hopper/benchmark_attn.py:147-212 | hopper/benchmark_flash_attention_fp8.py:53-170 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/benchmark_flash_attention_fp8.py"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"d13ad128fe3da42675cfb01e28296d56d4b080a4977adee6277b89cb4a50d6f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): flash_attn/cute/blackwell_helpers.py:144-247 | flash_attn/cute/blackwell_helpers.py:260-411 | flash_attn/cute/blackwell_helpers.py:433-637 | flash_attn/cute/blackwell_helpers.py:908-1067 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/blackwell_helpers.py"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"db0a88c6c5b53f4281197cd5359a7bfe912948f7c6c287ac6a3539dae24c69b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): flash_attn/cute/flash_bwd_mla_sm100.py:309-499 | flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:298-380 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:457-556 | flash_attn/cute/flash_fwd_mla_sm100.py:294-386 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d62f46eff67a4a4c098620f902abdcb9f72ef598b737638baf157e3563ce802"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): flash_attn/cute/flash_bwd_mla_sm100.py:528-995 | flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:410-753 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:590-1088 | flash_attn/cute/flash_fwd_mla_sm100.py:418-827 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":528}}}],"partialFingerprints":{"codehealthFindingId/v1":"9286748c8e21d0a8cc77b765072402b5b160b7e9c4f71b194edbb4dcbc6260ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): flash_attn/cute/flash_bwd_sm100.py:849-1485 | flash_attn/cute/flash_bwd_sm90.py:388-644 | flash_attn/cute/flash_fwd_sm100.py:489-965 | flash_attn/cute/flash_fwd_sm90.py:188-431 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":849}}}],"partialFingerprints":{"codehealthFindingId/v1":"f85ff4c522422e0b842da7942699e5b44dec91d9669a8d7bc84df2a929cbcd80"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): flash_attn/cute/flash_bwd_sm100.py:2438-2994 | flash_attn/cute/flash_bwd_sm90.py:908-1117 | flash_attn/cute/flash_fwd_sm90.py:698-1000 | flash_attn/cute/tensormap_utils.py:15-29 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":2438}}}],"partialFingerprints":{"codehealthFindingId/v1":"08faf86335d4e74c7e72f5a87d481652227639a0e8f452be72a08a907d152edf"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): flash_attn/cute/flash_fwd_mla_1cta_sm100.py:590-1088 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:2189-2211 | flash_attn/cute/flash_fwd_sm100.py:3715-3733 | flash_attn/cute/paged_kv.py:203-213 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":590}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bfb68ac7bb809bd4e8fa8f1e827eaa9ec5aac1983d4fccf50e702bd39fd66bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): flash_attn/cute/flash_fwd_mla_1cta_sm100.py:3530-3541 | flash_attn/cute/flash_fwd_mla_sm100.py:3292-3304 | flash_attn/cute/flash_fwd_sm100.py:3364-3405 | flash_attn/cute/flash_fwd_sm100.py:3423-3516 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":3530}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff4a2e26ac5cc9dd39ec8ab8d7fccd6fc156311cf23d1018a7290540f2220fd4"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): flash_attn/cute/flash_fwd_mla_sm100.py:1820-1906 | flash_attn/cute/paged_kv.py:224-235 | flash_attn/cute/topk_gather_kv.py:228-279 | flash_attn/cute/topk_gather_kv.py:477-551 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":1820}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ec57fa88f41809e9be9f8fa76c9221b1d09bbca2f467a66b3be65d7419a4cc5"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): flash_attn/flash_attn_triton.py:814-891 | flash_attn/flash_attn_triton.py:898-1010 | flash_attn/flash_attn_triton_og.py:251-304 | flash_attn/flash_attn_triton_og.py:308-362 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_triton.py"},"region":{"startLine":814}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bf5a7ed55455710f2cd476f18d1cf8ac7b9c48b19c94875c0a861b08a60dfc9"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): flash_attn/modules/mha.py:503-540 | flash_attn/modules/mha.py:543-571 | flash_attn/modules/mha.py:843-880 | flash_attn/modules/mha.py:883-908 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/mha.py"},"region":{"startLine":503}}}],"partialFingerprints":{"codehealthFindingId/v1":"8683848fc11fee24c7835045d3ec91bf6c478df6c5f95fc9e79e09bcd2afaeec"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (111 corresponding lines): flash_attn/cute/testing.py:139-249 | flash_attn/utils/testing.py:38-156 \u2014 These two members are one piece of code written twice and then edited apart: 111 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/testing.py"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"46611c4d92e9da7cf148ea9ae35150d8e1dfdee3684735aa9f845655e714c5d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (98 corresponding lines): flash_attn/cute/softmax.py:543-649 | flash_attn/cute/softmax.py:670-767 \u2014 These two members are one piece of code written twice and then edited apart: 98 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/softmax.py"},"region":{"startLine":543}}}],"partialFingerprints":{"codehealthFindingId/v1":"27587f198ee1e41953a6f2bfbc46f3dc19df9b86946c2ffd6ddc2b335ab05f09"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (76 corresponding lines): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1284-1365 | flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1479-1554 \u2014 These two members are one piece of code written twice and then edited apart: 76 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":1284}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6d28f30f953d07a3b8ee0a420a2b3e2a599de10b2e68b82c26885eb0900fcf9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (91 corresponding lines): flash_attn/models/bigcode.py:11-109 | flash_attn/models/bigcode.py:113-203 \u2014 These two members are one piece of code written twice and then edited apart: 91 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/bigcode.py"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"442691aabc491aa162504a2e44c2b6a7f5286a1fd08d17df2b4cbeba445de111"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (36 corresponding lines): flash_attn/cute/pack_gqa.py:210-248 | flash_attn/cute/pack_gqa.py:296-331 \u2014 These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/pack_gqa.py"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"93887afb3afadb21cb242e4fbacb4e63236ac4010cc10c28a486207f31ab2a05"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): AI/racecheck_repro_1d_bulk.py:25-59 | AI/racecheck_repro_1d_tensor.py:25-64 \u2014 These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"AI/racecheck_repro_1d_bulk.py"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ab0447982834bf74648ccbfe51e9da1bf5043030b3415b8a92cc01510b582f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (40 corresponding lines): flash_attn/ops/triton/layer_norm.py:61-101 | flash_attn/ops/triton/layer_norm.py:121-160 \u2014 These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/layer_norm.py"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"b88368dccc651175ff9f2c9a0f92cd52c8a2e224615d6f6c10697c150d035a42"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (58 corresponding lines): flash_attn/cute/interface.py:3492-3549 | flash_attn/cute/interface.py:3675-3744 \u2014 These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/interface.py"},"region":{"startLine":3492}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdc99193ebbe36b8cc2ad965b69dc4511e72cd381704de1049fb6ed257e91e04"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (39 corresponding lines): flash_attn/flash_attn_interface.py:560-598 | flash_attn/flash_attn_interface.py:744-787 \u2014 These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_interface.py"},"region":{"startLine":560}}}],"partialFingerprints":{"codehealthFindingId/v1":"a061a2c5c53a239ac89809e57aa27539c1dd1c6fb8c83df60b9d85b829cc0061"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 44\u002B corresponding lines): flash_attn/ops/layer_norm.py:328-371 | flash_attn/ops/layer_norm.py:436-480 | flash_attn/ops/layer_norm.py:549-602 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 44 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/layer_norm.py"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ebd05e1a200f1824431a9b2985b3c3d4694b0b4bb8e10b6b0e784b598a6c809"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (61 corresponding lines): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:65-126 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:66-126 \u2014 These two members are one piece of code written twice and then edited apart: 61 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"c75b9b818101301f8646e8953fe6357d502b0fcf0d365cd183d79d501716c70a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (50 corresponding lines): flash_attn/cute/interface.py:3439-3488 | flash_attn/cute/interface.py:3592-3671 \u2014 These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/interface.py"},"region":{"startLine":3439}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc3ba5c2dca2de157dff072074f796364b179a1623c398361d32d37253fd5a06"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): flash_attn/cute/flash_bwd.py:1213-1229 | flash_attn/cute/flash_bwd.py:1242-1258 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd.py"},"region":{"startLine":1213}}}],"partialFingerprints":{"codehealthFindingId/v1":"26df6741c166297086abf6edeed29176cdb7327a7cbcf6fef83225b5b081080f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 26\u002B corresponding lines): flash_attn/cute/flash_bwd.py:1277-1302 | flash_attn/cute/flash_bwd.py:1321-1346 | flash_attn/cute/flash_fwd.py:543-576 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd.py"},"region":{"startLine":1277}}}],"partialFingerprints":{"codehealthFindingId/v1":"42eee2a0d02ff293407195a3d50107a820fa03c7ea88742a70fd3dff59cbc03a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (52 corresponding lines): flash_attn/modules/block.py:40-103 | flash_attn/modules/block.py:279-330 \u2014 These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/block.py"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"d80f357c3629d0ae697cfc4b2cfde8db4cd73a0c6b5365bb44686666a7dd59e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): flash_attn/flash_attn_interface.py:131-144 | flash_attn/flash_attn_interface.py:229-243 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_interface.py"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2289713e3cc81ad9856663c8e9f3bcbc6bfaa125a3dca3824b8a765b78da0ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (32 corresponding lines): flash_attn/cute/benchmark.py:83-114 | flash_attn/utils/benchmark.py:83-114 \u2014 These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/benchmark.py"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4b86c6bc034a0642173e1e7c11e27e930af74bbdb097c92247e41c5abebe828"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (56 corresponding lines): flash_attn/cute/topk_gather_kv.py:74-134 | flash_attn/cute/topk_gather_kv.py:354-409 \u2014 These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/topk_gather_kv.py"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"42476c65872a1cc203077e7c6831a6c8298351979e87a8d26ce8b46d306df187"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): flash_attn/cute/benchmark_flash_attention_fp8.py:51-69 | hopper/benchmark_flash_attention_fp8.py:174-199 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/benchmark_flash_attention_fp8.py"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"49c393fd9c2ae85790ce53888104e51d4ef9ca20977cdb2100357c263223c395"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): flash_attn/cute/benchmark.py:41-69 | flash_attn/utils/benchmark.py:41-69 \u2014 These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/benchmark.py"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b6dfc2fbe073ef7a9d4f9cac168699c4d50762f9b36aa8590d7b19193b64ee2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (38 corresponding lines): flash_attn/cute/flash_fwd_sm90.py:1374-1411 | flash_attn/cute/flash_fwd_sm90.py:1456-1496 \u2014 These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm90.py"},"region":{"startLine":1374}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc9236af0cd6952d6513031efe52f779e3560e7a0bd483d5ef14488a580c5d15"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (38 corresponding lines): flash_attn/ops/layer_norm.py:70-107 | flash_attn/ops/layer_norm.py:171-209 \u2014 These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/layer_norm.py"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7a4f487f0351b8f3708e594f1c1800b196a5c51ccc4dd7bf1a6004eede3b9d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 38\u002B corresponding lines): flash_attn/ops/layer_norm.py:376-413 | flash_attn/ops/layer_norm.py:485-528 | flash_attn/ops/layer_norm.py:606-654 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 38 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/layer_norm.py"},"region":{"startLine":376}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ca7b26e89d1905bf0fff16bb793fa1e509ac4a928dd4ef22bee2465f0f399c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): flash_attn/ops/fused_dense.py:581-610 | flash_attn/ops/fused_dense.py:665-688 \u2014 These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/fused_dense.py"},"region":{"startLine":581}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4b8c7039842da960715b592f62936372a5c0795eb4213cfd7ae0fa3cce2c944"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): flash_attn/cute/testing.py:97-124 | flash_attn/utils/testing.py:12-31 \u2014 These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/testing.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd01b436dcd7a0106746b4e48c49c2378c6793fb1860b413c4a40933cea73cd3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (30 corresponding lines): training/src/callbacks/wandb_callbacks.py:150-179 | training/src/callbacks/wandb_callbacks.py:208-242 \u2014 These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/callbacks/wandb_callbacks.py"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae4bd93a97034f0dc4c47cc5d90977d183a9a543ba49094f492087ec7de99ce6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 24\u002B corresponding lines): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1381-1412 | flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1430-1455 | flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1573-1596 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":1381}}}],"partialFingerprints":{"codehealthFindingId/v1":"58ca9a6818bbb36970527fb623f8bb6631f5f4ce1d3fd0e91b78c9856c2ca5c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): flash_attn/cute/tile_scheduler.py:739-763 | flash_attn/cute/tile_scheduler.py:913-932 \u2014 These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/tile_scheduler.py"},"region":{"startLine":739}}}],"partialFingerprints":{"codehealthFindingId/v1":"18588002c1eee1274acee4bfa924a7fb27b3d4317aac5a124ac160f986b0a80d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): flash_attn/flash_attn_interface.py:325-338 | flash_attn/flash_attn_interface.py:437-452 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_interface.py"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0689995b0cab8df14069ece630adc3062a6043d9ba2e94618bbf76ea84bebf5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): hopper/setup.py:769-792 | setup.py:729-752 \u2014 These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"setup.py"},"region":{"startLine":729}}}],"partialFingerprints":{"codehealthFindingId/v1":"da297728aa7938746566ed07af1be4ccb957a00091f022ab3537c195c77a33dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): flash_attn/cute/bench_utils.py:26-47 | hopper/benchmark_attn.py:63-73 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/bench_utils.py"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e9c701ec79bbc67d62d42d61fb8bbe3c67e3b512f387c8e3a781816966eeb3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): training/src/tasks/seq.py:104-115 | training/src/tasks/seq.py:180-192 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/tasks/seq.py"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"24c535329ce07565cf983413d11f5c5c3f3428e5b79ff8c047fa36339093bf4c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): flash_attn/cute/testing.py:67-86 | hopper/padding.py:9-37 \u2014 These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/testing.py"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"255812a2be1d50a8940c7e5b86da9d194c3465a18028e6ad392f6f7d0e280b18"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): flash_attn/cute/flash_bwd.py:110-149 | flash_attn/cute/flash_bwd_sm120.py:28-55 \u2014 These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd.py"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"47d135cb5ba72b5f45ade4161282e3eee6bffd70f077b0eb2e0b761168412761"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): flash_attn/cute/flash_bwd_sm90.py:1134-1160 | flash_attn/cute/flash_bwd_sm90.py:1177-1204 \u2014 These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm90.py"},"region":{"startLine":1134}}}],"partialFingerprints":{"codehealthFindingId/v1":"7af2291aa82a8261dc392db9eca519b39c66f893b805eac1c3fc251b8d438082"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): flash_attn/cute/topk_gather_kv.py:169-193 | flash_attn/cute/topk_gather_kv.py:446-464 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/topk_gather_kv.py"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"67920927fc875e0267b28706e089c61357f182633a9fe49a9851b4d17d8007fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): flash_attn/models/baichuan.py:121-151 | flash_attn/models/llama.py:394-422 \u2014 These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/baichuan.py"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"995e10374a9e31ea91a69744e36e92a635197172af38ec5bc7c7fb9aec85e147"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): flash_attn/cute/softmax.py:346-360 | flash_attn/cute/softmax.py:376-392 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/softmax.py"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e4ccd8e5542f5c000a03768f11b3d5c55af557e1beba925a5c52a9d1666a42d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): flash_attn/flash_attn_triton.py:1039-1059 | flash_attn/flash_attn_triton.py:1086-1108 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_triton.py"},"region":{"startLine":1039}}}],"partialFingerprints":{"codehealthFindingId/v1":"9be27e5addd83c4f009141441f7ee5f14e681afa5c4605af6d68d5ecaa45bed8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (33 corresponding lines): flash_attn/ops/fused_dense.py:546-578 | flash_attn/ops/fused_dense.py:629-662 \u2014 These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/fused_dense.py"},"region":{"startLine":546}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e85b9d1671b4d928137312bc187ddbfc7874d18fe68820a899821eb535c8ef2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): flash_attn/cute/pipeline.py:325-338 | flash_attn/cute/pipeline.py:361-388 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/pipeline.py"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"18046a4ca46f22ea747e39b346c6ab6fc35befebc52433399a2807f84c3f0ff4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 17\u002B corresponding lines): flash_attn/cute/flash_bwd_mla_sm100.py:1577-1594 | flash_attn/cute/flash_fwd_mla_sm100.py:1315-1332 | flash_attn/cute/flash_fwd_sm100.py:3661-3677 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1577}}}],"partialFingerprints":{"codehealthFindingId/v1":"929a8d1f45776d4c280938e6398cf1bc85c4b71c050c93e058e685d3e633c3ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): flash_attn/flash_blocksparse_attn_interface.py:90-108 | flash_attn/flash_blocksparse_attn_interface.py:141-159 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_blocksparse_attn_interface.py"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e2519ff0c7e6971bbfead702c9a16ce028ad7993aa6442573273036428b1727"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 25\u002B corresponding lines): flash_attn/ops/layer_norm.py:28-52 | flash_attn/ops/layer_norm.py:125-150 | flash_attn/ops/layer_norm.py:225-254 | flash_attn/ops/layer_norm.py:273-308 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/layer_norm.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"34bf34b6e5bd1bfc3c70ef57e66bf1af49f1e6b2a618a3f1df2c2ac1e461c8fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): flash_attn/modules/mlp.py:113-123 | flash_attn/modules/mlp.py:156-181 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/mlp.py"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0900c9523886c6cf41b4acf07da96041dbb614e720ec579f7a6c0737ed61deb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): flash_attn/cute/flash_bwd_mla_sm100.py:2590-2615 | flash_attn/cute/flash_bwd_mla_sm100.py:2633-2650 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":2590}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f5439fb36baeefa35cc0261e15b3e908ea1e4ee356c263acda2ab5f9c1acd27"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): flash_attn/ops/fused_dense.py:178-191 | flash_attn/ops/fused_dense.py:218-237 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/fused_dense.py"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"04132aace71f8be139e1bb2dd0146a1190151bd78c0df825c6f2a41a3bce92e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): flash_attn/cute/tile_scheduler.py:803-810 | flash_attn/cute/tile_scheduler.py:1493-1503 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/tile_scheduler.py"},"region":{"startLine":803}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d9adeca85eee95ed9044f6bb13e716c3bb3be1f4900073a929de8365e99596d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): flash_attn/cute/tile_scheduler.py:1433-1447 | flash_attn/cute/tile_scheduler.py:1451-1462 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/tile_scheduler.py"},"region":{"startLine":1433}}}],"partialFingerprints":{"codehealthFindingId/v1":"484da34ae2a0588fcfbc8b5c086a9be65ffdfe2d8ff7f98b81c15f666b31b73d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): flash_attn/cute/softmax.py:90-111 | flash_attn/cute/softmax.py:126-149 \u2014 These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/softmax.py"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dc836c700644a3d69ad580e05f9f730560745ae967827dfe51ceafad86f4076"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): training/src/utils/ddp_zero1.py:97-106 | training/src/utils/ddp_zero2.py:134-146 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/utils/ddp_zero1.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"cda26c549805dcdb752ee740970218a1743224a1ec0b9ca5140acb1a27f60c4f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): flash_attn/flash_attn_triton.py:1068-1082 | flash_attn/flash_attn_triton.py:1117-1131 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_triton.py"},"region":{"startLine":1068}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c2b82e937bfbda83ad59f15446e7aa17dec8aeb8a6b82f03a30ae282fac3628"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): flash_attn/layers/rotary.py:51-70 | flash_attn/layers/rotary.py:208-220 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/layers/rotary.py"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"02f44bf77bf289691c12668069284748c1f45dfb777fde2079ca6512a9a5da77"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): flash_attn/cute/copy_utils.py:221-239 | flash_attn/cute/copy_utils.py:252-263 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/copy_utils.py"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"46f1b64aff04e08ba54b6f8f0fd23bd41afae5035683c0c8f889b6140c69ab19"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 26\u002B corresponding lines): flash_attn/flash_attn_interface.py:274-301 | flash_attn/flash_attn_interface.py:374-408 | hopper/flash_attn_interface.py:284-309 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_interface.py"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"b14bebba4935c84cf30d79e97a7df0f1426408681b8f9e9d990cdffc600a9461"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): flash_attn/layers/rotary.py:74-90 | flash_attn/layers/rotary.py:224-233 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/layers/rotary.py"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0bdd51d2c9f15b6f06306c6f45264a7d8869837e51e76490b6185cea38cb70f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): flash_attn/modules/mlp.py:38-45 | flash_attn/modules/mlp.py:68-90 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/mlp.py"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"aebd5d704bdf4049a0556259f73accb4a192549629ce14e15f5f2c7d364e40d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): hopper/setup.py:706-713 | setup.py:674-681 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"setup.py"},"region":{"startLine":674}}}],"partialFingerprints":{"codehealthFindingId/v1":"76c8120c2f0730e038f7938aed8706899994f4ddeeb7383df9129d2f2b4f03af"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): hopper/setup.py:324-335 | setup.py:80-91 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"setup.py"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3258716bf2ab6105e61cdbaada6f9912b05a00cc5622f2fe2963fb3db65a62b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): flash_attn/bert_padding.py:11-19 | flash_attn/cute/testing.py:16-24 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/bert_padding.py"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b475f403631095295ad07d1db9d45b6dd627759e058a2ce198d9bfeb1bb5c84"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): flash_attn/utils/distributed.py:21-28 | flash_attn/utils/distributed.py:33-41 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/utils/distributed.py"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fc2b07d9c42da9fe78af35888fcc0dbb0039a0fcded562d789215176cfccc5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): flash_attn/flash_attn_interface.py:98-114 | flash_attn/flash_attn_interface.py:176-203 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_interface.py"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6acc5041adfe99d0b3c5b29c9e0fd6cc05b221360c9a19dd1387d7476e86b0f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): flash_attn/ops/layer_norm.py:776-784 | flash_attn/ops/rms_norm.py:151-159 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/layer_norm.py"},"region":{"startLine":776}}}],"partialFingerprints":{"codehealthFindingId/v1":"616853d368c4b181cfddc69f58c7c195cea9d10dd87e5234c6b3e190f1a4a771"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): flash_attn/modules/embedding.py:116-128 | flash_attn/modules/embedding.py:148-158 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/embedding.py"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"7719b8908f33f82ee556b5a4d2411e3f57e52e2e44326b943f3bbc52c3e67bb5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): training/src/models/modules/seq_common.py:76-82 | training/src/models/modules/seq_common.py:104-112 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/models/modules/seq_common.py"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d7e8eda371d5d19a136f742f25399fcc59b982e7dccd90fa84d4244720c0f2e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): flash_attn/ops/activations.py:26-34 | flash_attn/ops/activations.py:66-71 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/activations.py"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"2600db03ee32b552a98644d0039db4cf28058434fdd6748ad82359dd5b8e5473"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): flash_attn/modules/mha.py:73-81 | flash_attn/modules/mha.py:153-161 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/mha.py"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"c61fd983dadfc5f91f730766789634b59b7cb7271e5f24391a70592a4b91c90a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 5\u002B corresponding lines): flash_attn/cute/tile_scheduler.py:407-415 | flash_attn/cute/tile_scheduler.py:519-526 | flash_attn/cute/tile_scheduler.py:954-958 | flash_attn/cute/tile_scheduler.py:1744-1751 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/tile_scheduler.py"},"region":{"startLine":407}}}],"partialFingerprints":{"codehealthFindingId/v1":"337210934888845599dbde735d60109edfa21e89bb8637db6ef520b775453c6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): flash_attn/cute/tile_scheduler.py:778-785 | flash_attn/cute/tile_scheduler.py:1469-1475 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/tile_scheduler.py"},"region":{"startLine":778}}}],"partialFingerprints":{"codehealthFindingId/v1":"addd62c0794a9399145a52cc71aaad7de9fd89cae11e508e2cf162eeaffb30dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): flash_attn/cute/barrier.py:77-92 | flash_attn/cute/copy_utils.py:275-288 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/barrier.py"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7bafcc27470ec72c7d455964d6f0f7d03bc352b0c5dd6908518e1d0fa0cb0ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): flash_attn/models/bert.py:217-223 | flash_attn/models/bert.py:267-277 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/bert.py"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"763123f9206c13cc670766dca4c474ae94c772e5ede5c8ac554fd133b0ec2c2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): flash_attn/ops/layer_norm.py:791-800 | flash_attn/ops/rms_norm.py:165-174 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/layer_norm.py"},"region":{"startLine":791}}}],"partialFingerprints":{"codehealthFindingId/v1":"8be6029307fd3f74d68ea79802e1a9f95f5015628055de96f43e999017a6f1e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): flash_attn/cute/flash_bwd_postprocess.py:190-208 | flash_attn/cute/flash_bwd_preprocess.py:101-123 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_postprocess.py"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"39942d932918e8a1ae16cbfdfa7f15f283be0924bf64c59c30718cb2ea5f14d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): flash_attn/ops/layer_norm.py:709-728 | flash_attn/ops/rms_norm.py:68-87 \u2014 These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/layer_norm.py"},"region":{"startLine":709}}}],"partialFingerprints":{"codehealthFindingId/v1":"195356ca12826eaa7411bf7da6cf7d539c467115969bb4ddf4c1401215aa81c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): flash_attn/ops/layer_norm.py:745-762 | flash_attn/ops/rms_norm.py:104-121 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/layer_norm.py"},"region":{"startLine":745}}}],"partialFingerprints":{"codehealthFindingId/v1":"5316e11f6fddc930f32ca691fa77aad734b8226df766fdced4b18ecaaf7df59b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): flash_attn/ops/layer_norm.py:674-690 | flash_attn/ops/rms_norm.py:33-49 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/layer_norm.py"},"region":{"startLine":674}}}],"partialFingerprints":{"codehealthFindingId/v1":"905c4e18df37bf68678ac0b81fb89ec304981696c79a6bcd957488992f6949a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (76 lines \u00D7 2): flash_attn/cute/testing.py:174-249 | flash_attn/utils/testing.py:81-156 \u2014 \u0060flash_attn/cute/testing.py\u0060 and \u0060flash_attn/utils/testing.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 7 separate duplicated blocks between them, totalling at least 199 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/testing.py:174\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/testing.py"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"acf51c64536aa19e70ec87957a98041381603bf5b37f1980849d1b7aaa5c5112"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (47\u201353 lines \u00D7 2): flash_attn/cute/benchmark_flash_attention_fp8.py:166-212 | hopper/benchmark_flash_attention_fp8.py:110-162 \u2014 before extracting anything, compare \u0060flash_attn/cute/benchmark_flash_attention_fp8.py\u0060 and \u0060hopper/benchmark_flash_attention_fp8.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 146 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060hopper/benchmark_flash_attention_fp8.py:110\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/benchmark_flash_attention_fp8.py"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"11e25de8d81cf4d677195740c9df78cefa3f280a55b62517e50335d354b7fb4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (51 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:142-192 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:144-194 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py\u0060 as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 508 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9a1582391caea531e3893ee1e27128e61a81b49783ce42d3112bb400e549fba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (47 lines \u00D7 2): flash_attn/cute/block_sparse_utils.py:1502-1548 | flash_attn/cute/flash_bwd_sm100.py:2730-2776 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_sm100.py:2730\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparse_utils.py"},"region":{"startLine":1502}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8d9a5b9d6ac4031ec7772850df344006ee9361fcbcc32ba987bd50d642b436a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29\u201345 lines \u00D7 2): flash_attn/cute/flash_fwd.py:131-175 | flash_attn/cute/flash_fwd_sm120.py:33-61 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd.py:131\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd.py"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"45ada816cc9d6becfd5ec7c354f8c85a90b9d868721d1c12765549b983a46693"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201345 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1023-1036 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1404-1448 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1023\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":1023}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b855601b789b7e7791f1ea5cea65f5ca7b0c58136707e6548d97181a95f356f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (43 lines \u00D7 2): flash_attn/cute/benchmark.py:213-255 | flash_attn/utils/benchmark.py:213-255 \u2014 \u0060flash_attn/cute/benchmark.py\u0060 and \u0060flash_attn/utils/benchmark.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 9 separate duplicated blocks between them, totalling at least 194 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/benchmark.py"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"d85bf5acdb7d4787fa92cbf5e39c1484534667398eb4ea3957968441b6e9ffe4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (40 lines \u00D7 2): flash_attn/cute/blackwell_helpers.py:564-603 | flash_attn/cute/blackwell_helpers.py:1173-1212 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/blackwell_helpers.py:564\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/blackwell_helpers.py"},"region":{"startLine":564}}}],"partialFingerprints":{"codehealthFindingId/v1":"168b973cc92acfcf714ea49dc4ed4d68d3367e2c2952b3d623e376c888506a0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (37\u201338 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_sm100.py:1510-1547 | flash_attn/cute/flash_fwd_mla_sm100.py:1245-1281 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_sm100.py:1510\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1510}}}],"partialFingerprints":{"codehealthFindingId/v1":"14d78c5a2aad2848b4d89d4e9390af7871049b1010986d6faed2cab3bb123df5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (38 lines \u00D7 2): flash_attn/modules/mha.py:503-540 | flash_attn/modules/mha.py:843-880 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/mha.py"},"region":{"startLine":503}}}],"partialFingerprints":{"codehealthFindingId/v1":"d25bf813f01673c5ec873c9e04108aebfbadc65f063fc09076c50f240075d0fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (36\u201337 lines \u00D7 4): flash_attn/cute/flash_bwd_mla_sm100.py:1306-1341 | flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:957-993 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1314-1349 | flash_attn/cute/flash_fwd_mla_sm100.py:1064-1099 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 4 call sites, so a change lands once. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060flash_attn/cute/flash_fwd_mla_sm100.py:1100\u0060 calls \u0060const_expr\u0060 and \u0060flash_attn/cute/flash_bwd_mla_sm100.py:1342\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1306}}}],"partialFingerprints":{"codehealthFindingId/v1":"fabd3134f6cf7c876c12ca58e4bea954a444334b356f015a7da3e27ce59e65c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201335 lines \u00D7 2): flash_attn/cute/block_sparse_utils.py:696-730 | flash_attn/cute/block_sparse_utils.py:1067-1092 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/cute/block_sparse_utils.py:1066\u0060 calls \u0060make_warp_uniform\u0060, \u0060warp_idx\u0060, \u0060sparse_tensor_m_block\u0060 and \u0060flash_attn/cute/block_sparse_utils.py:695\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparse_utils.py"},"region":{"startLine":696}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffae7a7e925e8eb503d017f659b8e4930637cc8d6ad58e2b8322030a46f5073d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201335 lines \u00D7 2): flash_attn/cute/interface.py:3451-3471 | flash_attn/cute/interface.py:3613-3647 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/interface.py:3451\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/interface.py"},"region":{"startLine":3451}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0b15d34c4479a913ed6235d8ba964dbd2740342a7d44fcf37a00ce44bcd8d19"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201334 lines \u00D7 2): flash_attn/cute/flash_bwd.py:110-143 | flash_attn/cute/flash_bwd_sm120.py:28-47 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd.py:110\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd.py"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e8af55025fae2cecf80fb9cc54ed510c26aa08292fb761a11aec940f0fcacb0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:568-601 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:588-621 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py\u0060 as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 508 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:568\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":568}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9b9dbce710e249321bacdbc6fb376671ca535d4659f4c6061a89056a98bdbd2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 2): flash_attn/cute/testing.py:139-172 | flash_attn/utils/testing.py:46-79 \u2014 \u0060flash_attn/cute/testing.py\u0060 and \u0060flash_attn/utils/testing.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 7 separate duplicated blocks between them, totalling at least 199 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/testing.py"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5dcdb3299a4a4df08f378e2c3a77f951c42a39f8471b32d3f0706373f452160"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32\u201333 lines \u00D7 2): flash_attn/cute/blackwell_helpers.py:494-526 | flash_attn/cute/blackwell_helpers.py:1112-1143 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/blackwell_helpers.py:494\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/blackwell_helpers.py"},"region":{"startLine":494}}}],"partialFingerprints":{"codehealthFindingId/v1":"e80cd870d2b200143c537a9a70b91a7c2dfad609b5f74c8a56a879cfdb37af57"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31\u201333 lines \u00D7 2): flash_attn/cute/softmax.py:543-575 | flash_attn/cute/softmax.py:670-700 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060flash_attn/cute/softmax.py:701\u0060 calls \u0060make_rmem_tensor\u0060 and \u0060flash_attn/cute/softmax.py:576\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/softmax.py"},"region":{"startLine":543}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe6b50312832497af0277b8270a076660487a35f433db3ea379423e882c8fd04"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32 lines \u00D7 2): flash_attn/cute/flash_fwd.py:718-749 | flash_attn/cute/flash_fwd_sm90.py:397-428 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd.py:718\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd.py"},"region":{"startLine":718}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c81a429cf13cbc15e5a9bbce846a1f44f80a74c5c1ac80e057d8da86acb7495"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28\u201331 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:638-665 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:962-992 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:638\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":638}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8b1bd3c2f5dd529c22a0c3d9082e8ad6d3c4296c7e9cbcab86e201fac1c6637"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27\u201331 lines \u00D7 2): flash_attn/cute/softmax.py:591-621 | flash_attn/cute/softmax.py:714-740 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060flash_attn/cute/softmax.py:741\u0060 calls \u0060load\u0060 and \u0060flash_attn/cute/softmax.py:622\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/softmax.py"},"region":{"startLine":591}}}],"partialFingerprints":{"codehealthFindingId/v1":"78715446639a16ebcb8e3b177232116a8302be781e3d9cdcd4ad991fb8c01baf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): flash_attn/ops/triton/layer_norm.py:61-91 | flash_attn/ops/triton/layer_norm.py:121-151 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/layer_norm.py"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"0efc7d8b97b1ca7298fd30527fa621edcdbbbceeed99d5c14afaa53e9c995ef0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:365-394 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:398-427 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py\u0060 as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 508 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:428\u0060 calls \u0060size_in_bytes\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:397\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"102dfd5ee9d467624ce3aae0bfbb9a33450986fb8677e0155f8c4d94bd557c94"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:934-963 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:953-982 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py\u0060 as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 508 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:964\u0060 calls \u0060setmaxregister_increase\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:984\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":934}}}],"partialFingerprints":{"codehealthFindingId/v1":"20f71d8fff2865cd6269888e365f0b3aefaddbf10ad182fdd9741131fcb10654"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_sm100.py:1400-1429 | flash_attn/cute/flash_bwd_sm100.py:2099-2128 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1400}}}],"partialFingerprints":{"codehealthFindingId/v1":"612825ae540b16369e236a0c0597357f3525fb5f3040799afc3be079d994f320"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): flash_attn/cute/flash_bwd_sm90.py:834-863 | hopper/flash_attn_interface.py:113-142 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_sm90.py:834\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm90.py"},"region":{"startLine":834}}}],"partialFingerprints":{"codehealthFindingId/v1":"54db98c76fa1b09345f39f39fafe1fb5a1ac2b1dab9b2f5647ad87da7cd3e5a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201330 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_sm100.py:765-794 | flash_attn/cute/flash_fwd_mla_sm100.py:538-563 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py\u0060 and \u0060flash_attn/cute/flash_fwd_mla_sm100.py\u0060 as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 565 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py:765\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":765}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce33c3616f9b6c28bbb41aaf6f489039f0c11e8e703a5b1313e7ed2b5cf71099"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u201330 lines \u00D7 3): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:2110-2111 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:3157-3185 | flash_attn/cute/flash_fwd_mla_sm100.py:2997-3026 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py:3157\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":2110}}}],"partialFingerprints":{"codehealthFindingId/v1":"da20996234e8dd26595ddc0fc8149caa31f8c47c690afdcd4b4dc66324c1ecf3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 3): flash_attn/cute/flash_bwd_mla_sm100.py:1399-1427 | flash_attn/cute/flash_bwd_sm100.py:2098-2126 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1368-1396 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1399}}}],"partialFingerprints":{"codehealthFindingId/v1":"93842524b3ea912d120c0294c97c52c220df405b8309215264deb0a06684b70a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 3): flash_attn/cute/flash_bwd_mla_sm100.py:1396-1424 | flash_attn/cute/flash_bwd_sm100.py:2024-2052 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1367-1395 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_sm100.py:1396\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/cute/flash_bwd_mla_sm100.py:1394\u0060 calls \u0060const_expr\u0060 and \u0060flash_attn/cute/flash_bwd_sm100.py:2022\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1396}}}],"partialFingerprints":{"codehealthFindingId/v1":"a74619a510bf0f718b1a94e78546bb32139f1abf249f3680b4fc9a91a081e21f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 3): flash_attn/cute/flash_bwd_mla_sm100.py:1401-1429 | flash_attn/cute/flash_bwd_sm100.py:2100-2128 | flash_attn/cute/flash_fwd_mla_sm100.py:1164-1192 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1401}}}],"partialFingerprints":{"codehealthFindingId/v1":"505c915959526ff89cbcbd50e194bd410036f1a13686709f5ba3ac929340f6ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): flash_attn/cute/benchmark.py:171-199 | flash_attn/utils/benchmark.py:171-199 \u2014 \u0060flash_attn/cute/benchmark.py\u0060 and \u0060flash_attn/utils/benchmark.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 9 separate duplicated blocks between them, totalling at least 194 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/benchmark.py:171\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/benchmark.py"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"aceb07d3813b62a72cf6fbafefb8b6eb1d0e88ec1429cf9cdce9a76a3c157a4d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:1202-1230 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:1185-1213 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py\u0060 as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 508 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":1202}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ebccfb3cf3bbf5350f806b483c6517bb09676758a25886be5be22f21dce201f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28\u201329 lines \u00D7 2): flash_attn/ops/triton/linear.py:168-196 | flash_attn/ops/triton/linear.py:460-487 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/linear.py"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ea2115f0ed588897c93afadb88d7e958eaa0ee51c0d00749f5cc2231b84b5a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 4): flash_attn/cute/flash_bwd_mla_sm100.py:1395-1422 | flash_attn/cute/flash_bwd_sm100.py:2023-2050 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1366-1393 | flash_attn/cute/flash_fwd_mla_sm100.py:1162-1189 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_sm100.py:1395\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/cute/flash_bwd_mla_sm100.py:1394\u0060 calls \u0060const_expr\u0060 and \u0060flash_attn/cute/flash_bwd_sm100.py:2022\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1395}}}],"partialFingerprints":{"codehealthFindingId/v1":"89fcb2429debbfa1091c16311687f34a6e00338740ba875f188711913824070f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): flash_attn/cute/benchmark.py:87-114 | flash_attn/utils/benchmark.py:87-114 \u2014 \u0060flash_attn/cute/benchmark.py\u0060 and \u0060flash_attn/utils/benchmark.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 9 separate duplicated blocks between them, totalling at least 194 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/benchmark.py"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2d2e8ebced66d5f5b71b3cb149b16a04b9e8c3044de1579355e4bb3b516c8e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27\u201328 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:696-722 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1033-1060 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:696\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":696}}}],"partialFingerprints":{"codehealthFindingId/v1":"48c97731cd170d8ae95d2b948bea2a04d07ff28c637fa38340134f07f2d3625b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23\u201328 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:2176-2198 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:3301-3328 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":2176}}}],"partialFingerprints":{"codehealthFindingId/v1":"00f6e1b8a21e078e69dc258f48cff772db444f624bbe9141d7cde0fd743f37b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27\u201328 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_sm100.py:3268-3295 | flash_attn/cute/flash_fwd_mla_sm100.py:3110-3136 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py\u0060 and \u0060flash_attn/cute/flash_fwd_mla_sm100.py\u0060 as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 565 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py:3268\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":3268}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e6e30e033a44d62c4644631f17ff5322afc481495ef62691a0fdc581eec17de"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): flash_attn/modules/block.py:76-103 | flash_attn/modules/block.py:303-330 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/block.py"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c76c1855385502095cff3f34820c8d5b2252712f00c3a03f534a4637fec51da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_sm100.py:1412-1438 | flash_attn/cute/flash_bwd_mla_sm100.py:1469-1495 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1412}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f84d579e72a841d16e8e0826c1f925075fe61d857585db8201666ebdce7c519"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 3): flash_attn/cute/flash_bwd_mla_sm100.py:1404-1429 | flash_attn/cute/flash_bwd_mla_sm100.py:1461-1486 | flash_attn/cute/flash_bwd_sm100.py:2103-2128 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1404}}}],"partialFingerprints":{"codehealthFindingId/v1":"f47199f79d04efa871ad027d40dbc514752ca054c0828e4d790113e598e67902"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 3): flash_attn/flash_attn_interface.py:483-508 | flash_attn/flash_attn_interface.py:662-687 | flash_attn/flash_attn_interface.py:853-878 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_interface.py"},"region":{"startLine":483}}}],"partialFingerprints":{"codehealthFindingId/v1":"597dac9bffbdd0b01b6987ff5479a7b4d9ac940993cd1ab34ee8fc6a6bdf1de4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:997-1022 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:1021-1046 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py\u0060 as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 508 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:997\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":997}}}],"partialFingerprints":{"codehealthFindingId/v1":"64a46f3fe303885e123b81758f36b4c0d285f5b37b538ea55612acad5f6c89b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24\u201326 lines \u00D7 2): flash_attn/cute/flash_bwd_sm100.py:2108-2133 | flash_attn/cute/flash_fwd_sm100.py:1452-1475 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_sm100.py:2108\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":2108}}}],"partialFingerprints":{"codehealthFindingId/v1":"87ed85bcbb107907ad199084d17b9a3d4eef9bef0d8f0d1178f31f58dfd90f14"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): flash_attn/cute/testing.py:391-416 | flash_attn/utils/testing.py:297-322 \u2014 \u0060flash_attn/cute/testing.py\u0060 and \u0060flash_attn/utils/testing.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 7 separate duplicated blocks between them, totalling at least 199 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/testing.py"},"region":{"startLine":391}}}],"partialFingerprints":{"codehealthFindingId/v1":"5903077825e41e76efe911f7b4e855b67a1049b9717f713a0c27a7edb358a407"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201326 lines \u00D7 2): flash_attn/models/baichuan.py:44-69 | flash_attn/models/llama.py:50-70 \u2014 before extracting anything, compare \u0060flash_attn/models/baichuan.py\u0060 and \u0060flash_attn/models/llama.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 139 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/models/baichuan.py:44\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/baichuan.py"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"96a82b7f50c76bb9922f2cf10f3c33187225254b26a3c96ad026a017d704609c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201325 lines \u00D7 5): flash_attn/cute/flash_bwd_mla_sm100.py:1408-1432 | flash_attn/cute/flash_bwd_mla_sm100.py:1465-1489 | flash_attn/cute/flash_bwd_mla_sm100.py:1511-1535 | flash_attn/cute/flash_fwd_mla_sm100.py:1246-1270 | flash_attn/cute/flash_fwd_sm100.py:1418-1438 \u2014 there are 5 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1408}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7f752b279b34ec6066f9c6842d630a72082a60be498302a8c1ad4c0b40180b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201325 lines \u00D7 4): flash_attn/cute/flash_bwd_mla_sm100.py:309-333 | flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:298-309 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:457-468 | flash_attn/cute/flash_fwd_mla_sm100.py:294-305 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_sm100.py:309\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"032801b4aec46166d6cb252e0fe3a547811ced4832baa83831cc11e5d62ec102"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): flash_attn/cute/benchmark.py:45-69 | flash_attn/utils/benchmark.py:45-69 \u2014 \u0060flash_attn/cute/benchmark.py\u0060 and \u0060flash_attn/utils/benchmark.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 9 separate duplicated blocks between them, totalling at least 194 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/benchmark.py"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"13e6186cbb0053bfa20e428c2a939fbd837fea3e24346e140d776f24047af40b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): flash_attn/cute/blackwell_helpers.py:364-388 | flash_attn/cute/blackwell_helpers.py:1017-1045 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/blackwell_helpers.py:364\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/blackwell_helpers.py"},"region":{"startLine":364}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8f7845ca3aba8a03272dfbcafb2d05df754c407a80562cbcc836bccef5cb415"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24\u201325 lines \u00D7 2): flash_attn/cute/block_sparse_utils.py:1224-1247 | flash_attn/cute/block_sparse_utils.py:1405-1429 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparse_utils.py"},"region":{"startLine":1224}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d7983a0a797e3c5d980c689abc11c4de92efb2a1da61841de1ccdcc3115c4e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23\u201325 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1141-1165 | flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1168-1190 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":1141}}}],"partialFingerprints":{"codehealthFindingId/v1":"acb5d86f9cbad0db05f6ab1efd64b3736101742248234aef8181e9d4e52188a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23\u201325 lines \u00D7 2): flash_attn/utils/generation.py:443-467 | flash_attn/utils/generation.py:513-535 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/utils/generation.py:443\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/utils/generation.py"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5fd3682037eb136b359f3bb6aed6be371a4ff27d425372317d5356a27b23c1a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 5): flash_attn/cute/flash_bwd_sm100.py:2159-2188 | flash_attn/cute/flash_bwd_sm90.py:834-863 | flash_attn/cute/flash_fwd_sm100.py:935-958 | flash_attn/cute/interface.py:3997-4026 | hopper/flash_attn_interface.py:113-142 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 5 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_sm100.py:2159\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":2159}}}],"partialFingerprints":{"codehealthFindingId/v1":"53a5a0c0f475d8893228b89df4d9dd433ad445beb1bb14bc2d6199b24467a2da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201324 lines \u00D7 4): flash_attn/models/baichuan.py:34-57 | flash_attn/models/llama.py:41-61 | flash_attn/models/llama.py:130-152 | flash_attn/models/llama.py:238-257 \u2014 before extracting anything, compare \u0060flash_attn/models/baichuan.py\u0060 and \u0060flash_attn/models/llama.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 139 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/baichuan.py"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"953ee835cdf5c6c843680b27606634037e9e941362069a4b0ab79a89c1a59af9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): flash_attn/cute/block_sparse_utils.py:1710-1733 | flash_attn/cute/block_sparse_utils.py:1736-1759 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparse_utils.py"},"region":{"startLine":1710}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1aa9671986d5059a787f5552965a68a65914438e98bbd1d93de0c29eda1facd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 4): flash_attn/cute/benchmark.py:128-150 | flash_attn/cute/benchmark.py:165-187 | flash_attn/utils/benchmark.py:128-150 | flash_attn/utils/benchmark.py:165-187 \u2014 \u0060flash_attn/cute/benchmark.py\u0060 and \u0060flash_attn/utils/benchmark.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 9 separate duplicated blocks between them, totalling at least 194 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/benchmark.py:128\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/benchmark.py"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"5254270bcebfb2df78749312b29209fcd2040e653c1bcdc414bae4a33b023df7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 4): flash_attn/cute/flash_bwd_mla_sm100.py:1405-1430 | flash_attn/cute/flash_bwd_mla_sm100.py:1462-1487 | flash_attn/cute/flash_bwd_sm100.py:2104-2129 | flash_attn/cute/flash_fwd_sm100.py:1415-1437 \u2014 there are 4 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1405}}}],"partialFingerprints":{"codehealthFindingId/v1":"054d313dc3be87a138dda4f36231669c49095f4284ae8dec45da826c0735ea74"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:252-274 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:268-290 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py\u0060 as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 508 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:252\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:247\u0060 calls \u0060size\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:263\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"97aa8a91b752b5b1c4afa3817c24215608c4ea84adcbb81ced38cc616d45e3eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201323 lines \u00D7 2): flash_attn/cute/testing.py:451-467 | flash_attn/utils/testing.py:337-359 \u2014 \u0060flash_attn/cute/testing.py\u0060 and \u0060flash_attn/utils/testing.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 7 separate duplicated blocks between them, totalling at least 199 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/testing.py"},"region":{"startLine":451}}}],"partialFingerprints":{"codehealthFindingId/v1":"6639eeb8f4a60892345d3535e57c8fe171aace6c1514c667df7d7600cbfbb47b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201323 lines \u00D7 2): flash_attn/ops/triton/linear.py:265-287 | flash_attn/ops/triton/linear.py:535-552 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060flash_attn/ops/triton/linear.py:289\u0060 calls \u0060contiguous\u0060 and \u0060flash_attn/ops/triton/linear.py:555\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/linear.py"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b31b84507d862af52a35b81e2399c68970cfba18854a373db0d1af8bf3aab0b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 6): flash_attn/cute/flash_bwd_mla_sm100.py:1407-1431 | flash_attn/cute/flash_bwd_mla_sm100.py:1464-1488 | flash_attn/cute/flash_bwd_mla_sm100.py:1510-1534 | flash_attn/cute/flash_bwd_sm100.py:2106-2130 | flash_attn/cute/flash_fwd_mla_sm100.py:1245-1269 | flash_attn/cute/flash_fwd_sm100.py:1417-1438 \u2014 there are 6 copies across 4 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1407}}}],"partialFingerprints":{"codehealthFindingId/v1":"76bb5e6659ea76b811ba199b2c2e31102243c7dd3cd84e3b39a1b4bf155dee1e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201322 lines \u00D7 4): flash_attn/cute/benchmark_flash_attention_fp8.py:193-213 | hopper/benchmark_attn.py:123-137 | hopper/benchmark_attn.py:188-206 | hopper/benchmark_flash_attention_fp8.py:143-164 \u2014 before extracting anything, compare \u0060flash_attn/cute/benchmark_flash_attention_fp8.py\u0060 and \u0060hopper/benchmark_flash_attention_fp8.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 146 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/benchmark_flash_attention_fp8.py"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"66ad71d5384c4b7c12f5f1bab09c7215be29f5b55effcb45f6d5d8c2bb025e2d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): flash_attn/cute/block_sparse_utils.py:341-362 | flash_attn/cute/block_sparse_utils.py:404-425 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/cute/block_sparse_utils.py:340\u0060 calls \u0060const_expr\u0060 and \u0060flash_attn/cute/block_sparse_utils.py:402\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparse_utils.py"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"f45e2211064e965f0a59f4290d0e4dbd4473e67c093282310230d706d5f6cefc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:327-348 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:369-390 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py\u0060 as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 508 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f4be408da218c80a24936bde328f204916674f618c12dff2d676011c21fec5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u201322 lines \u00D7 3): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1883-1888 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:2787-2808 | flash_attn/cute/flash_fwd_mla_sm100.py:2613-2633 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1883\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":1883}}}],"partialFingerprints":{"codehealthFindingId/v1":"89a7a86e9d59d911fab1c0ae2562b96ce0cb3694e4f457a26efc090c637376f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201322 lines \u00D7 2): flash_attn/cute/flash_fwd_sm100.py:2204-2225 | flash_attn/cute/flash_fwd_sm100.py:2281-2299 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":2204}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f6302d6ddb3b2b4ccb8deb967b40caad5531f41001a337f4c92b42469a46b64"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201321 lines \u00D7 4): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:994-1014 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:1026-1046 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:1019-1038 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:1050-1070 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py\u0060 as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 508 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:994\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":994}}}],"partialFingerprints":{"codehealthFindingId/v1":"55af57f37a1513b2684436e9991675b7361c5f013b6e9cfa6680d0dca56dc0ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201321 lines \u00D7 3): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:2136-2151 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:3221-3241 | flash_attn/cute/flash_fwd_mla_sm100.py:3058-3078 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py:3221\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":2136}}}],"partialFingerprints":{"codehealthFindingId/v1":"85833736775ae50799077a9b920dcccc551f7da6077d846a24048017ac9e0ce2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:748-768 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:778-798 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py\u0060 as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 508 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:769\u0060 calls \u0060setmaxregister_increase\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:799\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":748}}}],"partialFingerprints":{"codehealthFindingId/v1":"4173903c906c7aef1fba441909be06aa3901109e550e9acef925a3a22098185e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201321 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_sm100.py:2639-2658 | flash_attn/cute/flash_fwd_mla_sm100.py:3036-3056 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_sm100.py:2639\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":2639}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c237f3940238b780a2323e0ed39a305f82b5c9fc6a06c2cfc37df70b8bad6ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201321 lines \u00D7 2): flash_attn/cute/interface.py:3492-3512 | flash_attn/cute/interface.py:3676-3695 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/interface.py:3492\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/interface.py"},"region":{"startLine":3492}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f50e9e4e33c4e29d21187cb3e329c9e17b599407afdf4fadb0331bd57f68c68"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): flash_attn/cute/flash_bwd_sm100.py:2786-2805 | flash_attn/cute/flash_bwd_sm100.py:2849-2868 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_sm100.py:2786\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":2786}}}],"partialFingerprints":{"codehealthFindingId/v1":"04984ee38c6c1d9fe82f0ac6f3610df0a42c7464ef495431f17043ff84de7409"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): flash_attn/cute/flash_bwd_sm100.py:4165-4184 | flash_attn/cute/flash_bwd_sm90.py:1399-1418 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_sm100.py:4165\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":4165}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8bfba9e65f495f02a40a3ea39855ab826507a86a95440c7c21df99763809587"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201320 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:802-820 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1136-1155 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":802}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6e9204167f995708527511d927ad22de6c424b360e8c280111df6e60708b2ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1400-1419 | flash_attn/cute/flash_fwd_mla_sm100.py:1134-1153 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py\u0060 and \u0060flash_attn/cute/flash_fwd_mla_sm100.py\u0060 as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 565 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1400\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":1400}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5a54489f1608604b0462219ab3d8e834e4b34b2ade704215f5b4b345c6dac71"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201320 lines \u00D7 2): flash_attn/cute/flash_fwd_sm100.py:2533-2552 | flash_attn/cute/flash_fwd_sm90.py:1140-1155 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_sm100.py:2533\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":2533}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fa9c9852eea622269e35699703e830d9994776334999b84a0bdc8031e628bf1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): flash_attn/flash_blocksparse_attn_interface.py:112-131 | flash_attn/flash_blocksparse_attn_interface.py:163-182 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_blocksparse_attn_interface.py"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d0a7c538f047be17b52b99969b10149b848a3168472544c9efcd141eb8a8fca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): flash_attn/models/falcon.py:27-46 | flash_attn/models/gptj.py:24-43 \u2014 before extracting anything, compare \u0060flash_attn/models/falcon.py\u0060 and \u0060flash_attn/models/gptj.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060flash_attn/models/gptj.py:46\u0060 calls \u0060OrderedDict\u0060, \u0060key_mapping_ln\u0060, \u0060items\u0060 and \u0060flash_attn/models/falcon.py:47\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/falcon.py"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d91293a4ff5be106ad2c36704add0e982f2922e85a2d1f8841d3faa48080824"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201319 lines \u00D7 4): flash_attn/cute/block_sparse_utils.py:1435-1453 | flash_attn/cute/block_sparse_utils.py:1455-1473 | flash_attn/cute/flash_bwd_sm100.py:2665-2682 | flash_attn/cute/flash_bwd_sm100.py:2684-2701 \u2014 there are 4 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/block_sparse_utils.py:1435\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparse_utils.py"},"region":{"startLine":1435}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3e15fa653cd666fe845815f29ea8c8de43a4451784fbcaf903e9f9e3dae3bbb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): flash_attn/cute/flash_fwd.py:1223-1241 | flash_attn/cute/flash_fwd_sm90.py:1592-1610 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd.py"},"region":{"startLine":1223}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa905f84c4f14f545c66bab373d957dd0ba53a05a2af9766cc717c4b560c52be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201319 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1593-1611 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1978-1994 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":1593}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1ad5f4b8ec53a71c06e209be4ded03c80d5e269af461c456bf4e9409b95d890"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201319 lines \u00D7 2): flash_attn/flash_attn_interface.py:570-587 | flash_attn/flash_attn_interface.py:756-774 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/flash_attn_interface.py:570\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_interface.py"},"region":{"startLine":570}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d9fe144a0c7341da2015165e9365a4374691a191dfc44f6d7cd885df5491b00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): flash_attn/models/baichuan.py:122-140 | flash_attn/models/llama.py:394-412 \u2014 before extracting anything, compare \u0060flash_attn/models/baichuan.py\u0060 and \u0060flash_attn/models/llama.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 139 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/models/baichuan.py:122\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/baichuan.py"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdc84738388e099c6ca701e24168d7d2aaa104861277037fb7ccea80b5ce3cab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): hopper/setup.py:769-787 | setup.py:729-747 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"setup.py"},"region":{"startLine":729}}}],"partialFingerprints":{"codehealthFindingId/v1":"f290729f2110faf1410e487347e277ecd3a4e386386a7cc3de3622cb8838cce8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201318 lines \u00D7 3): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:2114-2125 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:3178-3195 | flash_attn/cute/flash_fwd_mla_sm100.py:3019-3034 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:2114\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":2114}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ee46e776a6aeba57d728e3351e5af38e337b8d79b2f631734f4c7f521cd1bde"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 3): flash_attn/flash_attn_interface.py:567-584 | flash_attn/flash_attn_interface.py:753-770 | flash_attn/flash_attn_interface.py:944-961 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/flash_attn_interface.py:567\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_interface.py"},"region":{"startLine":567}}}],"partialFingerprints":{"codehealthFindingId/v1":"f79d3442a0389b5fa9860351ed5ad027966d2defc267cecd011abb56df29179a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): flash_attn/cute/benchmark_flash_attention_fp8.py:116-133 | hopper/benchmark_flash_attention_fp8.py:63-79 \u2014 before extracting anything, compare \u0060flash_attn/cute/benchmark_flash_attention_fp8.py\u0060 and \u0060hopper/benchmark_flash_attention_fp8.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 146 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/benchmark_flash_attention_fp8.py:116\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060hopper/benchmark_flash_attention_fp8.py:61\u0060 calls \u0060empty\u0060 and \u0060flash_attn/cute/benchmark_flash_attention_fp8.py:114\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/benchmark_flash_attention_fp8.py"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2da4ca4f4135cf888cb9484375c47cac00cec750d2a829319275cc6074094f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dk_sm100.py:669-687 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:722-739 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_dk_sm100.py:669\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dk_sm100.py"},"region":{"startLine":669}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed8988cffe6876e2d4e35f81027d6aa11d3d6a5a631919afe9d3ad8804f04bc7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_sm100.py:159-176 | flash_attn/cute/flash_fwd_mla_sm100.py:196-213 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8b9d01560bf3713d038476fe772b2f714309792c2bf9cecf65cbadf70c94b89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_sm100.py:1367-1383 | flash_attn/cute/flash_fwd_mla_sm100.py:1129-1146 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_sm100.py:1367\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1367}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b19a7eb1a113947fca0f0636308a978be38c7deb0b90ba4dc992009b999d250"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): flash_attn/cute/paged_kv.py:98-115 | flash_attn/cute/topk_gather_kv.py:86-102 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/paged_kv.py:98\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/paged_kv.py"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"f319054fe8fab5beaf96c7945a566922774f4d580a99ef6d036fbdfe69742cfb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): flash_attn/flash_attn_triton.py:164-181 | flash_attn/flash_attn_triton.py:228-245 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_triton.py"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"60e8406be876985042dc52902cdc9cd35e4f7dce50ba41bf1a4d868d170f5667"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201317 lines \u00D7 5): flash_attn/cute/block_sparse_utils.py:66-75 | flash_attn/cute/block_sparse_utils.py:1562-1575 | flash_attn/cute/block_sparse_utils.py:1690-1706 | flash_attn/cute/block_sparse_utils.py:1785-1801 | flash_attn/cute/block_sparse_utils.py:1914-1927 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/cute/block_sparse_utils.py:1782\u0060 calls \u0060AuxData\u0060 and \u0060flash_attn/cute/block_sparse_utils.py:1560\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparse_utils.py"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9e91d986262bc55bdb1fbbe6e898faf0999e59845e8377e66c99e0b3074e1f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 4): flash_attn/models/baichuan.py:92-108 | flash_attn/models/bert.py:563-579 | flash_attn/models/falcon.py:71-86 | flash_attn/models/gpt.py:1026-1042 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 4 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/baichuan.py"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b82aa85d068496d7ae2412f4024f04a52c4713afb4d9ac6a38b645ecf62ad49"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 3): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:836-851 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1181-1197 | flash_attn/cute/flash_fwd_mla_sm100.py:925-941 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:836\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":836}}}],"partialFingerprints":{"codehealthFindingId/v1":"6511d0dd408e77b920b1941a458e9b0663ae6b411bd545f531e0b952195638fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): flash_attn/cute/benchmark.py:11-27 | flash_attn/utils/benchmark.py:11-27 \u2014 \u0060flash_attn/cute/benchmark.py\u0060 and \u0060flash_attn/utils/benchmark.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 9 separate duplicated blocks between them, totalling at least 194 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/benchmark.py"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"030025a9953008eef3849199e2d9fcd71ddf261323b43cbc170e1f19b1dc55bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:83-99 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:92-108 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py\u0060 as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 508 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e83b02d4998ec9705d529af37286919a01e5815975e2a4b46d6c8abaa32eb6d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_sm100.py:109-125 | flash_attn/cute/flash_fwd_mla_sm100.py:131-146 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"e81d3c4463152808a2899221a54453bf87e5cba8ae1f41fd2d5d96cd53bb0aa6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): flash_attn/cute/flash_bwd_sm90.py:1036-1052 | flash_attn/cute/flash_bwd_sm90.py:1449-1465 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm90.py"},"region":{"startLine":1036}}}],"partialFingerprints":{"codehealthFindingId/v1":"3597e9f5f177ea69ea7c931a4617a8e03b40c8532adf4fe83533c0215bd62d33"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): flash_attn/cute/flash_fwd_sm100.py:1306-1322 | flash_attn/cute/flash_fwd_sm90.py:583-600 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_sm100.py:1306\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":1306}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e027ce739f96756002b1642264096afbb3a3e847479d91df9f3c3dafe5e86d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): flash_attn/cute/flash_fwd_sm100.py:2599-2615 | flash_attn/cute/flash_fwd_sm100.py:3085-3101 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":2599}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a5dd8f2581a26606b5a3a59c6b700076f4a733aac9894f2a95dd367ff5702b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): flash_attn/flash_attn_interface.py:772-787 | flash_attn/flash_attn_interface.py:963-979 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/flash_attn_interface.py:772\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_interface.py"},"region":{"startLine":772}}}],"partialFingerprints":{"codehealthFindingId/v1":"38ef37b1a5d78342cec9e82bccff4e7bcf68e84fd0736135294ee4de6a6327b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201317 lines \u00D7 2): flash_attn/models/baichuan.py:82-98 | flash_attn/models/llama.py:163-173 \u2014 before extracting anything, compare \u0060flash_attn/models/baichuan.py\u0060 and \u0060flash_attn/models/llama.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 139 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/models/baichuan.py:82\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060flash_attn/models/llama.py:173\u0060 calls \u0060key_mapping_ln\u0060 and \u0060flash_attn/models/baichuan.py:98\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/baichuan.py"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0435d75bfec67244fcafceb79b503f988c915ea8d8f35a535f9218da97ad23b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201316 lines \u00D7 6): flash_attn/cute/block_sparse_utils.py:1437-1452 | flash_attn/cute/block_sparse_utils.py:1457-1472 | flash_attn/cute/block_sparse_utils.py:1513-1525 | flash_attn/cute/flash_bwd_sm100.py:2667-2681 | flash_attn/cute/flash_bwd_sm100.py:2686-2700 | flash_attn/cute/flash_bwd_sm100.py:2739-2753 \u2014 there are 6 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/block_sparse_utils.py:1437\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparse_utils.py"},"region":{"startLine":1437}}}],"partialFingerprints":{"codehealthFindingId/v1":"783f281f5d8f89a231ad05d66b650fc6bbef6b32aa56a8555690e5b7672c5c9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 4): flash_attn/flash_attn_triton.py:853-868 | flash_attn/flash_attn_triton.py:963-978 | flash_attn/flash_attn_triton_og.py:266-281 | flash_attn/flash_attn_triton_og.py:332-347 \u2014 there are 4 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_triton.py"},"region":{"startLine":853}}}],"partialFingerprints":{"codehealthFindingId/v1":"df12846f12e5ed9233964a62e2637f1920449f2b09065290c9b4c7f450ca893a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): flash_attn/cute/blackwell_helpers.py:159-174 | flash_attn/cute/blackwell_helpers.py:275-290 | flash_attn/cute/blackwell_helpers.py:452-467 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/blackwell_helpers.py:159\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/blackwell_helpers.py"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"78cf2f3c426ceb96273c3052245d27ac085a620a14ac698c9787cda21add89f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201316 lines \u00D7 3): flash_attn/cute/flash_bwd_mla_dk_sm100.py:765-780 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:750-763 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:780-793 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_dk_sm100.py:765\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:747\u0060 calls \u0060setmaxregister_decrease\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dk_sm100.py:759\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dk_sm100.py"},"region":{"startLine":765}}}],"partialFingerprints":{"codehealthFindingId/v1":"7be374a51e44a2aa6c1ee4290a19da7656a1a942ed3f4f06c6bc9a6b84d2af6b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): flash_attn/cute/block_sparse_utils.py:1832-1847 | flash_attn/cute/block_sparse_utils.py:1850-1865 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/cute/block_sparse_utils.py:1849\u0060 calls \u0060const_expr\u0060 and \u0060flash_attn/cute/block_sparse_utils.py:1830\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparse_utils.py"},"region":{"startLine":1832}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5d0b2e643e14061501e77de61d03649ac71410acda106e1e02a7c752080b724"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201316 lines \u00D7 2): flash_attn/cute/flash_bwd.py:238-251 | flash_attn/cute/flash_fwd.py:246-261 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd.py"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"34c120a3ad692e9bac9283272e6a76cd13a3d4cf9f4a76bb57feaacebaba9605"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:207-222 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:218-233 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py\u0060 as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 508 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0cfab7734f1d585b8b8db6c570578b56a4dd3d975756acdda7c43657a90d647"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201316 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:312-321 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:350-365 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py\u0060 as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 508 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:350\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7ec7252391d894c3c85ad7c84f5dfadb58e24f64de5d86dddaaadb7138265a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:525-539 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:552-567 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py\u0060 as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 508 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:525\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1a7cace2a32110ca0800828c12bfe784158ad7b89634849c935358b5607f7e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201316 lines \u00D7 2): flash_attn/cute/flash_bwd_sm100.py:3446-3459 | flash_attn/cute/flash_bwd_sm100.py:3505-3520 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/cute/flash_bwd_sm100.py:3444\u0060 calls \u0060wait\u0060 and \u0060flash_attn/cute/flash_bwd_sm100.py:3502\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":3446}}}],"partialFingerprints":{"codehealthFindingId/v1":"376edc21459d767293e84dd495f44cfd06b58bde01d1183a90bfdada0dbefb23"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1008-1022 | flash_attn/cute/flash_fwd_mla_sm100.py:749-764 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py\u0060 and \u0060flash_attn/cute/flash_fwd_mla_sm100.py\u0060 as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 565 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1008\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":1008}}}],"partialFingerprints":{"codehealthFindingId/v1":"3932156b220414cfcc759043e9b4c4a94daa8cba38aa9e3313c47dc7cf8aecf6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_sm100.py:3351-3366 | flash_attn/cute/flash_fwd_mla_sm100.py:3191-3206 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py\u0060 and \u0060flash_attn/cute/flash_fwd_mla_sm100.py\u0060 as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 565 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":3351}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c93b603e2b602733b83f78b29a28c13639aefb0ca1cb6923ad94ec409cbe2fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_sm100.py:1493-1508 | flash_attn/cute/flash_fwd_mla_sm100.py:1963-1978 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/cute/flash_fwd_mla_sm100.py:1492\u0060 calls \u0060const_expr\u0060 and \u0060flash_attn/cute/flash_fwd_mla_sm100.py:1962\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":1493}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a0a656655c6ef2d4f6152fea370e479510eb72f07b1ba157b6d46bc82f40320"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_sm100.py:2437-2452 | flash_attn/cute/flash_fwd_mla_sm100.py:2476-2491 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":2437}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdff964d31f3fac334d5d2c2c83e18716e033357477404a922be26d1777a01bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): flash_attn/cute/flash_fwd_sm100.py:2170-2185 | flash_attn/cute/flash_fwd_sm100.py:2248-2263 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":2170}}}],"partialFingerprints":{"codehealthFindingId/v1":"8abd299d17a1341945a2d26bf8567c6d1e712fd60a4174494fc712d9fd5ca74a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): flash_attn/cute/interface.py:1348-1363 | flash_attn/cute/interface.py:1487-1502 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/interface.py:1348\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/interface.py"},"region":{"startLine":1348}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c17625c5ea5df19d7bb82c61e6b6c199aff2227a3e8d419e86e6086595d0911"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): flash_attn/cute/interface.py:3439-3454 | flash_attn/cute/interface.py:3592-3607 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/interface.py:3439\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/interface.py"},"region":{"startLine":3439}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b92a7bc73cfe3b96f56ca22974b6c0cfe92899bb9665b05ed9b78dd4d670641"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201316 lines \u00D7 2): flash_attn/cute/mask.py:454-469 | flash_attn/cute/mask.py:535-548 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/mask.py"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7e95f1392ae5ddb335b192b520660a52c907f1c10247b9260e272714db9d2da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): flash_attn/cute/sm90_config_search.py:156-171 | flash_attn/cute/sm90_config_search.py:297-312 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/sm90_config_search.py:156\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/sm90_config_search.py"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"935aac1190727ff3156dc04bb44de0e3fcdde028195fd8139919100301f877a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): flash_attn/cute/testing.py:309-323 | flash_attn/utils/testing.py:210-225 \u2014 \u0060flash_attn/cute/testing.py\u0060 and \u0060flash_attn/utils/testing.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 7 separate duplicated blocks between them, totalling at least 199 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/testing.py"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9a4f0a64309093e7704081a0234276cad3da2062a0a0f63f4c17f0641260789"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 4): flash_attn/cute/blackwell_helpers.py:153-167 | flash_attn/cute/blackwell_helpers.py:269-283 | flash_attn/cute/blackwell_helpers.py:446-460 | flash_attn/cute/blackwell_helpers.py:915-929 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/blackwell_helpers.py"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"06914066ae769be79826f5ab27607e7c5e3682b8d7e368f3b66578f4f50100d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 4): flash_attn/cute/flash_bwd_sm100.py:2787-2801 | flash_attn/cute/flash_bwd_sm100.py:2817-2831 | flash_attn/cute/flash_bwd_sm100.py:2849-2863 | flash_attn/cute/flash_bwd_sm100.py:2874-2888 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":2787}}}],"partialFingerprints":{"codehealthFindingId/v1":"128d1de820c95e53650c5e48a6e8062bf9a00be38c6b5fa6b92b85aea45cf373"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 4): flash_attn/models/baichuan.py:60-74 | flash_attn/models/gpt.py:1012-1026 | flash_attn/models/llama.py:173-187 | flash_attn/models/llama.py:277-291 \u2014 there are 4 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/baichuan.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ea0d6a0646700e8eac5bfae0ad3feeaacd9deb3c87082aa25390c3f35734da1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): flash_attn/modules/mha.py:518-532 | flash_attn/modules/mha.py:858-872 | flash_attn/modules/mha.py:889-903 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/modules/mha.py:518\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/mha.py"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"dba08868e0b176acf424720f72bbc0ca5ce8e0ad78907f24588f1ab2ad08d36e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): flash_attn/bert_padding.py:99-115 | hopper/padding.py:9-25 \u2014 before extracting anything, compare \u0060flash_attn/bert_padding.py\u0060 and \u0060hopper/padding.py\u0060 as WHOLE FILES: 82% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/bert_padding.py"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"36dcf4935535c5de4ee5e60cb0605a7088e666e4e29c4c21eedf33fa57909fa0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dk_sm100.py:646-660 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:656-670 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dk_sm100.py"},"region":{"startLine":646}}}],"partialFingerprints":{"codehealthFindingId/v1":"910af98fc98d8332e73a8b93f0b2455019f7eff9239d117a65beea6ddd2a8b5a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:191-205 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:201-214 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py\u0060 as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 508 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:191\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9e0aa60ce4ca410d133e176f8e9b2648046192ec4b7138c9a36238484835c72"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:913-927 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:926-940 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py\u0060 as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 508 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:929\u0060 calls \u0060set\u0060, \u0060const_expr\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:941\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":913}}}],"partialFingerprints":{"codehealthFindingId/v1":"1935b961175e9b4788e53533103fe3de38d9a7271b98050b10d82093c5b02a47"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:1176-1190 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:1159-1173 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py\u0060 as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 508 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":1176}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d5854620a74cd53dd9d2e056f2e25b4f27ef7512451d290cb981c947a7a3f2d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:1259-1273 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:1242-1256 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py\u0060 as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 508 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":1259}}}],"partialFingerprints":{"codehealthFindingId/v1":"01c4fd4238d6e5167566c463e61f6eb3bb833d65b337da00dd45f24f70e22e29"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:1291-1305 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:1274-1288 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py\u0060 as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 508 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":1291}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6025dbc4eb7e013041a2b9ae58cba3b06335d443701306aeb41f3dab1c5db74"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_sm100.py:1428-1442 | flash_attn/cute/flash_fwd_sm100.py:1522-1536 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_sm100.py:1428\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1428}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bda9ae34f71582148908488d40b184fc59d705769648c4581ec37e675fb6b73"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201315 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_sm100.py:2952-2964 | flash_attn/cute/flash_bwd_mla_sm100.py:3032-3046 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_sm100.py:2952\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":2952}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d0886d9f55495db61bca9c368609803d3dfca2f59f19e2edc4af5ada8f654e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): flash_attn/cute/flash_bwd_sm90.py:1857-1871 | flash_attn/cute/flash_bwd_sm90.py:1876-1890 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/cute/flash_bwd_sm90.py:1875\u0060 calls \u0060arrive_inc\u0060 and \u0060flash_attn/cute/flash_bwd_sm90.py:1856\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm90.py"},"region":{"startLine":1857}}}],"partialFingerprints":{"codehealthFindingId/v1":"f119fd9c270b9baaacbf43239e60fe48210aa279e2c81a10997b200044c0dcb5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:690-703 | flash_attn/cute/flash_fwd_mla_sm100.py:760-774 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:690\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":690}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9a4b543e427667389d0042dc2c8bb9b034a74ce60b24ca2716ba75c40b01973"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_sm100.py:516-530 | flash_attn/cute/flash_fwd_mla_sm100.py:351-365 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py\u0060 and \u0060flash_attn/cute/flash_fwd_mla_sm100.py\u0060 as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 565 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":516}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e853e393c0801a5106d8b301b93957a14514ba076b1c654499068c567b1c0c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): flash_attn/cute/flash_fwd_sm90.py:876-890 | flash_attn/cute/flash_fwd_sm90.py:961-974 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm90.py"},"region":{"startLine":876}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a11e038a45ad08189ad3c8eddd73902cfb3d28ec6748c802cbedc837841f4cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201315 lines \u00D7 2): flash_attn/cute/softmax.py:576-590 | flash_attn/cute/softmax.py:702-711 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/softmax.py"},"region":{"startLine":576}}}],"partialFingerprints":{"codehealthFindingId/v1":"685175ef2bd701e544db9907e86cb49c1358d5271f750e53002d0a2ea834f9f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): flash_attn/flash_attn_interface.py:809-823 | flash_attn/flash_attn_interface.py:999-1013 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/flash_attn_interface.py:809\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_interface.py"},"region":{"startLine":809}}}],"partialFingerprints":{"codehealthFindingId/v1":"98f5596c752e2a764b8fc87dba925966db09129292cd0fdd8f9976a4be32a083"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): flash_attn/flash_attn_triton.py:424-438 | flash_attn/flash_attn_triton.py:616-630 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_triton.py"},"region":{"startLine":424}}}],"partialFingerprints":{"codehealthFindingId/v1":"1085e95f8d1d4ecad5b06cc7eff949e2ec6105fc4f96db3b8b252546eaab6f9c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): flash_attn/modules/mha.py:640-664 | flash_attn/modules/mha.py:932-956 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/mha.py"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"40ff069602339838d7fff5e84243acb7574af9d8c4e04fc5b1bcda8b452f81f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): training/src/utils/ddp_zero1.py:80-94 | training/src/utils/ddp_zero2.py:117-131 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/utils/ddp_zero1.py"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"51cb0009fa0959bf13ccaf735ab152501fe11b95eda9f2114ea7b2991c549ed4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 4): flash_attn/cute/testing.py:262-277 | flash_attn/cute/testing.py:303-318 | flash_attn/utils/testing.py:169-184 | flash_attn/utils/testing.py:204-219 \u2014 \u0060flash_attn/cute/testing.py\u0060 and \u0060flash_attn/utils/testing.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 7 separate duplicated blocks between them, totalling at least 199 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/testing.py"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ce8c860538e5bc305248d3e95a441c6d9a24ebe801c6d8256a531431f1d852d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201323 lines \u00D7 2): flash_attn/cute/benchmark_flash_attention_fp8.py:51-67 | hopper/benchmark_flash_attention_fp8.py:174-196 \u2014 before extracting anything, compare \u0060flash_attn/cute/benchmark_flash_attention_fp8.py\u0060 and \u0060hopper/benchmark_flash_attention_fp8.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 146 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/benchmark_flash_attention_fp8.py"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6d078b68c01f8bc861a006970a1d9173cce886171649467c08a8a73785f1efe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): flash_attn/cute/block_sparse_utils.py:1252-1265 | flash_attn/cute/block_sparse_utils.py:1316-1329 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/block_sparse_utils.py:1252\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparse_utils.py"},"region":{"startLine":1252}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c2707f6517b56d30934f87e196a233967713f6082c02a1eeaa498294be9e60d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_sm100.py:470-483 | flash_attn/cute/flash_fwd_mla_sm100.py:358-371 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":470}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9a18e9aa3ad7479c31bcd95bed4a3a62dd4d6f86a73ea2fed8ecd2d5d0fc648"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_sm100.py:901-914 | flash_attn/cute/flash_fwd_mla_sm100.py:733-746 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_sm100.py:901\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":901}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2207f240476aefc20c5512241aca8a9bb4376000535e6a0bbc2d689ec9cfa72"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_sm100.py:2064-2077 | flash_attn/cute/flash_fwd_mla_sm100.py:2095-2108 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":2064}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fdb9a1e99ce01de94ac3c5491fb4d2500620f6b2880c6ebaca8a4cebf95ff92"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): flash_attn/cute/flash_bwd_sm100.py:2324-2337 | flash_attn/cute/flash_bwd_sm100.py:2354-2366 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_sm100.py:2324\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/cute/flash_bwd_sm100.py:2322\u0060 calls \u0060local_tile\u0060 and \u0060flash_attn/cute/flash_bwd_sm100.py:2353\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":2324}}}],"partialFingerprints":{"codehealthFindingId/v1":"66f0845639cdc553cb769dc5f39c55150b17766b45f58fbb79cf4d1981f263cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): flash_attn/cute/flash_bwd_sm100.py:3461-3474 | flash_attn/cute/flash_bwd_sm100.py:3542-3555 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":3461}}}],"partialFingerprints":{"codehealthFindingId/v1":"6765db76644c144daf0a8918c68adfbfc17d3e2107720219d6cb4fba40568926"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1124-1137 | flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1483-1496 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1124\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":1124}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dbbc75e87a94c2070e09a3d49fd6c0d879b3c1123816822b8d6cc02975765f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): flash_attn/cute/flash_fwd_sm90.py:1471-1484 | flash_attn/cute/flash_fwd_sm90.py:1543-1556 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm90.py"},"region":{"startLine":1471}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab3fbf4019aef7be10c198d63c724634cab0df6d44465d739dac7edb9425b9a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): flash_attn/cute/prepare_scheduler.py:333-346 | flash_attn/cute/prepare_scheduler.py:377-390 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/prepare_scheduler.py"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb6fa5c9621fec66cd323219af1c0a65d4d2aad5add0a31e4e426f61aa44abe1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): flash_attn/models/btlm.py:29-42 | flash_attn/models/gpt.py:941-954 \u2014 before extracting anything, compare \u0060flash_attn/models/btlm.py\u0060 and \u0060flash_attn/models/gpt.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/models/btlm.py:29\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/btlm.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b50fd6ee77379bcadf2934c1c6a38e2a033f9c8bbe0a47216a9d28bb2e65179"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): flash_attn/ops/fused_dense.py:587-600 | flash_attn/ops/fused_dense.py:668-681 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/ops/fused_dense.py:587\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/ops/fused_dense.py:584\u0060 calls \u0060get_device_capability\u0060 and \u0060flash_attn/ops/fused_dense.py:667\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/fused_dense.py"},"region":{"startLine":587}}}],"partialFingerprints":{"codehealthFindingId/v1":"e04f03cd1e3d18eb04c9b5a1fb67653645a242ed0c776f07113c1411ca2bc6b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): flash_attn/ops/triton/layer_norm.py:444-457 | flash_attn/ops/triton/layer_norm.py:813-826 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/layer_norm.py"},"region":{"startLine":444}}}],"partialFingerprints":{"codehealthFindingId/v1":"34eda616d0c0b30d719fd0ff0c543dca87815d3c719c178a7fd04544f0746f12"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u201314 lines \u00D7 3): flash_attn/flash_attn_interface.py:1015-1016 | hopper/flash_attn_interface.py:625-638 | hopper/flash_attn_interface.py:730-743 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060hopper/flash_attn_interface.py:625\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_interface.py"},"region":{"startLine":1015}}}],"partialFingerprints":{"codehealthFindingId/v1":"78ce779d887e8461dbaa6189fbe0ea1265a114a025eff856e55d7bc86535e724"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201313 lines \u00D7 5): flash_attn/models/baichuan.py:29-41 | flash_attn/models/gpt.py:999-1008 | flash_attn/models/llama.py:36-47 | flash_attn/models/llama.py:127-136 | flash_attn/models/llama.py:236-244 \u2014 there are 5 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/models/baichuan.py:29\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/baichuan.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"4df05a9ba25e52aeafbac30adf06b9826439546ea01738105763179722d4ee2e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201313 lines \u00D7 4): flash_attn/cute/flash_bwd_mla_sm100.py:1117-1129 | flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:838-848 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1184-1194 | flash_attn/cute/flash_fwd_mla_sm100.py:928-938 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_sm100.py:1117\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1117}}}],"partialFingerprints":{"codehealthFindingId/v1":"d81010a57d3d6ced1145d0b6b5fa5f1582c611d47980dab4fbb7108368b8be24"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 3): flash_attn/cute/flash_bwd_mla_sm100.py:1292-1304 | flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:945-956 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1301-1313 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_sm100.py:1292\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1292}}}],"partialFingerprints":{"codehealthFindingId/v1":"b25e15e050c417c2259a8aaddfef35fd1e1f25ab584e2b0ca83b16a997a0b5da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201313 lines \u00D7 3): flash_attn/cute/flash_bwd_sm100.py:3265-3276 | flash_attn/cute/flash_bwd_sm100.py:3317-3326 | flash_attn/cute/flash_bwd_sm100.py:3355-3367 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":3265}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d66e46168a8e92748bf3f50e81cf916021e4e152bbf4a458b100f0999e1b3b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): flash_attn/models/falcon.py:59-71 | flash_attn/models/gpt_neox.py:52-64 | flash_attn/models/gptj.py:46-58 \u2014 before extracting anything, compare \u0060flash_attn/models/falcon.py\u0060 and \u0060flash_attn/models/gpt_neox.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/falcon.py"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"967c663467575e852301d07e1b9afc4c85b697a54e51f50045e5c9c1974f36c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201313 lines \u00D7 2): flash_attn/bert_padding.py:23-35 | flash_attn/cute/testing.py:28-38 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/bert_padding.py"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"668da8be30623fede9875baedcaaa77a4ab8170e553c59ddbad0819a4ab6a2f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): flash_attn/cute/blackwell_helpers.py:317-329 | flash_attn/cute/blackwell_helpers.py:485-496 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/blackwell_helpers.py:317\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/blackwell_helpers.py"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"2688e51a3371986ce2cc11e35980e5966af921690bad6f67e9fbc5264f248a08"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): flash_attn/cute/block_sparse_utils.py:1272-1283 | flash_attn/cute/block_sparse_utils.py:1332-1344 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/block_sparse_utils.py:1332\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparse_utils.py"},"region":{"startLine":1272}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffcebe35f7f675563a6be01e08ab29a6475c95ff20f4eda0c86634f4bea975c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:716-728 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:748-760 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py\u0060 as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 508 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:716\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":716}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9d6eeb4064fcc97c3aa2993a8be943fc91ac7c6fc03f4ec9e3e2a847eb3d512"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_sm100.py:1439-1450 | flash_attn/cute/flash_fwd_mla_sm100.py:1189-1201 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_sm100.py:1439\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060flash_attn/cute/flash_fwd_mla_sm100.py:1202\u0060 calls \u0060make_tensor\u0060 and \u0060flash_attn/cute/flash_bwd_mla_sm100.py:1451\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1439}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b2df743206170564b2e9a9b8213469f729950af890474345a24733aeec79001"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): flash_attn/cute/flash_bwd_sm100.py:5145-5157 | flash_attn/cute/flash_bwd_sm100.py:5203-5215 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_sm100.py:5145\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":5145}}}],"partialFingerprints":{"codehealthFindingId/v1":"27b7438cf4c3d29dd72f404e748dbe6841a90dc1a084ba35df46c3c587687e2e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201313 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1430-1442 | flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1576-1584 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1430\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":1430}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d25f477deae8bad9d317e5f1a1965da187142f5d09ea8e7b99286119cbe62e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201313 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:2153-2163 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:3243-3255 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py:3243\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":2153}}}],"partialFingerprints":{"codehealthFindingId/v1":"497ed316a817e13c6b50870bfd0bbbf6bcac0b6956c06c57260df90ef020362b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1844-1856 | flash_attn/cute/flash_fwd_mla_sm100.py:2213-2225 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py\u0060 and \u0060flash_attn/cute/flash_fwd_mla_sm100.py\u0060 as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 565 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":1844}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a46ef81f62f6a67a7b48b493e82938173b9c6308e641b3d3e0720226afed7b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_sm100.py:1968-1980 | flash_attn/cute/flash_fwd_mla_sm100.py:2648-2660 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":1968}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f54555ccafef9b29e56acb7fd86b2f44688ea884378f1b1cefe5608f75a82b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): flash_attn/cute/interface.py:3521-3533 | flash_attn/cute/interface.py:3711-3723 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/interface.py:3521\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/interface.py"},"region":{"startLine":3521}}}],"partialFingerprints":{"codehealthFindingId/v1":"9672925c243a8cfd302bd9200f31177fce14e207364c7301bfd4065a8746eadf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): flash_attn/cute/mask.py:258-270 | flash_attn/cute/mask.py:474-486 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/mask.py"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"89451c06dc54ff1597f770139463d7d94b28ffb2ad8634996df7070d90c2d46e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): flash_attn/cute/mask.py:346-358 | flash_attn/cute/mask.py:741-753 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/mask.py:346\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/mask.py"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"d944c7761336b92a6375a1b9b284279128877c016fb8951404bf7ccb7584b41d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): flash_attn/flash_attn_interface.py:527-539 | flash_attn/flash_attn_interface.py:707-719 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/flash_attn_interface.py:527\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_interface.py"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa8efefeda5a01c982d2020194de2030fe5cd9b8af59eb9fbe2db18a7bdcb50c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): flash_attn/ops/fused_dense.py:90-102 | flash_attn/ops/fused_dense.py:423-435 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/fused_dense.py"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"cec04e0018f0d014398cf3be0bdb3b61040ea3832f7a32cc1a6e6195619d9eb5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): flash_attn/ops/triton/linear.py:321-332 | flash_attn/ops/triton/linear.py:577-589 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/linear.py"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"98c92721632aa0eda543c8b7bb56509907faa01be52573954ea9a27b3b212d33"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): flash_attn/cute/benchmark.py:41-52 | flash_attn/cute/benchmark.py:83-94 | flash_attn/utils/benchmark.py:41-52 | flash_attn/utils/benchmark.py:83-94 \u2014 \u0060flash_attn/cute/benchmark.py\u0060 and \u0060flash_attn/utils/benchmark.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 9 separate duplicated blocks between them, totalling at least 194 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/benchmark.py"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed791a741a765a1023b25b7f025bc749929b49e5507df50bf22f9277c07e141d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): flash_attn/cute/blackwell_helpers.py:169-180 | flash_attn/cute/blackwell_helpers.py:285-296 | flash_attn/cute/blackwell_helpers.py:462-473 | flash_attn/cute/blackwell_helpers.py:930-941 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060flash_attn/cute/blackwell_helpers.py:942\u0060 calls \u0060Int32\u0060 and \u0060flash_attn/cute/blackwell_helpers.py:298\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/blackwell_helpers.py"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"49790ee6126ed871ad1bb353b217b134c398e62a377db65cbd6eeea0c88ea38f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): flash_attn/cute/block_sparse_utils.py:1255-1266 | flash_attn/cute/block_sparse_utils.py:1319-1330 | flash_attn/cute/flash_bwd_sm100.py:2792-2805 | flash_attn/cute/flash_bwd_sm100.py:2854-2867 \u2014 there are 4 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/block_sparse_utils.py:1255\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/cute/flash_bwd_sm100.py:2791\u0060 calls \u0060const_expr\u0060 and \u0060flash_attn/cute/block_sparse_utils.py:1253\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparse_utils.py"},"region":{"startLine":1255}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6b62ff41640b8628b4eeed450472f5f74e5b2bd2f4958bbe15511389986859e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): flash_attn/flash_attn_interface.py:709-720 | flash_attn/flash_attn_interface.py:813-824 | flash_attn/flash_attn_interface.py:898-909 | flash_attn/flash_attn_interface.py:1003-1014 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/flash_attn_interface.py:709\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_interface.py"},"region":{"startLine":709}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5948a7c5516c46cdc67c87566831db47e8e0b0a3d3a5590460d8cb39f51cf78"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 4): flash_attn/models/baichuan.py:81-92 | flash_attn/models/bert.py:599-608 | flash_attn/models/llama.py:81-90 | flash_attn/models/llama.py:161-170 \u2014 before extracting anything, compare \u0060flash_attn/models/baichuan.py\u0060 and \u0060flash_attn/models/llama.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 139 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/baichuan.py"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed25072e412ffef0068b21f8a4ed3abbeed211958c2ff7dfa80e2d0cb4c4360b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): flash_attn/cute/block_sparse_utils.py:1253-1264 | flash_attn/cute/block_sparse_utils.py:1275-1286 | flash_attn/cute/block_sparse_utils.py:1317-1328 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparse_utils.py"},"region":{"startLine":1253}}}],"partialFingerprints":{"codehealthFindingId/v1":"35feca208166248074a0d64f31eeea983f67f3def1a2d927d7442f2754c334cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 3): flash_attn/cute/flash_bwd_mla_sm100.py:1536-1546 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1480-1491 | flash_attn/cute/flash_fwd_mla_sm100.py:1270-1280 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_sm100.py:1536\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060flash_attn/cute/flash_fwd_mla_sm100.py:1282\u0060 calls \u0060make_tensor\u0060 and \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1493\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1536}}}],"partialFingerprints":{"codehealthFindingId/v1":"85f9b2a03da987cce3fe638ec599dbd105c00b95b27ac61327ce29b65f827c51"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): flash_attn/cute/flash_bwd_mla_sm100.py:1583-1594 | flash_attn/cute/flash_fwd_mla_sm100.py:1321-1332 | flash_attn/cute/flash_fwd_sm100.py:3666-3677 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1583}}}],"partialFingerprints":{"codehealthFindingId/v1":"84d5b6ab82447eb7943efcebd93fb61007984c78ae323e3c4010df227fe4bf30"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:807-818 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1142-1153 | flash_attn/cute/flash_fwd_mla_sm100.py:886-897 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:807\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/cute/flash_fwd_mla_sm100.py:881\u0060 calls \u0060make_warp_uniform\u0060, \u0060block_idx_in_cluster\u0060, \u0060size\u0060 and \u0060flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:805\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":807}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3f10bd3467f837afc8018897dc236fd7ce8d4bd4e55e5ec4d51ae42351997a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): flash_attn/models/bigcode.py:11-22 | flash_attn/models/llama.py:118-130 | flash_attn/models/llama.py:222-238 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060config\u0060 to \u0060PretrainedConfig\u0060 in one and \u0060GPT2Config\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/bigcode.py"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc88d2d11e7dae50de70c3b02f1606d92485da55c0d547ff7189da08012a7f69"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): AI/racecheck_repro_1d_bulk.py:48-59 | AI/racecheck_repro_1d_tensor.py:53-64 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060AI/racecheck_repro_1d_bulk.py:48\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"AI/racecheck_repro_1d_bulk.py"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"30a389667af238c54c6151e9ab122c237c61dc73f6aa7353cf027e5dc5e22301"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): flash_attn/bert_padding.py:115-126 | flash_attn/bert_padding.py:189-200 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/bert_padding.py:115\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/bert_padding.py"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa39d814a11900bacd3b571abe6beead1d0174a4f4d187f9ed21402cfb234565"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): flash_attn/cute/benchmark_flash_attention_fp8.py:129-140 | flash_attn/cute/benchmark_flash_attention_fp8.py:142-153 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/benchmark_flash_attention_fp8.py:129\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/benchmark_flash_attention_fp8.py"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a7ff8a5d45cc2d3cb644e0a07164cffc0e2b27af7f3cd0a0cd9c8de12d86e5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): flash_attn/cute/benchmark_flash_attention_fp8.py:135-146 | hopper/benchmark_flash_attention_fp8.py:80-91 \u2014 before extracting anything, compare \u0060flash_attn/cute/benchmark_flash_attention_fp8.py\u0060 and \u0060hopper/benchmark_flash_attention_fp8.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 146 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/benchmark_flash_attention_fp8.py:135\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/benchmark_flash_attention_fp8.py"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"83e9f1fee8912f27910b2e4c31e26f0457b2444f61c195f5520590d47f6240ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): flash_attn/cute/benchmark_flash_attention_fp8.py:148-159 | hopper/benchmark_flash_attention_fp8.py:92-103 \u2014 before extracting anything, compare \u0060flash_attn/cute/benchmark_flash_attention_fp8.py\u0060 and \u0060hopper/benchmark_flash_attention_fp8.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 146 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/benchmark_flash_attention_fp8.py:148\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/benchmark_flash_attention_fp8.py"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"d080fa557540f2e3186b6855df961fb867337bd61216570af68b446d4f22b8ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): flash_attn/cute/block_sparse_utils.py:1295-1306 | flash_attn/cute/block_sparse_utils.py:1488-1499 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparse_utils.py"},"region":{"startLine":1295}}}],"partialFingerprints":{"codehealthFindingId/v1":"40c688a86f12d5a16f3a0f0e633b9ddaddca9764477ae19ce4cf4bec28ee5904"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_sm100.py:1071-1082 | flash_attn/cute/flash_fwd_mla_sm100.py:892-903 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_sm100.py:1071\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060flash_attn/cute/flash_fwd_mla_sm100.py:904\u0060 calls \u0060const_expr\u0060 and \u0060flash_attn/cute/flash_bwd_mla_sm100.py:1083\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1071}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed086fa45effae2229516daa85bd5379cad9b704d10c892c401cbd0a62e95587"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_sm100.py:1354-1365 | flash_attn/cute/flash_fwd_mla_sm100.py:1115-1126 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_sm100.py:1354\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1354}}}],"partialFingerprints":{"codehealthFindingId/v1":"f30e3cc789cc55ba8d2864f29f8e64c0861a35ce5a4c19299fd9bf00de6fa202"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): flash_attn/cute/flash_bwd_sm100.py:3110-3121 | flash_attn/cute/flash_bwd_sm100.py:3124-3135 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_sm100.py:3110\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060flash_attn/cute/flash_bwd_sm100.py:3138\u0060 calls \u0060const_expr\u0060 and \u0060flash_attn/cute/flash_bwd_sm100.py:3124\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":3110}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a212e00ee6876374346282f4cce6ba184a8224799a817f5ac7edd2f3262c569"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): flash_attn/cute/flash_bwd_sm100.py:3249-3260 | flash_attn/cute/flash_bwd_sm100.py:3353-3362 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":3249}}}],"partialFingerprints":{"codehealthFindingId/v1":"c85c99cd2e554799b4d848821918895d7a8d1798927a3e906b3f89afb4d5a8b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): flash_attn/cute/flash_fwd.py:439-448 | flash_attn/cute/flash_fwd_sm100.py:3553-3564 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd.py:439\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd.py"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7b3a6dd10e849d6a8026b3412aa816f94411869d825ca5912888a6288161327"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:422-433 | flash_attn/cute/flash_fwd_mla_sm100.py:423-434 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":422}}}],"partialFingerprints":{"codehealthFindingId/v1":"cff5524d3a5ee536a112a24731ce6cd0aeca16d5c1362af151cc5e2efdf18176"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:667-678 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:994-1005 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:667\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":667}}}],"partialFingerprints":{"codehealthFindingId/v1":"067399443065b64e1ec2a2587aec8a45d6d8f3c8fe6ac5c91dd16744282f2a95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_sm100.py:473-484 | flash_attn/cute/flash_fwd_mla_sm100.py:308-318 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py\u0060 and \u0060flash_attn/cute/flash_fwd_mla_sm100.py\u0060 as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 565 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py:473\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":473}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea400762d3d353963e0a66a19ca5a8062fb02d24171b31dea964f1fc90e4e78b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1452-1463 | flash_attn/cute/flash_fwd_mla_sm100.py:1232-1242 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py\u0060 and \u0060flash_attn/cute/flash_fwd_mla_sm100.py\u0060 as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 565 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1452\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060flash_attn/cute/flash_fwd_mla_sm100.py:1243\u0060 calls \u0060make_tensor\u0060 and \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1464\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":1452}}}],"partialFingerprints":{"codehealthFindingId/v1":"45718dbd93fa99228b7cdb5e05dc852e061e03c85c90a296a804c214b9e28294"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_sm100.py:3373-3384 | flash_attn/cute/flash_fwd_mla_sm100.py:3221-3232 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py\u0060 and \u0060flash_attn/cute/flash_fwd_mla_sm100.py\u0060 as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 565 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":3373}}}],"partialFingerprints":{"codehealthFindingId/v1":"07a5cf42464b446d43eb4be55b2aa465712099a3e4d93b68d6b23e98e10d8c50"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): flash_attn/cute/mask.py:475-486 | flash_attn/cute/mask.py:864-876 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/mask.py"},"region":{"startLine":475}}}],"partialFingerprints":{"codehealthFindingId/v1":"60e71909144cfde92c5d58fae1cabaadcd0aae003cfdbb46fd4e1c528e5f57bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): flash_attn/cute/pack_gqa.py:213-232 | flash_attn/cute/pack_gqa.py:298-317 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/pack_gqa.py:213\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/cute/pack_gqa.py:212\u0060 calls \u0060partition_D\u0060 and \u0060flash_attn/cute/pack_gqa.py:297\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/pack_gqa.py"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"29b69dd2d912bb8ed793f1074b3c9c1a64be2b669f9e1145c4d6c18f321d3e4a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): flash_attn/cute/tile_scheduler.py:739-750 | flash_attn/cute/tile_scheduler.py:914-925 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/tile_scheduler.py"},"region":{"startLine":739}}}],"partialFingerprints":{"codehealthFindingId/v1":"9df63515ce355c51f530187e8ecaa1ce4471d963365ede264bdae6e0e52d3752"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): flash_attn/flash_attn_interface.py:529-540 | flash_attn/flash_attn_interface.py:623-633 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/flash_attn_interface.py:529\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_interface.py"},"region":{"startLine":529}}}],"partialFingerprints":{"codehealthFindingId/v1":"62750c8d0a359241dd535d2221626609b37b00d04d1f17322c8cfe24ca98fe04"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): flash_attn/modules/mha.py:691-702 | flash_attn/modules/mha.py:977-988 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/modules/mha.py:691\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/mha.py"},"region":{"startLine":691}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef0e84ce8c3ffb79274049636f36168e8912e01e3941abcdb11449abf928298d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): flash_attn/ops/layer_norm.py:80-91 | flash_attn/ops/layer_norm.py:182-193 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/ops/layer_norm.py:80\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/layer_norm.py"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"92ad6a3060c9ed9dc119ab53bfd755d7edf30847962ef59f259a31d92b29ffba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201311 lines \u00D7 5): flash_attn/models/bigcode.py:24-34 | flash_attn/models/btlm.py:28-35 | flash_attn/models/gpt.py:940-947 | flash_attn/models/gpt.py:1006-1016 | flash_attn/models/opt.py:39-46 \u2014 there are 5 copies across 4 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/models/bigcode.py:24\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/bigcode.py"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"13712539c965cb71385653e5c3c98481a8951bada2e817d5aa18bac73997051e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): flash_attn/cute/block_sparse_utils.py:1252-1262 | flash_attn/cute/block_sparse_utils.py:1274-1284 | flash_attn/cute/block_sparse_utils.py:1316-1326 | flash_attn/cute/block_sparse_utils.py:1335-1345 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparse_utils.py"},"region":{"startLine":1252}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fd467cdff2a9d69a5540ccdcd9a0e206239e991c94eae792d6db987f57125bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201311 lines \u00D7 4): flash_attn/cute/flash_bwd_sm100.py:3446-3454 | flash_attn/cute/flash_bwd_sm100.py:3461-3469 | flash_attn/cute/flash_bwd_sm100.py:3505-3515 | flash_attn/cute/flash_bwd_sm100.py:3542-3550 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/cute/flash_bwd_sm100.py:3444\u0060 calls \u0060wait\u0060 and \u0060flash_attn/cute/flash_bwd_sm100.py:3502\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":3446}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a950ee5ee891267ecb6e9f2dfac5957311c5a502e83e736e34e751ec6b6862c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 3): flash_attn/cute/flash_bwd_mla_sm100.py:2020-2030 | flash_attn/cute/flash_bwd_mla_sm100.py:2035-2044 | flash_attn/cute/flash_bwd_mla_sm100.py:2049-2059 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_sm100.py:2020\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/cute/flash_bwd_mla_sm100.py:2015\u0060 calls \u0060partition_B\u0060, \u0060const_expr\u0060 and \u0060flash_attn/cute/flash_bwd_mla_sm100.py:2034\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":2020}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d19b810a9ca4fb5ff0fc088ecd43dd9e3eb737ba16298167e7d4caee13429fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): flash_attn/cute/block_sparse_utils.py:1475-1485 | flash_attn/cute/flash_bwd_sm100.py:2703-2713 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/block_sparse_utils.py:1475\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparse_utils.py"},"region":{"startLine":1475}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7957a96ced8c33be15d3f0aa416515d099e977937a15516015f6a494b6ff230"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:871-881 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:969-979 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":871}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c4fdaf36e1b15a5fdfa35564c3437bb2eb78e9a1607b01e9b6c69507f85d9ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:883-893 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:895-907 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py\u0060 as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 508 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:895\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":883}}}],"partialFingerprints":{"codehealthFindingId/v1":"047883e21bc165f1b0e8ce8ef519277234c3f07d09aa8ea4e636fa0b06fc4ef1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201311 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:1069-1079 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:1082-1090 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":1069}}}],"partialFingerprints":{"codehealthFindingId/v1":"755841cbfcc5809e1292f0bf57f71f00fcd7e4f0b0692532f301ab41b5880986"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_sm100.py:603-613 | flash_attn/cute/flash_bwd_mla_sm100.py:614-623 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":603}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c172f828fb0c1f1d1494b36a3760cb5011dd4d2e65ae004836326e027d8892e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): flash_attn/cute/flash_bwd_sm100.py:1241-1251 | flash_attn/cute/flash_bwd_sm100.py:1324-1334 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_sm100.py:1241\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":1241}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8368797b004315436935d5f5a58b5bdd99c7ff69961c057554ac36532ed32bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): flash_attn/cute/flash_bwd_sm100.py:1282-1292 | flash_attn/cute/flash_bwd_sm100.py:1341-1351 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_sm100.py:1282\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":1282}}}],"partialFingerprints":{"codehealthFindingId/v1":"881e779c18dc9508984d81e505130d0b1d5d18f1db8b479eb59af8f5089bfbd2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): flash_attn/cute/flash_bwd_sm90.py:1277-1287 | flash_attn/cute/flash_bwd_sm90.py:1290-1300 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm90.py"},"region":{"startLine":1277}}}],"partialFingerprints":{"codehealthFindingId/v1":"8898410e48e45f2d665cb0380a9ca99c77465b05dcacc5b5844dd992c1f63762"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u201311 lines \u00D7 3): flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1911-1919 | flash_attn/cute/flash_fwd_mla_sm100.py:1881-1891 | flash_attn/cute/topk_gather_kv.py:265-269 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py\u0060 and \u0060flash_attn/cute/flash_fwd_mla_sm100.py\u0060 as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 565 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_sm100.py:1881\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/cute/topk_gather_kv.py:263\u0060 calls \u0060make_ptr\u0060 and \u0060flash_attn/cute/flash_fwd_mla_sm100.py:1880\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":1911}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5136261de33dca24bd8d1bfce36d6cad31b9060e830f2d3c5db49a4dccce55f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_sm100.py:2149-2159 | flash_attn/cute/flash_fwd_mla_sm100.py:2168-2178 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":2149}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfa9651e8d12a0dfad99d9d432e141a00b633bbd492ba5cfa4e70b8634952531"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u201311 lines \u00D7 2): flash_attn/cute/flash_fwd_sm90.py:718-728 | flash_attn/cute/tensormap_utils.py:22-28 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm90.py"},"region":{"startLine":718}}}],"partialFingerprints":{"codehealthFindingId/v1":"817f82f9c59b910872bf31b79fd3b50d07d478782cc7b2da7f93746f870fbd32"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): flash_attn/flash_attn_interface.py:515-525 | flash_attn/flash_attn_interface.py:695-705 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/flash_attn_interface.py:515\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_interface.py"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae6a4f23466fc457dd8b1898b6060f523c2d33279330381b3d2c778523411610"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): flash_attn/flash_attn_interface.py:605-615 | flash_attn/flash_attn_interface.py:795-805 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/flash_attn_interface.py:605\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_interface.py"},"region":{"startLine":605}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ad8bd217134e5c90ff17b9224c747a07770480bb3e1149738682447d7b0ec0f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): flash_attn/flash_blocksparse_attn_interface.py:90-100 | flash_attn/flash_blocksparse_attn_interface.py:141-151 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/flash_blocksparse_attn_interface.py:90\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_blocksparse_attn_interface.py"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cf28d88b497941481ab640aea98ce2111232235744a93c3bbd2584e3dc25126"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): flash_attn/modules/mha.py:550-560 | flash_attn/modules/mha.py:886-896 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/mha.py"},"region":{"startLine":550}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e210dbc85ffda3203768962dce2431413d4b373cc6216421b22abfd42e9523e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): flash_attn/cute/barrier.py:27-36 | flash_attn/cute/barrier.py:43-52 | flash_attn/cute/barrier.py:83-92 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/cute/barrier.py:80\u0060 calls \u0060operations\u0060 and \u0060flash_attn/cute/barrier.py:26\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/barrier.py"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"43f2725dfc5625a3ed2a5dfc30b35cec85faeb2a907ca9b0401c89b49ef468c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 3): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:1112-1121 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:1146-1155 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:1145-1153 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py\u0060 as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 508 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:1112\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:1143\u0060 calls \u0060producer_acquire\u0060, \u0060arrive_and_wait\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:1111\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":1112}}}],"partialFingerprints":{"codehealthFindingId/v1":"77051ae58168476eeba2c7bdb16d9177b89d2d69c16e628e72458f349239cb74"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): flash_attn/cute/flash_bwd_mla_sm100.py:713-722 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:785-794 | flash_attn/cute/flash_fwd_mla_sm100.py:554-563 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":713}}}],"partialFingerprints":{"codehealthFindingId/v1":"d67ad4c8372e82710c039e871c6127b73e12cd356566735ee1d332789a45732b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 3): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:688-696 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1015-1024 | flash_attn/cute/flash_fwd_mla_sm100.py:757-766 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:688\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:686\u0060 calls \u0060const_expr\u0060 and \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1014\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":688}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d5c135af15132cbc6518d38553ca8709872576b472eb54bbfbd7a2b24532980"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:941-950 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1297-1306 | flash_attn/cute/flash_fwd_mla_sm100.py:1040-1049 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:941\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":941}}}],"partialFingerprints":{"codehealthFindingId/v1":"605b070f2acee0c6fa3610e15b212efc1549d0d1b063500f99adfdbc7de73d74"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1130-1139 | flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1489-1498 | flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1892-1901 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":1130}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4883b72df5dbbb22eebaa200c6f97e70688485446b0d4902b72f97ebdf851ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u201310 lines \u00D7 3): flash_attn/cute/flash_fwd_sm90.py:1227-1236 | flash_attn/cute/flash_fwd_sm90.py:1244-1252 | flash_attn/cute/flash_fwd_sm90.py:1260-1265 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_sm90.py:1227\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm90.py"},"region":{"startLine":1227}}}],"partialFingerprints":{"codehealthFindingId/v1":"f620ea8f7fd5c8654b1a4eb0ecd16b668197c35d91f52d2f9105fa6543de1e36"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): flash_attn/cute/interface.py:3462-3471 | flash_attn/cute/interface.py:3626-3644 | flash_attn/ops/triton/layer_norm.py:903-915 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/interface.py:3462\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/interface.py"},"region":{"startLine":3462}}}],"partialFingerprints":{"codehealthFindingId/v1":"8195941577f34d858f20db714bda718ee651f8b61e1ceec790cbc09e289aba3f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): AI/racecheck_repro_1d_bulk.py:25-36 | AI/racecheck_repro_1d_tensor.py:25-36 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"AI/racecheck_repro_1d_bulk.py"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"649e7fc0ee474e7723665dd18c774d923b2000c07d55a42bb39cb74dad3d457e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): flash_attn/cute/benchmark.py:259-268 | flash_attn/utils/benchmark.py:259-268 \u2014 \u0060flash_attn/cute/benchmark.py\u0060 and \u0060flash_attn/utils/benchmark.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 9 separate duplicated blocks between them, totalling at least 194 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/benchmark.py"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"db8eea80fa8b56cdf120630ada4128d98ff8e80ad8fbb2e5a510649a58ec3557"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): flash_attn/cute/block_sparse_utils.py:1732-1741 | flash_attn/cute/block_sparse_utils.py:1846-1855 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/block_sparse_utils.py:1732\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparse_utils.py"},"region":{"startLine":1732}}}],"partialFingerprints":{"codehealthFindingId/v1":"031779c43c4e4020d3043601d8ed7274c584a4b3960627124c7da4d49119fb74"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): flash_attn/cute/flash_bwd.py:1291-1300 | flash_attn/cute/flash_bwd.py:1335-1344 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd.py:1291\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd.py"},"region":{"startLine":1291}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8c5fa382292c82bd8f692d42da5149fa23cdb4af7b1a142ae85d5da177d419c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dk_sm100.py:633-642 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:653-662 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dk_sm100.py"},"region":{"startLine":633}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bf7989f287ef682fa5116a9f46053d9284f527e4832e964c687761dd1129b6f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:886-895 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:987-996 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py"},"region":{"startLine":886}}}],"partialFingerprints":{"codehealthFindingId/v1":"3356f98d80a1a19d8d18ceab9eaa8d1df8d0bce6e114d20fe99a64f9bc3913a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): flash_attn/cute/flash_bwd_sm100.py:2353-2362 | flash_attn/cute/flash_bwd_sm100.py:2368-2377 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/cute/flash_bwd_sm100.py:2366\u0060 calls \u0060const_expr\u0060 and \u0060flash_attn/cute/flash_bwd_sm100.py:2349\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":2353}}}],"partialFingerprints":{"codehealthFindingId/v1":"0936819c2427d71ef114281f022a3e0b54ee1d3f6fbe4abc2ad7d37d3f6636ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): flash_attn/cute/flash_bwd_sm90.py:1134-1143 | flash_attn/cute/flash_bwd_sm90.py:1177-1186 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm90.py"},"region":{"startLine":1134}}}],"partialFingerprints":{"codehealthFindingId/v1":"52bb838063ff2dce26d05ee44c3fb08fc215ef5865803eca2604a7616472972b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1193-1201 | flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1228-1237 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":1193}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9128ffc8cf667cd1b5d9cf8f2d8e67aa4f59e41bfa245f5fb669a1e56841902"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1669-1676 | flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:2126-2135 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:2126\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":1669}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e5140f2d8d6935119e7459ac9a7b890bc1ce5a395897cb8f9953d9a01c32eca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_sm100.py:828-838 | flash_attn/cute/flash_fwd_mla_sm100.py:567-576 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py\u0060 and \u0060flash_attn/cute/flash_fwd_mla_sm100.py\u0060 as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 565 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py:828\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":828}}}],"partialFingerprints":{"codehealthFindingId/v1":"c775be9f08c91deabcd32eedc01ade671121056921c40f06abca365464a50b20"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1353-1362 | flash_attn/cute/flash_fwd_mla_sm100.py:1106-1115 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py\u0060 and \u0060flash_attn/cute/flash_fwd_mla_sm100.py\u0060 as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 565 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060flash_attn/cute/flash_fwd_mla_sm100.py:1117\u0060 calls \u0060const_expr\u0060 and \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1364\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":1353}}}],"partialFingerprints":{"codehealthFindingId/v1":"396cf2f22caf5a90c0655f7f7ceb7228f849ce7bdceb5df12f42d77a26afd343"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): flash_attn/cute/flash_fwd_sm100.py:1827-1836 | flash_attn/cute/flash_fwd_sm100.py:1855-1865 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":1827}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe98237d874e8087a70d744f98bc8fd6a27eb9a66f3f73af3f9ddfd7d0e2c02d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): flash_attn/cute/flash_fwd_sm100.py:2131-2140 | flash_attn/cute/flash_fwd_sm100.py:2144-2153 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/cute/flash_fwd_sm100.py:2143\u0060 calls \u0060consumer_release_w_index\u0060 and \u0060flash_attn/cute/flash_fwd_sm100.py:2130\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":2131}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a9cbb9e4349c45634bc5de21a55ac9e10b6b74c74de78494ddff26a3b5bfabb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): flash_attn/cute/flash_fwd_sm90.py:1459-1467 | flash_attn/cute/flash_fwd_sm90.py:1528-1537 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm90.py"},"region":{"startLine":1459}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4678f8b17c18843123f431b2c52d085aae0cc62841c206cea491adaa24b57c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): flash_attn/cute/softmax.py:430-439 | flash_attn/cute/softmax.py:489-498 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060flash_attn/cute/softmax.py:442\u0060 calls \u0060const_expr\u0060 and \u0060flash_attn/cute/softmax.py:508\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/softmax.py"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e876b22e5f70dac86a6414d8c2648c3a7e24e28d8ce221fa43ad1d215fba5cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): flash_attn/flash_attn_triton.py:721-730 | flash_attn/flash_attn_triton_og.py:178-187 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_triton.py"},"region":{"startLine":721}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e142a7b735f67139ee94bf3dd60af285dcbc5d895b3a48bed904aacb260f641"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): flash_attn/flash_attn_triton.py:832-841 | flash_attn/flash_attn_triton.py:941-950 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_triton.py"},"region":{"startLine":832}}}],"partialFingerprints":{"codehealthFindingId/v1":"d19e31c4dd0b2c77fea29400e0eaf2caa342cf6ef29c560260d3b1123af7fe00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): flash_attn/flash_attn_triton_og.py:283-292 | flash_attn/flash_attn_triton_og.py:345-354 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_triton_og.py"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2850bbf7f6f8ddd79d63872382d0ff009cea2e65b978a873d26a7a279f065a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): flash_attn/modules/mha.py:562-571 | flash_attn/modules/mha.py:898-907 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/modules/mha.py:562\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/mha.py"},"region":{"startLine":562}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5070792207d05583367ae583e15bda90506818feed0a5b7237f2f9d63d55068"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): flash_attn/ops/triton/linear.py:207-218 | flash_attn/ops/triton/linear.py:492-503 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/linear.py"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fc047d13cd54878eda3ce203afbbf8daa54aa6ff388c706cbad2fa11c06c403"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): flash_attn/utils/generation.py:433-441 | flash_attn/utils/generation.py:502-511 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/utils/generation.py:433\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/utils/generation.py"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"61db72e70688fce4c9ce8492e156666d87404857d65c1cfa8cb42247e09da212"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20139 lines \u00D7 5): flash_attn/models/bigcode.py:17-23 | flash_attn/models/falcon.py:20-28 | flash_attn/models/gpt.py:933-939 | flash_attn/models/gpt_neox.py:20-26 | flash_attn/models/gptj.py:19-25 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 5 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/bigcode.py"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a42ebead800aa7cff433163928f4e2db53abf8fb6d30f4dec6fc47b54a5a9d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): flash_attn/cute/flash_bwd_mla_sm100.py:1441-1450 | flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1025-1033 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1419-1429 | flash_attn/cute/flash_fwd_mla_sm100.py:1192-1201 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_sm100.py:1441\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060flash_attn/cute/flash_fwd_mla_sm100.py:1202\u0060 calls \u0060make_tensor\u0060 and \u0060flash_attn/cute/flash_bwd_mla_sm100.py:1451\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1441}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5dbff935b5bbc1c52276a71f19a68ecd2e17155c40077590e6e98d152ce7170"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1626-1634 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1665-1673 | flash_attn/cute/flash_fwd_mla_sm100.py:1991-1999 | flash_attn/cute/flash_fwd_mla_sm100.py:2005-2013 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py\u0060 and \u0060flash_attn/cute/flash_fwd_mla_sm100.py\u0060 as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 565 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1626\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1675\u0060 calls \u0060const_expr\u0060 and \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1637\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":1626}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e512526dfd7cf0c4078bdedb81efa9ec17702537fa047570fb1f7b133e37fd0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 3): flash_attn/cute/flash_bwd_mla_sm100.py:2195-2203 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1846-1853 | flash_attn/cute/flash_fwd_mla_sm100.py:2215-2222 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":2195}}}],"partialFingerprints":{"codehealthFindingId/v1":"f85e6ab8b415053350a70e3c4c67c4ec90fac61954cd7b4aa6aaf588b32fd4a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): flash_attn/cute/block_sparse_utils.py:492-501 | flash_attn/cute/block_sparse_utils.py:518-526 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/block_sparse_utils.py:492\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparse_utils.py"},"region":{"startLine":492}}}],"partialFingerprints":{"codehealthFindingId/v1":"a59c4583a6c735b1dc047d99d71a850015f63abcb1527536ecb5a244dbf3113d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_sm100.py:1930-1938 | flash_attn/cute/flash_bwd_mla_sm100.py:2861-2869 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1930}}}],"partialFingerprints":{"codehealthFindingId/v1":"306092496cef89a9bec5854934c05e5c63152a0b4bd6e092d520f9eba4004ce9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): flash_attn/cute/flash_bwd_sm100.py:1220-1228 | flash_attn/cute/flash_bwd_sm100.py:1311-1319 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":1220}}}],"partialFingerprints":{"codehealthFindingId/v1":"763dabf78b10e3a134c895343385749f84d31fceaa834422e023625258aab9e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): flash_attn/cute/flash_bwd_sm100.py:2226-2234 | flash_attn/cute/flash_bwd_sm100.py:3204-3212 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":2226}}}],"partialFingerprints":{"codehealthFindingId/v1":"93b21fb56141a2ad3fed148782005a2e951b82807318732a0ce684564dc2a850"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20139 lines \u00D7 2): flash_attn/cute/flash_bwd_sm100.py:5334-5340 | flash_attn/cute/flash_bwd_sm100.py:5528-5536 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":5334}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a7aec5a14215c331f245ee6127ef3eaf5e69b18ae98fb3fbc12de7f05e15972"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): flash_attn/cute/flash_bwd_sm90.py:87-95 | flash_attn/cute/flash_fwd.py:84-92 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm90.py"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5e84fc55d9eb8df9da5bd9c079361f25cdd3dccc8bf8309d6b7da0018675902"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): flash_attn/cute/flash_bwd_sm90.py:939-947 | flash_attn/cute/flash_fwd_sm90.py:729-738 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm90.py"},"region":{"startLine":939}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7c8cf07e472527cfbbf8d03bb3e8f533cb5d1dae802a83167d57c57a333c21b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20139 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:465-471 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:689-697 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"68ce871113309ed02392e40969e8ef89c310479440016e452f436a962ed2d056"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1284-1292 | flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1479-1487 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1293\u0060 calls \u0060make_pipeline_state\u0060 and \u0060flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1489\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":1284}}}],"partialFingerprints":{"codehealthFindingId/v1":"6da9c4f7f4c93e731c97c57f60d29fe7d67efa26b28893ccab6ce8b025969baf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1333-1345 | flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1518-1530 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1333\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":1333}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9d295d50f0972d88f4f82b663b545e4de2ee29faffa9f34305a23cec70d8a39"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1653-1661 | flash_attn/cute/flash_fwd_mla_sm100.py:1993-2000 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py\u0060 and \u0060flash_attn/cute/flash_fwd_mla_sm100.py\u0060 as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 565 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":1653}}}],"partialFingerprints":{"codehealthFindingId/v1":"84c7e46714a9f2471eaf32e512a174f2f972beab3ade652d69de364fa0f652d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_sm100.py:1893-1901 | flash_attn/cute/paged_kv.py:227-235 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":1893}}}],"partialFingerprints":{"codehealthFindingId/v1":"c894edaed28df6319f71025446a041d5b9babfcac88d22f18b10465654d72a40"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): flash_attn/cute/interface.py:697-705 | flash_attn/cute/interface.py:2238-2246 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/interface.py"},"region":{"startLine":697}}}],"partialFingerprints":{"codehealthFindingId/v1":"75fb7c17e79d1e205992fb3397a062075fb0742412477639e04322a2d29b0d68"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20139 lines \u00D7 2): flash_attn/cute/pack_gqa.py:236-244 | flash_attn/cute/pack_gqa.py:321-327 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/pack_gqa.py:236\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/pack_gqa.py"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"42785e8959c610b71e7f0529861f8aec7abd80f625ff69d21496962098364b1b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): flash_attn/cute/tile_scheduler.py:792-800 | flash_attn/cute/tile_scheduler.py:1482-1490 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/tile_scheduler.py"},"region":{"startLine":792}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fb3a03bcbd32cf68ce637bf463693fe7db69f0e185c97841bec08ca16331b8c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): flash_attn/cute/tile_scheduler.py:1439-1447 | flash_attn/cute/tile_scheduler.py:1454-1462 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/tile_scheduler.py"},"region":{"startLine":1439}}}],"partialFingerprints":{"codehealthFindingId/v1":"477237ed418425671f118c4aa640965310271e43b3e55380aa3937812ef24ace"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): flash_attn/modules/mha.py:259-268 | flash_attn/modules/mha.py:316-325 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/mha.py"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"63244f6e5efd50edf5485b3f50da787dba962a2e75aad6156ae041fce7784603"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): flash_attn/ops/fused_dense.py:179-187 | flash_attn/ops/fused_dense.py:220-229 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/ops/fused_dense.py:179\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/ops/fused_dense.py:219\u0060 calls \u0060get_rank\u0060 and \u0060flash_attn/ops/fused_dense.py:178\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/fused_dense.py"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"f68275d4acede5bd6195f9f6670249d7e564c0158a9275e4a26d22b72a360952"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): flash_attn/ops/triton/layer_norm.py:385-393 | flash_attn/ops/triton/layer_norm.py:742-750 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/layer_norm.py"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2f7e277d2cff8e6df9d837c7d8eaddf4a24fc8cc29e622506cd5d960207a044"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): training/src/utils/gpu_affinity.py:58-66 | training/src/utils/gpu_affinity.py:81-89 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/utils/gpu_affinity.py"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"58c3d2b85193d5b57a76816b01f6e3003238c6c1af12bb653191786990f9506d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 7): flash_attn/cute/flash_bwd_mla_sm100.py:2034-2041 | flash_attn/cute/flash_bwd_mla_sm100.py:2048-2055 | flash_attn/cute/flash_bwd_mla_sm100.py:2063-2070 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1652-1659 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1698-1705 | flash_attn/cute/flash_fwd_mla_sm100.py:2084-2091 | flash_attn/cute/flash_fwd_mla_sm100.py:2094-2101 \u2014 there are 7 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060flash_attn/cute/flash_fwd_mla_sm100.py:2093\u0060 calls \u0060partition_B\u0060 and \u0060flash_attn/cute/flash_bwd_mla_sm100.py:2071\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":2034}}}],"partialFingerprints":{"codehealthFindingId/v1":"76073763d12212553c037406159fdd8b74559d818baa2849d8753a909214022a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): flash_attn/cute/flash_fwd_mla_sm100.py:1892-1899 | flash_attn/cute/paged_kv.py:226-233 | flash_attn/cute/topk_gather_kv.py:270-277 | flash_attn/cute/topk_gather_kv.py:542-549 \u2014 there are 4 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_sm100.py:1892\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":1892}}}],"partialFingerprints":{"codehealthFindingId/v1":"80f24e004b84f3898e108e1d9b8a25d108ed3a43d0ada422dbcab23970b4f83f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): flash_attn/models/btlm.py:35-42 | flash_attn/models/gpt.py:947-954 | flash_attn/models/gpt.py:961-968 \u2014 before extracting anything, compare \u0060flash_attn/models/btlm.py\u0060 and \u0060flash_attn/models/gpt.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060flash_attn/models/gpt.py:969\u0060 calls \u0060pop\u0060 and \u0060flash_attn/models/gpt.py:955\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/btlm.py"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"69d1455c9e2197523694a3964a441826c99d265ce682dbe0513353e0afd1f1ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): flash_attn/bert_padding.py:11-18 | flash_attn/cute/testing.py:16-22 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/bert_padding.py:11\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/bert_padding.py"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4d01a74ebd41aeff61b2be566999a4169624eaa33854f873a5a0a5c0743120f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): flash_attn/cute/blackwell_helpers.py:528-535 | flash_attn/cute/blackwell_helpers.py:1145-1152 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/blackwell_helpers.py:528\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/blackwell_helpers.py"},"region":{"startLine":528}}}],"partialFingerprints":{"codehealthFindingId/v1":"89bf91eb4a9d3160a6d8fb02ab47ad58cad0284e1a620ac7bf72bccd0fd34f82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:629-636 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:651-658 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py\u0060 as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 508 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":629}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fbeabd37483e440c3575963184615b50f9d111219ce4fcd77632249c0725e9a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u20138 lines \u00D7 3): flash_attn/cute/flash_bwd_mla_sm100.py:1101-1108 | flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:830-834 | flash_attn/cute/flash_fwd_mla_sm100.py:918-925 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:830\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/cute/flash_bwd_mla_sm100.py:1098\u0060 calls \u0060CooperativeGroup\u0060 and \u0060flash_attn/cute/flash_fwd_mla_sm100.py:916\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1101}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1a5c6637b0cd1f5e20e1194deb6baf60fcceb37ce9c0406bfce848e66ad6035"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_sm100.py:2084-2091 | flash_attn/cute/flash_fwd_mla_sm100.py:2101-2108 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_sm100.py:2084\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":2084}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a6d5be97aa6b9d20e181c957b4a5953a87c13ba1d27ecf09fda6c4353288c83"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): flash_attn/cute/flash_fwd_combine.py:455-463 | flash_attn/cute/flash_fwd_combine.py:625-632 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_combine.py"},"region":{"startLine":455}}}],"partialFingerprints":{"codehealthFindingId/v1":"29c3ad3c2cc9547539b69f5d41c567480c51c1537f81bca709ac7fd7d7a65929"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): flash_attn/cute/flash_fwd_decode_sm100.py:984-991 | flash_attn/cute/flash_fwd_decode_sm100.py:1022-1029 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_decode_sm100.py"},"region":{"startLine":984}}}],"partialFingerprints":{"codehealthFindingId/v1":"d23034446b51b1801ef1983f7a87a455c2ff617baf0a616531eae7c364f55a51"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_sm100.py:940-949 | flash_attn/cute/flash_fwd_mla_sm100.py:684-691 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py\u0060 and \u0060flash_attn/cute/flash_fwd_mla_sm100.py\u0060 as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 565 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py:940\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":940}}}],"partialFingerprints":{"codehealthFindingId/v1":"df139faee7989bedcb8e08bcde649ab5326f1abc527e637722d9c08cbb36cdc8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20138 lines \u00D7 4): flash_attn/cute/flash_fwd_mla_1cta_sm100.py:3530-3537 | flash_attn/cute/flash_fwd_mla_sm100.py:3292-3299 | flash_attn/cute/flash_fwd_sm100.py:3398-3400 | flash_attn/cute/flash_fwd_sm100.py:3499-3501 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py\u0060 and \u0060flash_attn/cute/flash_fwd_mla_sm100.py\u0060 as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 565 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_sm100.py:3398\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py:3537\u0060 calls \u0060size\u0060 and \u0060flash_attn/cute/flash_fwd_sm100.py:3400\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":3530}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb870bda47b15f1882fd1ef6956537453d2057d4e882fb8252762f9f0d49e1d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_sm100.py:1602-1609 | flash_attn/cute/flash_fwd_mla_sm100.py:1619-1628 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_sm100.py:1602\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":1602}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf2da5c6501396997d672c82c445a67a9a46c67c4330d4adb62a08dfae9e5dc3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): flash_attn/cute/flash_fwd_sm100.py:703-710 | flash_attn/cute/flash_fwd_sm90.py:255-262 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":703}}}],"partialFingerprints":{"codehealthFindingId/v1":"76ec2446fd75f2a3f60b967717ed521c37dddd66bdc77aab418d898e99a540fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): flash_attn/cute/interface.py:730-748 | flash_attn/cute/interface.py:2268-2275 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/interface.py:730\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/interface.py"},"region":{"startLine":730}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7825a98a22824821a2193569bd99d3bdfc8b6c4f7bbb282e729608073fc7b85"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): flash_attn/cute/mask.py:302-309 | flash_attn/cute/mask.py:340-346 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/mask.py"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"71e30dd7e111d00ae36f220a3caf674d468489f4979b4e4c09a187243b0b20d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20138 lines \u00D7 2): flash_attn/cute/mask.py:828-833 | flash_attn/cute/mask.py:851-858 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/mask.py"},"region":{"startLine":828}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b50ed220fbcfbbce6897719d29303562190748ea858016f8928061863009d96"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): flash_attn/cute/sm90_config_search.py:236-243 | flash_attn/cute/sm90_config_search.py:346-353 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/sm90_config_search.py:236\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/sm90_config_search.py"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"86a6815e2df3052edf1c6611f3ee76235dead2b6a9e82ad17bed6033c4172f03"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): flash_attn/cute/testing.py:438-445 | flash_attn/utils/testing.py:328-335 \u2014 \u0060flash_attn/cute/testing.py\u0060 and \u0060flash_attn/utils/testing.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 7 separate duplicated blocks between them, totalling at least 199 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/cute/testing.py:437\u0060 calls \u0060logsumexp\u0060 and \u0060flash_attn/utils/testing.py:327\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/testing.py"},"region":{"startLine":438}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2bcaa1da457fe771fa5322da85e367794fe0ea70e7b51e8ad305c929f02ed22"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): flash_attn/flash_attn_interface.py:845-852 | flash_attn/flash_attn_interface.py:936-943 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_interface.py"},"region":{"startLine":845}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e85872d3a9b7aa1ee7c66063d14f526cc828adebf38ffc073509bb9376be5ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): flash_attn/modules/mha.py:102-109 | flash_attn/modules/mha.py:188-195 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/mha.py"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c4bd14031644c7703270d2089521e5e9271f5c24305edda85493b95eaf8124e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): flash_attn/ops/triton/layer_norm.py:375-382 | flash_attn/ops/triton/layer_norm.py:731-738 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/layer_norm.py"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f1e0f30c5092b78e7e481b35dfde8df1a30359bf82248499839cb7f06280f18"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): flash_attn/utils/generation.py:469-477 | flash_attn/utils/generation.py:537-545 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/utils/generation.py"},"region":{"startLine":469}}}],"partialFingerprints":{"codehealthFindingId/v1":"08173035e8d2b890d694380079267eba5dfb4d5f3b294d2de122210b252b1e1b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): training/src/tasks/seq.py:108-115 | training/src/tasks/seq.py:185-192 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/tasks/seq.py"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"a69f7ae97156cce97a2243ee7c6dcb927c665d2c664a815a6b45f35add156027"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): training/src/utils/ddp_zero1.py:97-103 | training/src/utils/ddp_zero2.py:134-141 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060training/src/utils/ddp_zero2.py:134\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/utils/ddp_zero1.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"a09fc84611563ec4ccb3b9fbc347fb47570117cb70b25f1d8c9477e60f2ba355"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 7): flash_attn/models/bigcode.py:20-26 | flash_attn/models/btlm.py:24-30 | flash_attn/models/falcon.py:25-31 | flash_attn/models/gpt.py:936-942 | flash_attn/models/gpt_neox.py:23-29 | flash_attn/models/gptj.py:22-28 | flash_attn/models/opt.py:35-41 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 7 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/bigcode.py"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac7542f5a97f3f3e7f9ece03253c64f699c3d624e53abad758bfd4b8034dad3b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 6): flash_attn/cute/benchmark.py:97-103 | flash_attn/cute/benchmark.py:222-228 | flash_attn/cute/benchmark.py:242-248 | flash_attn/utils/benchmark.py:97-103 | flash_attn/utils/benchmark.py:222-228 | flash_attn/utils/benchmark.py:242-248 \u2014 \u0060flash_attn/cute/benchmark.py\u0060 and \u0060flash_attn/utils/benchmark.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 9 separate duplicated blocks between them, totalling at least 194 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/benchmark.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"4eb7dd90b2a4d7bcad7ec5aefe36e8c96fc2a217b2c6ecc79aa4bff5856d866e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): flash_attn/models/falcon.py:19-27 | flash_attn/models/gpt.py:996-1002 | flash_attn/models/gpt_neox.py:19-25 | flash_attn/models/gptj.py:18-24 | flash_attn/models/llama.py:33-41 \u2014 before extracting anything, compare \u0060flash_attn/models/falcon.py\u0060 and \u0060flash_attn/models/gpt.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/falcon.py"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"15f10d29d066821dafc8473bf5c07fbf4fa6306979ca0b587a06f6fc53188ef5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): flash_attn/bert_padding.py:115-122 | flash_attn/bert_padding.py:189-196 | hopper/padding.py:25-31 \u2014 before extracting anything, compare \u0060flash_attn/bert_padding.py\u0060 and \u0060hopper/padding.py\u0060 as WHOLE FILES: 82% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/bert_padding.py:115\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/bert_padding.py"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4c94c00cd3cd134558b379ffa81e231fce7662a2b62e3b40fdb0013790d8ad6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 3): flash_attn/cute/flash_bwd_sm100.py:242-247 | flash_attn/cute/flash_bwd_sm90.py:86-92 | flash_attn/cute/flash_fwd.py:83-89 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e3a7de264a5412e558afd062b3fc778e5146392c1ebf23fe2f133274f143c6e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): flash_attn/models/baichuan.py:71-78 | flash_attn/models/gptj.py:55-62 | flash_attn/models/llama.py:72-78 \u2014 before extracting anything, compare \u0060flash_attn/models/baichuan.py\u0060 and \u0060flash_attn/models/llama.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 139 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/models/baichuan.py:71\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/baichuan.py"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"86855a0cbb176aaf23dc2e1b9884993ba265ddb3e973dfba8d7ab433d9f33f79"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): flash_attn/cute/flash_bwd.py:761-767 | flash_attn/cute/flash_bwd.py:775-781 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd.py:761\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd.py"},"region":{"startLine":761}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e7f6e76e840bfbd179ca78cd8fa4da4696abd3f9f707c92163bda1fe5d708fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_sm100.py:1283-1289 | flash_attn/cute/flash_fwd_mla_sm100.py:1033-1039 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_sm100.py:1283\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1283}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf1335e73c3ed550397e62611dff9fbc7ea7d5b54f86a9e21f595f954c27a54d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_sm100.py:2149-2155 | flash_attn/cute/flash_bwd_mla_sm100.py:2162-2168 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":2149}}}],"partialFingerprints":{"codehealthFindingId/v1":"51865c6cc6f7b109f12f4c8d9055704c50eb5decdc99b6d1f5c76c79c72ab869"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): flash_attn/cute/flash_bwd_sm100.py:5184-5190 | flash_attn/cute/flash_bwd_sm100.py:5242-5248 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":5184}}}],"partialFingerprints":{"codehealthFindingId/v1":"62c511cd41381f7e9f2f3f0770aa97d13a8beaf87ef348f9edd8335ca66efb3f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): flash_attn/cute/flash_bwd_sm90.py:1018-1024 | flash_attn/cute/flash_fwd_sm90.py:795-803 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_sm90.py:1018\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm90.py"},"region":{"startLine":1018}}}],"partialFingerprints":{"codehealthFindingId/v1":"78742ad381b1f1a9cae774e1a79d3eea980424a186c88e5da9ad19d5016f95fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): flash_attn/cute/flash_bwd_sm90.py:1245-1251 | flash_attn/cute/flash_fwd_sm90.py:1052-1058 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_sm90.py:1245\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm90.py"},"region":{"startLine":1245}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5967af2506df154283ece87a4bbba4693b5871b27acf06e60e3fa6c797765b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:2248-2254 | flash_attn/cute/flash_fwd_mla_sm100.py:3263-3269 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":2248}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c1db6e8836d81f130f2a368f8d3ba5e419fdda71f9e80f64ffb84512ca25806"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_sm100.py:1035-1041 | flash_attn/cute/flash_fwd_sm90.py:579-585 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_sm100.py:1035\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":1035}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec857b42b48d7a1a3912584b09d88ffc0dc5b5f1b5cbf6ac781d8b43e48f037f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): flash_attn/cute/flash_fwd_sm100.py:797-803 | flash_attn/cute/flash_fwd_sm90.py:358-364 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":797}}}],"partialFingerprints":{"codehealthFindingId/v1":"59b3839e00a374b40dc67078402a1346eaab97cc76372e29c88bcd18b1e43acd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): flash_attn/cute/sm90_config_search.py:225-231 | flash_attn/cute/sm90_config_search.py:337-343 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/sm90_config_search.py:225\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/sm90_config_search.py"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"650420c69cecc037477639b8128beb5a0d9a4c3547b35c9a6180e64ddf554f36"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): flash_attn/cute/tile_scheduler.py:803-809 | flash_attn/cute/tile_scheduler.py:1493-1499 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/tile_scheduler.py"},"region":{"startLine":803}}}],"partialFingerprints":{"codehealthFindingId/v1":"05f9f5721da53ec17bef9da16d8eac3c5a5e7e6e7c78ef23bac9061887e40a69"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): flash_attn/models/llama.py:88-94 | flash_attn/models/opt.py:63-69 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/models/llama.py:88\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/llama.py"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c74e0ff00fba9a8ea6a4d1721435add73697675cb5102b76f8e73850b0019f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): flash_attn/modules/mlp.py:113-119 | flash_attn/modules/mlp.py:156-162 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/mlp.py"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c712b5f42006f5176d299d271a11e9b6c3738e80cc5577c2f47cf676fabd873"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): flash_attn/ops/layer_norm.py:776-782 | flash_attn/ops/rms_norm.py:151-157 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/layer_norm.py"},"region":{"startLine":776}}}],"partialFingerprints":{"codehealthFindingId/v1":"e66d2b0ade6a0e1aff1b68c4e061377bbb247834c2656340c58d480d63a4d415"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 2): flash_attn/ops/triton/linear.py:248-254 | flash_attn/ops/triton/linear.py:520-525 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/ops/triton/linear.py"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cd318b8f1e31b384770cb74f16550b8fb07d6799251f94e098aa937922f5183"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): hopper/setup.py:329-335 | setup.py:85-91 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060hopper/setup.py:329\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"setup.py"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"60931cc9d412b6ff4373906191c8375b3c2ce3c41ba47c896d5817974bf1ec99"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): hopper/setup.py:707-713 | setup.py:675-681 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"setup.py"},"region":{"startLine":675}}}],"partialFingerprints":{"codehealthFindingId/v1":"812f44a08bb6d5046688b00da8df0b956f4fe030e4dbc53e000ff0687c94d66d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): training/src/eval.py:95-101 | training/src/train.py:57-63 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/eval.py"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"617e030a9a685c8fca54db904f8bf88e8bc7a235621055b49ced040d1aa774a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 9): flash_attn/models/bigcode.py:16-22 | flash_attn/models/falcon.py:19-27 | flash_attn/models/gpt.py:932-938 | flash_attn/models/gpt.py:996-1002 | flash_attn/models/gpt_neox.py:19-25 | flash_attn/models/gptj.py:18-24 | flash_attn/models/llama.py:33-41 | flash_attn/models/llama.py:124-130 | flash_attn/models/llama.py:233-238 \u2014 there are 9 copies across 6 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 9 sites; resolving a subset leaves the remainder to drift apart. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/models/llama.py:27\u0060 calls \u0060key_mapping_layers\u0060, \u0060startswith\u0060, \u0060OrderedDict\u0060 and \u0060flash_attn/models/llama.py:120\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/bigcode.py"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c62480c2be5bd82f378e711d2fca31e34aeb32e78da8573000fc0b19eb791f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): flash_attn/models/btlm.py:34-39 | flash_attn/models/gpt.py:946-951 | flash_attn/models/gpt.py:960-965 | flash_attn/models/gpt_neox.py:55-64 | flash_attn/models/gptj.py:49-58 \u2014 before extracting anything, compare \u0060flash_attn/models/btlm.py\u0060 and \u0060flash_attn/models/gpt.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/btlm.py"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"b71af81d0e2210a575ccff4b78d69674812c321b33a62bfbfde8847a8db8ffc4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): flash_attn/cute/flash_bwd_mla_sm100.py:1541-1547 | flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:1060-1065 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1486-1492 | flash_attn/cute/flash_fwd_mla_sm100.py:1275-1281 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 4 call sites, so a change lands once. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060flash_attn/cute/flash_fwd_mla_sm100.py:1282\u0060 calls \u0060make_tensor\u0060 and \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1493\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1541}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b60f321a7bf8b3ec5d215714acef59b26d4a1938888f98a9d41a33398aa7099"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1292-1298 | flash_attn/cute/flash_fwd_mla_sm100.py:1036-1041 | flash_attn/cute/flash_fwd_sm100.py:1303-1308 | flash_attn/cute/flash_fwd_sm90.py:580-585 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py\u0060 and \u0060flash_attn/cute/flash_fwd_mla_sm100.py\u0060 as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 565 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1292\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":1292}}}],"partialFingerprints":{"codehealthFindingId/v1":"29e93941f2b56c5bcb9c5f88d2f28737557f37d1fe2d34e78bef1508529cb30d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): flash_attn/cute/benchmark_flash_attention_fp8.py:109-114 | hopper/benchmark_flash_attention_fp8.py:55-60 \u2014 before extracting anything, compare \u0060flash_attn/cute/benchmark_flash_attention_fp8.py\u0060 and \u0060hopper/benchmark_flash_attention_fp8.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 146 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060hopper/benchmark_flash_attention_fp8.py:61\u0060 calls \u0060empty\u0060 and \u0060flash_attn/cute/benchmark_flash_attention_fp8.py:115\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/benchmark_flash_attention_fp8.py"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa0859be630890fbbdaf35e913fe77edded4c4dba7b3fb168103c401067524db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): flash_attn/cute/blackwell_helpers.py:759-770 | flash_attn/cute/blackwell_helpers.py:833-844 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/blackwell_helpers.py:759\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060flash_attn/cute/blackwell_helpers.py:771\u0060 calls \u0060isinstance\u0060 and \u0060flash_attn/cute/blackwell_helpers.py:845\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/blackwell_helpers.py"},"region":{"startLine":759}}}],"partialFingerprints":{"codehealthFindingId/v1":"910ea87def19a973c0e8d1b66f278c827101fa91da5792d9c1c0b2818cea2b7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_sm100.py:585-592 | flash_attn/cute/flash_fwd_mla_sm100.py:456-463 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":585}}}],"partialFingerprints":{"codehealthFindingId/v1":"14a85dcc2b5633cc55601c48bd6de3c5e013cef6edb1545fc016deb35e12aa2a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): flash_attn/cute/flash_bwd_sm100.py:4347-4352 | flash_attn/cute/flash_bwd_sm100.py:4438-4443 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":4347}}}],"partialFingerprints":{"codehealthFindingId/v1":"51b799672e0612a9cb4508d29100d72972e77c2bc955d78ca6dff3f22425e4c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): flash_attn/cute/flash_fwd_decode_sm100.py:1435-1440 | flash_attn/cute/flash_fwd_decode_sm100.py:1467-1472 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_decode_sm100.py"},"region":{"startLine":1435}}}],"partialFingerprints":{"codehealthFindingId/v1":"07c0eff6bb6af444576d16105a548bdaa0c32f3a52b34bd29fe8c6d2769a214a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_sm100.py:646-651 | flash_attn/cute/flash_fwd_mla_sm100.py:670-676 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_sm100.py:646\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":646}}}],"partialFingerprints":{"codehealthFindingId/v1":"9749ceb7397f72c0a4599d7c084d9d43552eb060e489518b9fbba11b7b5a0229"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): flash_attn/cute/tile_scheduler.py:757-762 | flash_attn/cute/tile_scheduler.py:1422-1427 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/tile_scheduler.py:757\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/tile_scheduler.py"},"region":{"startLine":757}}}],"partialFingerprints":{"codehealthFindingId/v1":"743396bc2feaa0a6aed969e3c93bb2d8f40ebc3cbdf8b6e69a9d101eb6f28403"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): flash_attn/models/gpt.py:704-709 | flash_attn/models/gpt.py:825-830 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/gpt.py"},"region":{"startLine":704}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0d7b093c98504ad6990307be175122375a1f94f24be29c6bbdb6c06e7fcae08"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 6): flash_attn/cute/flash_bwd.py:761-765 | flash_attn/cute/flash_bwd.py:774-779 | flash_attn/cute/flash_bwd_mla_sm100.py:1428-1442 | flash_attn/cute/flash_bwd_sm90.py:1369-1385 | flash_attn/cute/flash_fwd_sm100.py:1522-1536 | flash_attn/cute/interface.py:3621-3635 \u2014 there are 6 copies across 5 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd.py:761\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd.py"},"region":{"startLine":761}}}],"partialFingerprints":{"codehealthFindingId/v1":"8738ef55a3cb49c441353839bb0110133fb0371a16d0414ca54b20e8abd38a71"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u20135 lines \u00D7 6): flash_attn/models/baichuan.py:74-78 | flash_attn/models/gptj.py:58-62 | flash_attn/models/llama.py:74-78 | flash_attn/models/llama.py:90-94 | flash_attn/models/llama.py:197-200 | flash_attn/models/opt.py:65-69 \u2014 before extracting anything, compare \u0060flash_attn/models/baichuan.py\u0060 and \u0060flash_attn/models/llama.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 139 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/baichuan.py"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"61bf01f9d8307dc204ec2727c8661ef72d36d55c9236069e027ea51ca9831a25"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): flash_attn/cute/flash_bwd_sm100.py:1144-1148 | flash_attn/cute/flash_bwd_sm90.py:546-550 | flash_attn/cute/flash_fwd_sm100.py:800-804 | flash_attn/cute/flash_fwd_sm90.py:361-365 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 4 call sites, so a change lands once. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/cute/flash_fwd_sm90.py:359\u0060 calls \u0060const_expr\u0060 and \u0060flash_attn/cute/flash_bwd_sm100.py:1143\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":1144}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa94e7c2a74d44d3845cbe98349060e1db8ce1b4f2c3dc31ce71097f4502ae77"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): flash_attn/cute/flash_bwd_sm100.py:2477-2483 | flash_attn/cute/flash_bwd_sm90.py:921-927 | flash_attn/cute/flash_fwd_sm90.py:716-722 | flash_attn/cute/tensormap_utils.py:20-26 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 4 call sites, so a change lands once. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060flash_attn/cute/flash_bwd_sm100.py:2484\u0060 calls \u0060const_expr\u0060 and \u0060flash_attn/cute/flash_bwd_sm90.py:928\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":2477}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ae2e5285c5c34eab82bce405fc67172442557ed8880b35fd36d8ef713f41213"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): flash_attn/flash_attn_interface.py:513-518 | flash_attn/flash_attn_interface.py:603-608 | flash_attn/flash_attn_interface.py:693-698 | flash_attn/flash_attn_interface.py:793-798 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060flash_attn/flash_attn_interface.py:692\u0060 calls \u0060empty_like\u0060 and \u0060flash_attn/flash_attn_interface.py:512\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_interface.py"},"region":{"startLine":513}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a60550ebb0fff2cf52d05e80375077379bc296c9ff30c9e35f16524aa510212"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): flash_attn/models/bert.py:535-539 | flash_attn/models/gpt.py:993-997 | flash_attn/models/llama.py:30-36 | flash_attn/models/opt.py:57-63 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 4 call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/bert.py"},"region":{"startLine":535}}}],"partialFingerprints":{"codehealthFindingId/v1":"646f1a17535ca65b8f8d9dcedf5f2e580b44a2b83185efba3968bb04e4674057"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): flash_attn/cute/flash_bwd_mla_sm100.py:1285-1289 | flash_attn/cute/flash_fwd_mla_sm100.py:1035-1040 | flash_attn/cute/flash_fwd_sm90.py:579-584 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_sm100.py:1285\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1285}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bf4a003d4b8dba06adc456e3d624071e90e8df26a186b960533bb426ad48984"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): flash_attn/cute/flash_fwd.py:678-683 | flash_attn/cute/flash_fwd_sm100.py:654-659 | flash_attn/cute/flash_fwd_sm90.py:266-271 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd.py"},"region":{"startLine":678}}}],"partialFingerprints":{"codehealthFindingId/v1":"9982bebc64dc9b2b758a0fd109cec40b2a22d9dd2d6fcd7ff9ad7f192418b624"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:657-661 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:984-988 | flash_attn/cute/flash_fwd_mla_sm100.py:718-722 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":657}}}],"partialFingerprints":{"codehealthFindingId/v1":"54984ac73f4bd5110aeb24775a08bd62ea130c12886be1c4b52945f9dbd232aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): flash_attn/cute/block_sparsity.py:359-364 | flash_attn/cute/block_sparsity.py:366-370 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/block_sparsity.py:359\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparsity.py"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccd8723fb1626cb30a36bcd05034de875122b0d68752e203b3b3e7e9a0658490"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): flash_attn/cute/config.py:1856-1861 | flash_attn/cute/config.py:3276-3281 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060config\u0060 to \u0060FwdConfig\u0060 in one and \u0060BwdConfig\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/config.py"},"region":{"startLine":1856}}}],"partialFingerprints":{"codehealthFindingId/v1":"46eac780f1b22da375ee1540ac5b38e861902ccd05777060c2ef1bcd8b3bc638"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): flash_attn/cute/flash_bwd.py:1157-1162 | flash_attn/cute/flash_bwd.py:1165-1170 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd.py:1157\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd.py"},"region":{"startLine":1157}}}],"partialFingerprints":{"codehealthFindingId/v1":"5713f4638077081b09f10c859dca13fe6c9bb9775fc8eacfdbec27aefe5ae9d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u20135 lines \u00D7 3): flash_attn/cute/flash_bwd_mla_sm100.py:582-586 | flash_attn/cute/flash_fwd.py:665-666 | flash_attn/cute/flash_fwd_mla_sm100.py:451-457 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_sm100.py:582\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":582}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe50ed9e51ba8cbbee8fd6de9a0208918bd374a44b38a6de33b7e59cbfd6dc43"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_sm100.py:602-606 | flash_attn/cute/flash_fwd_mla_sm100.py:492-496 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":602}}}],"partialFingerprints":{"codehealthFindingId/v1":"64291388b97c1d80a809229728bc5ea7c102e778b18657fa07d27ff7ac669134"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_sm100.py:642-646 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:743-747 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_mla_sm100.py:642\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":642}}}],"partialFingerprints":{"codehealthFindingId/v1":"e51566d9ab2634200e88c00315746062542b462a1d984cc7e541a667dd770e0b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_sm100.py:890-894 | flash_attn/cute/flash_fwd_mla_sm100.py:721-725 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":890}}}],"partialFingerprints":{"codehealthFindingId/v1":"703eee13df7b2ac2eb148fb8689595295dde867f944ef5474464a4731c079e17"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_sm100.py:1704-1708 | flash_attn/cute/flash_fwd_mla_sm100.py:1467-1471 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1704}}}],"partialFingerprints":{"codehealthFindingId/v1":"61144d166a9f13d78e0adabc14a90f2ec2faad859983c2a8f8f27c6ff7f79359"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): flash_attn/cute/flash_bwd_sm100.py:5367-5371 | flash_attn/cute/flash_bwd_sm100.py:5606-5614 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_bwd_sm100.py:5367\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":5367}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4bb759209d0200c91154b62dec96d034ca4dfa11e6406a987fcb39d51c4ea78"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): flash_attn/cute/flash_bwd_sm90.py:540-544 | flash_attn/cute/flash_fwd_sm90.py:353-358 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm90.py"},"region":{"startLine":540}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4f6a73515e1b352065d9b5cf312e5dcb831b4a7d7bf30a39466dc9f9b610d57"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:449-453 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:656-661 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"41dc8df644a757db2f791aee14caed8dfa75748995fe739fb501befa9a39c724"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_sm100.py:850-855 | flash_attn/cute/flash_fwd_mla_sm100.py:588-592 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py\u0060 and \u0060flash_attn/cute/flash_fwd_mla_sm100.py\u0060 as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 565 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":850}}}],"partialFingerprints":{"codehealthFindingId/v1":"449c84ead330d41243a75657da919c2195930b3b34de8f256b9d2ce081306f02"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u20135 lines \u00D7 4): flash_attn/cute/flash_fwd_mla_1cta_sm100.py:813-816 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:2199-2203 | flash_attn/cute/flash_fwd_sm100.py:3722-3727 | flash_attn/cute/paged_kv.py:204-207 \u2014 there are 4 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py:813\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":813}}}],"partialFingerprints":{"codehealthFindingId/v1":"727e2bee232a4321ceb56f4dda51ba40c4c30fa84228debf83b4f789ffe08133"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_sm100.py:1550-1554 | flash_attn/cute/flash_fwd_mla_sm100.py:2031-2036 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_mla_sm100.py:2031\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":1550}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d515d8b822a7eb049d468ba2a8e316846634425239f21671463e3a389dc986c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): flash_attn/cute/flash_fwd_sm100.py:895-899 | flash_attn/cute/flash_fwd_sm90.py:378-383 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_sm100.py:895\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":895}}}],"partialFingerprints":{"codehealthFindingId/v1":"52b53e68dac8d58c8662c6f89d923558e291903ad6e49a19abef1a5e7421def2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): flash_attn/cute/flash_fwd_sm100.py:3069-3074 | flash_attn/cute/flash_fwd_sm100.py:3600-3605 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":3069}}}],"partialFingerprints":{"codehealthFindingId/v1":"67a7b15f1839cf8e50b134f7b136d6bf2a76055f125113e58f71dea4972ee6bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): flash_attn/cute/sm90_config_search.py:248-252 | flash_attn/cute/sm90_config_search.py:356-360 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/sm90_config_search.py:248\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/sm90_config_search.py"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"40ef6968ef4588f2d3ea1024b813d0e32037e16014a1ad0afe27a312882fb78f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): flash_attn/cute/softmax.py:627-632 | flash_attn/cute/softmax.py:746-750 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/softmax.py"},"region":{"startLine":627}}}],"partialFingerprints":{"codehealthFindingId/v1":"e67f0984de1f0c14553a7f48a74454b1266aa11ffc62903cb86d35905dc8d20d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u20135 lines \u00D7 3): flash_attn/flash_attn_triton.py:152-156 | flash_attn/flash_attn_triton.py:453-456 | flash_attn/flash_attn_triton.py:470-475 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/flash_attn_triton.py:152\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_triton.py"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c756076ec1c14e75fd005ab49f39c721bff8db0c4792e49ed5803a1b88761d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): flash_attn/flash_blocksparse_attention.py:77-81 | flash_attn/flash_blocksparse_attention.py:124-128 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/flash_blocksparse_attention.py:77\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_blocksparse_attention.py"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"6267660e9a71f53eb47b2aba044931fdcae657c96414980d24fd1a6f6eb21896"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): csrc/fused_dense_lib/setup.py:11-16 | csrc/layer_norm/setup.py:17-22 | hopper/setup.py:339-344 | setup.py:95-100 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"csrc/fused_dense_lib/setup.py"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"8856f8d9856e7d3fbcb5e74a17a9bf59b448423b02f16cc2b5daa20951ffab67"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): csrc/fused_dense_lib/setup.py:20-24 | csrc/layer_norm/setup.py:54-58 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"csrc/fused_dense_lib/setup.py"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"45707c317baca1ee61fec3d9194c17a1d8296e5bea41b70dcefb222d194dd295"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): flash_attn/bert_padding.py:44-53 | flash_attn/cute/testing.py:47-54 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/bert_padding.py"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdbb5bd2249d2a8d089984318deccf0d4685db32f3154c6d685267baf53c2ecb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:1241-1250 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:1224-1233 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py\u0060 as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 508 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":1241}}}],"partialFingerprints":{"codehealthFindingId/v1":"060c565d9382f4be79bc8a05c698b38dd24887ee265f8df00ae13bd68c154547"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:1282-1287 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:1265-1270 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py\u0060 as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 508 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":1282}}}],"partialFingerprints":{"codehealthFindingId/v1":"a49365c47b9f57e9923a6b738919f2a06cf1cc3757b5e3138d9085645c93d5d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_sm100.py:1670-1675 | flash_attn/cute/flash_fwd_mla_sm100.py:1430-1435 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1670}}}],"partialFingerprints":{"codehealthFindingId/v1":"245fcd5eb40a2ab7e2e5963be5b632a11e8c7302463dece641494784389eb29b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_sm100.py:1840-1848 | flash_attn/cute/flash_fwd_mla_sm100.py:1796-1804 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1840}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c65c6f2a9130e37b60795a010acee70cbc882d602ec8788734ce7258d8cf061"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): flash_attn/models/bert.py:303-312 | flash_attn/models/gpt.py:317-326 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/bert.py"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf72463d7c103b9e25e98902f0f6d2a765c2ae2c97f1e46d6aa9d76533eb03f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py:357-361 | flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py:392-396 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py\u0060 and \u0060flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py\u0060 as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 508 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"db278c72bc0cfe3d52a4f98f753a3248ba9d92915306d05039f7ba0acb72cd1d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): flash_attn/cute/flash_bwd_sm100.py:1211-1219 | flash_attn/cute/flash_bwd_sm100.py:1301-1309 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":1211}}}],"partialFingerprints":{"codehealthFindingId/v1":"421bc9a304ee7d7854e89fed64a5b524bdc0d568d732ae27159513229206bc0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): flash_attn/cute/flash_bwd_sm100.py:4681-4685 | flash_attn/cute/flash_bwd_sm100.py:4687-4691 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":4681}}}],"partialFingerprints":{"codehealthFindingId/v1":"fae3a0b1c20c60e2709331999fda54fb40c0b7d36131cd50ca5e0ca19bcbb8a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:867-871 | flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1223-1227 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":867}}}],"partialFingerprints":{"codehealthFindingId/v1":"add78ec14fbb0be8f9420100aa20aa35cd4910730cd535eded7a961cfc9463da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py:2237-2241 | flash_attn/cute/flash_fwd_mla_sm100.py:3257-3261 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":2237}}}],"partialFingerprints":{"codehealthFindingId/v1":"94b5bb09b9b499d9ae15c75b6d912bc8a42d455a394d6eb3f697ec990938a771"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): flash_attn/cute/flash_fwd_mla_1cta_sm100.py:1581-1585 | flash_attn/cute/flash_fwd_mla_sm100.py:2347-2351 \u2014 before extracting anything, compare \u0060flash_attn/cute/flash_fwd_mla_1cta_sm100.py\u0060 and \u0060flash_attn/cute/flash_fwd_mla_sm100.py\u0060 as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 565 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":1581}}}],"partialFingerprints":{"codehealthFindingId/v1":"53d00a372d498d0e4e6785d6e3880389245301f3432ef1a096bdba8d4cb8d968"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): flash_attn/cute/flash_fwd_sm100.py:3076-3080 | flash_attn/cute/flash_fwd_sm100.py:3607-3611 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/flash_fwd_sm100.py:3076\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":3076}}}],"partialFingerprints":{"codehealthFindingId/v1":"665ad06bff27c0f1bd76268e74b6bd2f0ed44dfbcfe3963b0187ce78143dc748"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): flash_attn/cute/interface.py:1784-1788 | flash_attn/cute/interface.py:1906-1910 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060flash_attn/cute/interface.py:1784\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/interface.py"},"region":{"startLine":1784}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb80d6a784eef9c4aa0374f6ee5f729b508f7cfa2f8d1895c26ccb4fc7dd39ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): flash_attn/flash_attn_interface.py:136-141 | flash_attn/flash_attn_interface.py:236-241 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_interface.py"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"461e9fe50b51636c759206fae7f97991d7243e327025a3b5e741ac686c657aa8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): flash_attn/flash_attn_interface.py:883-887 | flash_attn/flash_attn_interface.py:984-988 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_interface.py"},"region":{"startLine":883}}}],"partialFingerprints":{"codehealthFindingId/v1":"49de1608beed511fe61f98ef36ca935fabb47b37d8b1210dac07bfcceeccb484"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): flash_attn/models/bigcode.py:173-178 | flash_attn/models/bigcode.py:181-186 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/bigcode.py"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"93b94ea7b359b3cac25845285d05f28360aa9721570e9f1d0cd8fe89e65e28c4"}},{"ruleId":"D11","level":"error","message":{"text":"Test declared unreliable: test_flash_attn_output: This test is disabled or skipped with a reason naming unreliability \u2014 the repository\u0027s own words: \u0022This test with causal=True is flakey\u0022. A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository\u0027s own test source \u2014 the suite itself was not re-run, since the reliability runner does not support this ecosystem.)"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_flash_attn_triton_amd.py"},"region":{"startLine":924}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5d9fb36739630e3e768ee86b550f3b343dcd80841a3bb18a9168a603fa64f92"}},{"ruleId":"D11","level":"error","message":{"text":"Test declared unreliable: test_flash_attn_varlen_output: This test is disabled or skipped with a reason naming unreliability \u2014 the repository\u0027s own words: \u0022This config with dropout is flaky on AMD.\u0022. A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository\u0027s own test source \u2014 the suite itself was not re-run, since the reliability runner does not support this ecosystem.)"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_flash_attn_triton_amd.py"},"region":{"startLine":1196}}}],"partialFingerprints":{"codehealthFindingId/v1":"324c6cc202a7ff9166c17ce3581347352dd6934b331b7c55314f61ff507551f9"}},{"ruleId":"D11","level":"error","message":{"text":"Test declared unreliable: test_flash_attn_splitkv: This test is disabled or skipped with a reason naming unreliability \u2014 the repository\u0027s own words: \u0022This config with is flaky on AMD.\u0022. A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository\u0027s own test source \u2014 the suite itself was not re-run, since the reliability runner does not support this ecosystem.)"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_flash_attn_triton_amd.py"},"region":{"startLine":1797}}}],"partialFingerprints":{"codehealthFindingId/v1":"6276207ef7d4810ffd0517352af846464b563ae258771d3c59c0dc78f3810fbf"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: flash_attn/cute/interface.py: flash_attn/cute/interface.py changed 48 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 212 in interface._flash_attn_fwd at line 567. 3 of those changes were fix/bug commits, and the other 45 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-17 21:29:06 -08:00\u0027 --until=\u00272026-11-15 21:29:06 -08:00\u0027 --full-history --no-merges -- flash_attn/cute/interface.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/interface.py"},"region":{"startLine":567}}}],"partialFingerprints":{"codehealthFindingId/v1":"992b5e152f06bf13467096d536b65a5ca914ad2cbaa8bde36e485385429d287a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: flash_attn/cute/flash_fwd_sm100.py: flash_attn/cute/flash_fwd_sm100.py changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 68 in FlashAttentionForwardSm100.correction_loop at line 2984. 2 of those changes were fix/bug commits, and the other 21 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-17 21:29:06 -08:00\u0027 --until=\u00272026-11-15 21:29:06 -08:00\u0027 --full-history --no-merges -- flash_attn/cute/flash_fwd_sm100.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":2984}}}],"partialFingerprints":{"codehealthFindingId/v1":"71c0f17e1465f1669d181030ea3cc2538e3182c9f9ce235dd775b72c0d74c6b7"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: flash_attn/cute/config.py: flash_attn/cute/config.py changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 73 in config.validate_fwd_config at line 1807. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-17 21:29:06 -08:00\u0027 --until=\u00272026-11-15 21:29:06 -08:00\u0027 --full-history --no-merges -- flash_attn/cute/config.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/config.py"},"region":{"startLine":1807}}}],"partialFingerprints":{"codehealthFindingId/v1":"33978334bd14eca1b1d733216afa00669e8b15b81c45b157f374fdcc249a531a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: flash_attn/cute/flash_bwd_sm100.py: flash_attn/cute/flash_bwd_sm100.py changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 99 in FlashAttentionBackwardSm100.compute_loop at line 3920. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-17 21:29:06 -08:00\u0027 --until=\u00272026-11-15 21:29:06 -08:00\u0027 --full-history --no-merges -- flash_attn/cute/flash_bwd_sm100.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":3920}}}],"partialFingerprints":{"codehealthFindingId/v1":"1872626a145316d126b39c286cf9a1ee87292f460eea33c723f4b6d17abf13f3"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: flash_attn/cute/flash_fwd_mla_sm100.py: flash_attn/cute/flash_fwd_mla_sm100.py changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in FlashAttentionMLAForwardSm100.__call__ at line 390. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-17 21:29:06 -08:00\u0027 --until=\u00272026-11-15 21:29:06 -08:00\u0027 --full-history --no-merges -- flash_attn/cute/flash_fwd_mla_sm100.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"36235a46e53784fc07fd08a44f41cefe45ad7e396c39bb06e4205cc0aabc5cbe"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: flash_attn/cute/flash_bwd_preprocess.py: flash_attn/cute/flash_bwd_preprocess.py changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in FlashAttentionBackwardPreprocess.kernel at line 329. 1 of those changes was a fix/bug commit, and the other 6 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-17 21:29:06 -08:00\u0027 --until=\u00272026-11-15 21:29:06 -08:00\u0027 --full-history --no-merges -- flash_attn/cute/flash_bwd_preprocess.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_preprocess.py"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"3827b7ae70f3004b4987da5b26574ccc7de49e182a41698301429a89880167e9"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: flash_attn/cute/flash_bwd_mla_sm100.py: flash_attn/cute/flash_bwd_mla_sm100.py changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in FlashAttentionSparseMLABackwardSm100.__call__ at line 503. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-17 21:29:06 -08:00\u0027 --until=\u00272026-11-15 21:29:06 -08:00\u0027 --full-history --no-merges -- flash_attn/cute/flash_bwd_mla_sm100.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":503}}}],"partialFingerprints":{"codehealthFindingId/v1":"323e9857f09e4c252b4a4ffb0c5116cdd64087bc2fa882d47f97b6cfd9c28d3d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: flash_attn/cute/flash_fwd_sm90.py: flash_attn/cute/flash_fwd_sm90.py changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in FlashAttentionForwardSm90.__call__ at line 162. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-17 21:29:06 -08:00\u0027 --until=\u00272026-11-15 21:29:06 -08:00\u0027 --full-history --no-merges -- flash_attn/cute/flash_fwd_sm90.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm90.py"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"894941e37f28223e60910a9c189ab27b62fbea7f768f6973ecc0a1ec5697a053"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: flash_attn/cute/flash_bwd_postprocess.py: flash_attn/cute/flash_bwd_postprocess.py changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in FlashAttentionBackwardPostprocess.kernel at line 488. 2 of those changes were fix/bug commits, and the other 6 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-17 21:29:06 -08:00\u0027 --until=\u00272026-11-15 21:29:06 -08:00\u0027 --full-history --no-merges -- flash_attn/cute/flash_bwd_postprocess.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_postprocess.py"},"region":{"startLine":488}}}],"partialFingerprints":{"codehealthFindingId/v1":"c02ab017b4716da367015c13709c8b9dde2040ad7ca8cc7f0d5a0c2a251a1b20"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: flash_attn/cute/mask.py: flash_attn/cute/mask.py changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in AttentionMask.apply_mask_sm100_transposed at line 774. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-17 21:29:06 -08:00\u0027 --until=\u00272026-11-15 21:29:06 -08:00\u0027 --full-history --no-merges -- flash_attn/cute/mask.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/mask.py"},"region":{"startLine":774}}}],"partialFingerprints":{"codehealthFindingId/v1":"b37d25b9808f830d66869958f0ca4c30f86c753e294d80c1c42341395219e798"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: flash_attn/cute/flash_bwd_sm90.py: flash_attn/cute/flash_bwd_sm90.py changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in FlashAttentionBackwardSm90.__call__ at line 355. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-17 21:29:06 -08:00\u0027 --until=\u00272026-11-15 21:29:06 -08:00\u0027 --full-history --no-merges -- flash_attn/cute/flash_bwd_sm90.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm90.py"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"87be61d8b9f2e4ef999e5f82a1f32db251c075c9cb8da1522c42673276356646"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py: flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in dQdQvGemmKernel.__call__ at line 129. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-17 21:29:06 -08:00\u0027 --until=\u00272026-11-15 21:29:06 -08:00\u0027 --full-history --no-merges -- flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"b74688996176c82bbe75eaaf1eab6b4c6fcd14fb69d79aee671e2b3c79487434"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: flash_attn/cute/prepare_scheduler.py: flash_attn/cute/prepare_scheduler.py changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in FlashPrepareScheduler.kernel at line 202. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-17 21:29:06 -08:00\u0027 --until=\u00272026-11-15 21:29:06 -08:00\u0027 --full-history --no-merges -- flash_attn/cute/prepare_scheduler.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/prepare_scheduler.py"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"2aa9a99829ba3d02a998ee4004003711efa33f75fefa09fb7790a116c612650d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: flash_attn/cute/block_sparse_utils.py: flash_attn/cute/block_sparse_utils.py changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in block_sparse_utils.handle_block_sparse_empty_tile_correction_sm100 at line 833. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-17 21:29:06 -08:00\u0027 --until=\u00272026-11-15 21:29:06 -08:00\u0027 --full-history --no-merges -- flash_attn/cute/block_sparse_utils.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparse_utils.py"},"region":{"startLine":833}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c11b3433f892222ad12f42540be15b64f535d6b0d691a5bec2a697f64832409"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 2 significant file(s) lose their only recent owner: benchmarks/clc_bench.py, flash_attn/cute/fa_logging.py. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"fa9b83d0f88074064418d137a7dd2595016f1d22e4a7d8e9e86184e0d44e58b3"}},{"ruleId":"D16","level":"note","message":{"text":"Further sole-owners (lower concentration): 3 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold \u2014 folded into the bus-factor score and metrics (5 single-owned of 95 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 95 of the 126 production source files in this repository met that bar). They are anonymized user #2 (1 file(s)), anonymized user #3 (1 file(s)), anonymized user #4 (1 file(s)) \u2014 spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: flash_attn/cute/topk_gather_kv.py, tools/ci/run_fa4_ci.py, flash_attn/cute/pipeline.py."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6eac528f2429e724e1a97ed868f79eefbcf1888dab4af9a9e673429369bb5b2f"}},{"ruleId":"D17","level":"warning","message":{"text":"HackComment: # HACK: The compiler flag -D_GLIBCXX_USE_CXX11_ABI is set to be the same as \u2014 a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"setup.py"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"b99f286cfdc5bd14996694cc18578d7d03b5ca68687ca9b33138fba13d223c1b"}},{"ruleId":"D17","level":"warning","message":{"text":"HackComment: # HACK: The compiler flag -D_GLIBCXX_USE_CXX11_ABI is set to be the same as \u2014 a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"setup.py"},"region":{"startLine":574}}}],"partialFingerprints":{"codehealthFindingId/v1":"993061e81c5b498e0ea775030f275561dd11a26102cbbe9d83163272b3db0b32"}},{"ruleId":"D17","level":"warning","message":{"text":"HackComment: # # HACK: this is a hack for block-sparse flash attention \u2014 a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/utils/checkpoint.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"224d6d45573a90a9f40449c03f9e57f81f5d8b1b1dc1eb7b8051822584ff4980"}},{"ruleId":"D17","level":"warning","message":{"text":"HackComment: # HACK: this is a hack to get the model to load properly, get rid of \u0027model.\u0027 prefix \u2014 a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/utils/checkpoint.py"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9ac0bfd5818c49ab69ec1ba6aefec2b199adc224ef1ff317524bc158fd6cbb8"}},{"ruleId":"D17","level":"warning","message":{"text":"HackComment: # HACK: something is wrong with the state dict being loaded... \u2014 a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/utils/checkpoint.py"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2f08a6e9ac2e774c27a181f51506b29a8e374b73587cdac9b176d005e9b28de"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: recursive copy to device \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/utils/ddp_zero1.py"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"10e672227de1dc1cc8a7703901afbb25cfe9ec223f62465e91dfc21bcd55c9c8"}},{"ruleId":"D17","level":"warning","message":{"text":"HackComment: # HACK: we don\u0027t call self.scaler.unscale_ here. This is because DistributedFusedAdam \u2014 a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/utils/ddp_zero2.py"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb8321bc9b92c5330e0d1638c1eb03f034e0887a438d1458a0d83a5beb637831"}},{"ruleId":"D17","level":"warning","message":{"text":"FixmeComment: # FIXME base reduction on gate property? \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/models/modules/seq_common.py"},"region":{"startLine":305}}}],"partialFingerprints":{"codehealthFindingId/v1":"7864c928b1b2b8c4dcd1179966f3b290d4909de09b002a013a2ce51427c4a8f8"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: how do we prevent the reset between the epochs? The reset happens on the 1st batch \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/metrics/num_tokens.py"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"a510f916c319de0a9267f5cc3b457c3bbafc55f5c7291e3578e3240585f9e0e0"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: maybe have a backoff strategy: check if the buffer has inf / NaN, in that case \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/distributed/ddp_comm_hooks.py"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccfd945bf40bb0b24e970422371ef419d763577d29adaa4ca6e1fd1d26a491b5"}},{"ruleId":"D17","level":"warning","message":{"text":"HackComment: # [DF] HACK: we need to get the layer that comes after the embedding \u2014 a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/callbacks/causality_monitor.py"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"937767e353cd75d40c6cc80bd9e586cd07d45fa5ce0607e5dc662576215a5823"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: add smaller page sizes when https://github.com/Dao-AILab/flash-attention/pull/824 is merged"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_flash_attn.py"},"region":{"startLine":1591}}}],"partialFingerprints":{"codehealthFindingId/v1":"37d783e3df24396cc92cd072dbc97c01d10359bdc5215719647b4bddd1883a4f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: add smaller page sizes when https://github.com/Dao-AILab/flash-attention/pull/824 is merged"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_flash_attn_triton_amd.py"},"region":{"startLine":1616}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a8ce9057d30c4e1af8a7197d35d975607d434946b4cd7ab01fffb2cdf2ddcd6"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO - move to c\u002B\u002B mha_varlen_fwd() \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_flash_attn_ck.py"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a1541034259c2348c3aeff733fa11ee6e2c6f6a0f13600da607ee7b9ae317aa"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO - move to c\u002B\u002B mha_varlen_fwd() \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_flash_attn_ck.py"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"50d30378615931b72a1ad391dc8a4427ec39fb9c0ff5618aac8a45007c699d4b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO - move to c\u002B\u002B mha_varlen_fwd() \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_flash_attn_ck.py"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c7abc3816a354ac9d5470f009f9116ee57176f0d7e1a15979f474334b697ebf"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO - move to c\u002B\u002B mha_varlen_fwd() \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_flash_attn_ck.py"},"region":{"startLine":633}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d1da7e5e0becb3ce50b7658adb915b0fee43b288e6b74645d177bf117d253ca"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO - use 10 times to check, wait for ck to fix bwd precision issue \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_flash_attn_ck.py"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"3715ff4689dac26d1f26a4a43ae0a44ef2484705fb91723a2dffc5c531e2e369"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO - use 10 times to check, wait for ck to fix bwd precision issue \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_flash_attn_ck.py"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d49002cf23cb36157ca0efef5e561f0e97a8300bb0cc9edffdb4698b3089d30"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO - use 10 times to check, wait for ck to fix bwd precision issue \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_flash_attn_ck.py"},"region":{"startLine":506}}}],"partialFingerprints":{"codehealthFindingId/v1":"59558e80c196be5e809d0cd0f71085f0811868e5fa43f594bc7ed13d9603ac90"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO - use 10 times to check, wait for ck to fix bwd precision issue \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_flash_attn_ck.py"},"region":{"startLine":770}}}],"partialFingerprints":{"codehealthFindingId/v1":"1414cc3098b31940d95d43cfebff3262de6970563b975e3965162f0168270345"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO - use 10 times to check, wait for ck to fix bwd precision issue \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_flash_attn_ck.py"},"region":{"startLine":869}}}],"partialFingerprints":{"codehealthFindingId/v1":"05f8c7efb378f09cb17da13e8564bed0fface5525d1cd2c09bf1f23c07cceaf4"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO - use 10 times to check, wait for ck to fix bwd precision issue \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_flash_attn_ck.py"},"region":{"startLine":1025}}}],"partialFingerprints":{"codehealthFindingId/v1":"92f42ddd0e658beade045509718bac4ad1a1f52f84f1ac34eeca79a31e93ef1b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO - support splitkv \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_flash_attn_ck.py"},"region":{"startLine":1031}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c1a035af289b024867a6418a0290e2991656efce08547ec177e2eec983764e2"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO - Support has_leftpad \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_flash_attn_ck.py"},"region":{"startLine":1035}}}],"partialFingerprints":{"codehealthFindingId/v1":"e89b97ca5332a50ab56894491c49525262863114fd362a75cd603ed535fa7134"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO - 1 or 2 might fail, need to check \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_flash_attn_ck.py"},"region":{"startLine":1379}}}],"partialFingerprints":{"codehealthFindingId/v1":"4900349a547b3ff67353f433cf126c7bc83692b52e2b35b4d32910d82d1ccd23"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Avoid duplicate code. Modularize the comparison of two forward pass diffs. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/models/test_llama.py"},"region":{"startLine":591}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebdd9c2155820b08fa4a28f12af607ed4a4cfbd7e025210a1ac9be51aa8cac98"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: if top_k = 1 we can simplify things and only work with indices \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/utils/generation.py"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c79dd7b2a16c487860c9edb2639f395b38a89386c5e947188ffaf3848cdf67f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: in the case of batched decoding where each sequence has a different length, \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/utils/generation.py"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c7284d44b95c4dbfdaaf682f275cc6abf513f9f0179c95f09d970892429513d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: we\u0027re using the fact that batch_size == 1 \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/utils/generation.py"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"0486ee943cb0b955fe84427c3b2810b16c4a4be3f87c4a808e0ff045709595b5"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: check eos_token_id \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/utils/generation.py"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf8a9aa976d2181955d08ba0791073fb6ac3c6f2f2e5fb5589f17e6daf7493b4"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TD [2023-01-07]: TODO: During training, if sequence_parallel is False and dropout != 0.0, \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/block.py"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"10488c1a0d7c3bf8864e6be19408e4e4626ccb292815ceea47f9d1d14e587369"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TD [2023-01-07]: TODO: During training, if sequence_parallel is False and dropout != 0.0, \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/block.py"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c92493ce0dd37dd582b4748687d826eab6b7e1b15639cce7c7853cdd0cbc829"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Ideally we should only do the allgather / allreduce once for \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/block.py"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3e14440aceb83682d6b8a091c42c511d8a0ae60002e06e6a6e5da54564cabf4"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this only uses seqlen_offset and not lengths_per_sample. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/mha.py"},"region":{"startLine":549}}}],"partialFingerprints":{"codehealthFindingId/v1":"b416b4873220cbba12a547b74660259ec5f92d7d21cc8317f1fae01cb6410a4e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this only uses seqlen_offset and not lengths_per_sample. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/mha.py"},"region":{"startLine":885}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d2ac5c3de7ada81059492e93e71174ef4fd628c18e28905f2411bd70ab71ba8"}},{"ruleId":"D17","level":"warning","message":{"text":"HackComment: # HACK: the config doesn\u0027t have say whether it\u0027s rotary or alibi. \u2014 a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/baichuan.py"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"54bac27bf3f1bdfb7702b887d2eaecb3650e5ee036dae15dc1779e6add420613"}},{"ruleId":"D17","level":"warning","message":{"text":"HackComment: # HACK: the config doesn\u0027t have say whether it uses norm head. \u2014 a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/baichuan.py"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5ab2b04755e0382b3fcad6dae2c762fa96b736852a2fc36375c4f36517c58b3"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: add support for multi-head attention \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/bigcode.py"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"daddff1d55e5f8e76a530368b60d315d2ec77b4f5149fdd29ea2b9e99c4a7728"}},{"ruleId":"D17","level":"warning","message":{"text":"HackComment: # HACK: the 40b config has 2 LN per layer instead of 1, but that\u0027s not reflected in the config. \u2014 a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/falcon.py"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"aac178e0bc512dd4eabe719c07b694a9927102e81520521755c6a714f69bf9bb"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: do we set swizzle to be 3 here explicitly? \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd.py"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"800cb534951b05d0ce5d9b90092ddee2c5e87599457d0efbb915a4fbebcb8ea7"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: the case where there\u0027s no sP \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd.py"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7f6e36b3d0afbeeba169c0dd20227e82b8276aefeb19f38a087bb05453a68a7"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: return early if m_block_max == 0 \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd.py"},"region":{"startLine":564}}}],"partialFingerprints":{"codehealthFindingId/v1":"938489516d03b5714496aabd230f7bee936a6891c6d07289cf28e2bac47febac"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: should this be smem_copy_atom_transposed? \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd.py"},"region":{"startLine":693}}}],"partialFingerprints":{"codehealthFindingId/v1":"99f9d0865162ef5f7ac92d860fecbe57ba8d821add149bd877ee88bf111fac48"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: what\u0027s the number of bits? What if SdP_swapAB \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd.py"},"region":{"startLine":706}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3a5e9c071a88a64dd0615fd9eb8ddbcc7d7a449582d3bab25be24607b89d392"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd.py"},"region":{"startLine":1137}}}],"partialFingerprints":{"codehealthFindingId/v1":"7df7052f11236a0753742a5c62ef0bfdd4ad9c9d6e3fd0841953776b34a78eeb"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # ---- pipeline stages ---- TODO: tune these \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"f20af8b35e56d003279bcd6b376095b52e46c0a9e283e692075c8a64cec959fa"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # todo: ablate wait -\u003E try_wait \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":2908}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bd62734d468721ebafe86bf8290a475d4d9e4a30287dc5f455cc24fd1efc894"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: record meaning of hard-coded values \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":3259}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7b6285b607c1c9806c88cdcb399a54e29eff1224e35c2da64ffeb0dc1b0eb91"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: currently hard-coded \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_postprocess.py"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"62a3b6cd6ae1f08b0517fcfd77b58d82d27bc34794228c6dfec581f133e6ca2e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this is hard-coded for hdim 128 \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_postprocess.py"},"region":{"startLine":362}}}],"partialFingerprints":{"codehealthFindingId/v1":"b804d66e81be74f412eefd7d911a33fb389ebcd629682edf513c6fcac94a7253"}},{"ruleId":"D17","level":"warning","message":{"text":"HackComment: # HACK: Compiler doesn\u0027t seem to recognize that padding \u2014 a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_postprocess.py"},"region":{"startLine":623}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b5b19668e807495cec6cb0c901add15c9267b2d4446cdc970244d996c177e4c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: check OOB when reading from smem if kBlockM isn\u0027t evenly tiled \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_postprocess.py"},"region":{"startLine":761}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b4329da222cac728a89f396eb8d5268fd7d97d81bd5a2745adb1e0cc6ad2b4e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # todo: try 32/1 or 48/2 for 2cta d=192 dv=128 \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"d49b2b2cbda615f913f048263c21734f24a3aaae0d5c8a5c256133cfcf0adf15"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: condition mask_seqlen \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":4183}}}],"partialFingerprints":{"codehealthFindingId/v1":"7892cf96fc97c1b09c2beb26aacef416f697c2820a25d6eb00c1c38a116d6d52"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: assert that sVaccum and sKaccum don\u0027t overflow smem \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm90.py"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"5738d89a36aa8b2ab1f776a5d7312cd6e228c046fa9a04054aa10f09b0c3a9c8"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: sm86 and sm89 \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd.py"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"370a9b2ba07f84a6a671ebd7f85cbf0bcf3353a22daf0051f3b09a2b5d547c74"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: need a different layout for O if O dtype is not the same as V dtype \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd.py"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d5be80305e0426b85066412c8e8639785f2428533f7ae67d2a812d2fb2a3deb"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: local \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd.py"},"region":{"startLine":1070}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad5837917c0d9fe16f2fec80ea10f685012bbfd4c75b863745be3bb40510ee34"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: early exit for single split if dynamic \u2014 for now always merge so the \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_combine.py"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bdf9b75b35756df21911aa58407b59920ec8d6a81747df31b053ee95702859d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: add asserts \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":645}}}],"partialFingerprints":{"codehealthFindingId/v1":"742648d8049ed0ac7f82e65c0718fac867b375ab56c0e7ea30da89e3c0d1e6d3"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # todo: split_kv \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":717}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d055ee81d7924875c73bab9612e37672f1627deb959d296cd8a9d714ce02c9e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: fix r2p for 2cta \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_sm100.py"},"region":{"startLine":2701}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b0edcbe50bc4857bf55451d6077f40c8d8660315ad615600aabc140978597df"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: we prob don\u0027t need most of what\u0027s in _setup_attributes \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm90.py"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4ff631e1428d16726828cefe071350c83ff2e9c4e5046e1bfc8df58028caceb"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: dispatch to DynamicPersistentVarlenScheduler when appropriate \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm90.py"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddd02ab32029016c2f7658839c01a0cd6f3bdb6c0e15fb1900fe74e71e375712"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: mcast \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm90.py"},"region":{"startLine":794}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bb263265f320ed79d6a514ccca2828bbafb4de0af09feaa39b57a453db72800"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: check @can_implement \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/interface.py"},"region":{"startLine":1507}}}],"partialFingerprints":{"codehealthFindingId/v1":"123d027f55f422479070ea67fb3c432815c8d590a4f06112394e2705d8dd7ba6"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: check @can_implement \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/interface.py"},"region":{"startLine":2694}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ab1ecf7371ce64ae1b2c56b544fb43e8bd68f7d4847e0903473987389da2b84"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: we can deal w this by using 128 threads instead \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/interface.py"},"region":{"startLine":4097}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8c66e840d569d70ab365a9384f235234da84ae81393113276a39e749a8749f3"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: find more transparent solution \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/mask.py"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"adeb77d666400a44123d6071f454b41439f7c62951820abf5d1dc3c65fbc66c1"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: find more transparent solution \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/mask.py"},"region":{"startLine":641}}}],"partialFingerprints":{"codehealthFindingId/v1":"363852ade36b98033b5cb2bc3afa3e6231142f2bc01bc3f441b761cf5243de85"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Implement sort logic \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/prepare_scheduler.py"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf42895d8327ce964bea1b2c78d9fcd30c0c9f89b36eb6c7ad3654c2110b6e49"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this hard-codes the fact that we only use cluster = (1, 1) or (2, 1) \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/tile_scheduler.py"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"7eb7449651ccc16f86a96e2f805e5f44a22808b6493111cdf7875bcf9f6c0cdf"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: is there any case where num_m_blocks is 0? \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/tile_scheduler.py"},"region":{"startLine":1230}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a7b45ebb3acdf194e3657829b4bdfed49f90e31ac6a6ede943d188f96763cf9"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: by right we should read the seqlen_kv but we\u0027re assuming seqlen_q == seqlen_k here \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/tile_scheduler.py"},"region":{"startLine":1240}}}],"partialFingerprints":{"codehealthFindingId/v1":"38b42d40a448bc204ad442908cc5f9f39610db34acaa6d2e6e130e0945632e76"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: support non-trivial cluster shapes in a follow-on PR \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/tile_scheduler.py"},"region":{"startLine":1560}}}],"partialFingerprints":{"codehealthFindingId/v1":"e71cb366fcaa28836b04a4b01145a7df498f7363666fe330118eac292b837ac6"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: check that the ex2_emulation_2 produces the same SASS as the ptx version \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/utils.py"},"region":{"startLine":843}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ec25157a5506d224d2f51104b18d08fc0b7f359a9e94e22b8d64d78574f3805"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: \u0060flash_attn/cute\u0060 (55305 LoC, 156 module-visible types across 1 directories) overshoots its size bounds. 2 of 6 build unit(s) (Python) overshoot their size bounds, lowering Project Cohesion to 3.6/10. Review these for cohesion \u2014 draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/pyproject.toml"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4619b36484d7940d93036e7f4329a96305c30852a814ed267c1071205d92bf40"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: \u0060(repository root)\u0060 (8734 LoC, 94 module-visible types across 18 directories) overshoots its size bounds. 2 of 6 build unit(s) (Python) overshoot their size bounds, lowering Project Cohesion to 3.6/10. Review these for cohesion \u2014 draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"setup.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"abe47371f9c2f5de74296306cc08014294bcb5a4d980daf68004ee575618d83e"}},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"654ca6d0859e42f70c80f8f02f58b7f1a745d15a3f74a17041e00275ed49251f"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"cd164c68254d011992e774e44c2d0f2a3ade1c3e04bad775a0be5890ad0f0515"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c103a75cdb17cd03bbeac4a23173b28961cfb958ba2714a07293f0b413ea7e50"},"taxa":[{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"cbdd7ccba761fef67865ffbd3b16aa40312707577e9d1350f626b87b786433f0"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6f22c545c2a8ba9a28597876b2a4bcd5d5ed46641aa8cb88bf92ab7cb26ac189"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b34f71acd93e8827f4d734d98d86e6e0bc65d1e9372d3074ae97255c41665935"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a8ba36886d3c9926597ef2be836cb05e7c78fba28a1f7ed3cd70bb7248bed420"},"taxa":[{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"2f5107e336e87403c0dcec92aa85e880c53c6819d6baa868a3cdd325923fad49"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a2b55bf63350ec937a0531c40a5755c7de8ab45a45c0fa5ae66d7fe8563d09eb"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e926347b5bd9890f646c097be9ae670e2b97a7572ffef0dfb8a9b49017f8401f"},"taxa":[{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b7716a96f312ae4e77261d16eb9d39bd664017b7ef56167ddfd6a29ecd4e2ffd"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"86323ad29e500703884fcbf3a2b3995879a662051fd35e1afcda3d50f4cfc5c6"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a84738f4e9262f206fb13b82a8955f711712ce9f471dccbdf7da9fd7fcf1bedc"},"taxa":[{"id":"CWE-522","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A06:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ac6075e701eea82767581228545eff8bcc28849c0a89e52c4c0e345d27396705"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a1f31e3fc38e806c632551480508ae27b2701acddad0a9d80c648ba1fc9463b3"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"482e3b19efd040fb2215efbc5e65f5b9996234817368c5a9198eb89910e46231"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c1bb7814097052b3b9e49cf20adb5ffa3c94da3abc00863955683dc4725b2e91"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1628972a2256e3db1a84c557ad86ea62f94b02ad21839bf65426eb6748757d45"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d71a886b02dae387317a8233c0b7dd3d06ac1e68efdc351793a8176dc7bef785"},"taxa":[{"id":"CWE-522","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A06:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"bc3ce82473d4efcea661de9f004b4bf93869c4cb3306dfa5769203fb80442f83"},"taxa":[{"id":"CWE-522","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A06:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a0250a5fad242028e33613e326c0109907545c66811526beb2bba86ddd1fe7e6"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"26b640d2f7b23c649e67620f117495462750aa7fb0112047bf325dfa5f4eb785"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"33c37b3fdd307f15c8108230d132c1dc79e8c13d7387bcca55a5b58dbb05864b"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ad2d0809ee2b4526783612d6d01922381396b52dad512f871c2f8728b0265265"},"taxa":[{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"902eb0650237d79b919748ee3e7bc550d36debd1e2652a3391e8b5c7d020c101"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6509e3ccdef761aee637de24a14ba04df35494579196d389df87cd57c67e6b75"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ab863ed3a6bb81f6ba2fe6974044bee68663bdb53c6d5bf59ec196f4d1497565"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ff52cf46c53f56dc2997384f6fd6cdca8338ff6297cc181f9924ecdcca66b288"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ebf830027b4550bac272d5bdcea95cd65b29774d3384777c5f383b49e90813b9"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"fa4da8c833586381551b21d998ab341d19dc900c6e27883eea9d46b9c03a0d9b"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"82fc27f2cb1fbb46227aec084a3181ce93a6ad2b4ca29af6fc0abf7e3f5e9877"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"faffac92e876122ea19cadee80a7e33eeb82e8359e30d2f0a058eb0ec9751ce1"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7bc4acd94ce5afa55efbea82e13157481316d09c092e94da2fa91c2ebdadacbc"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f1f43a8049c9e5ebdcc9aa42def70abbdf465b78be3197eec4a6abec51e2fafe"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0368062220b7d03a1fa9e9d2bccb854d86c67fc9ecc0cc9ff48703e4ad75233a"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b76302d18983e3c0cee9775f03774a94229c7acc75fcce0c17820ebd1b7afbf3"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"dc8a0b6a29052aa48bc18119bec50c3d6534e9f540be1132524d3deef2404b78"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"65243e0613cda9b500b7cb1816cf53cf9b079d92006e2f105ac15f84a0e49eb3"},"taxa":[{"id":"CWE-1104","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-8","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"442adda7ce2cc703818a240e45e2135209ca3f4f0335129713b99c245bb3a511"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ec5031a91401a7256e0bedd29fffa53467e332ee8a752785569fe0e205808b01"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4a94fd0de34796befa38ee4cb4fa37404138e7a882cdc1127331b9bde8dc98dd"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"844fe9494839858bc45f68882dafcd8f81daa92ea7e3532de4a48d60b2df6cc9"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"8df1c7c75ccb2500ee5ed75c20fca2e21a38a3e05b70da8f554d6cbaa0823005"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ef61238d1fd827d9df4175ac968839b876164b026b6ac63663f5a7a356fb6fff"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"19e454c920cc968c9eac8b3cde463292bd628690d504603f21ef1e14047337cc"},"taxa":[{"id":"CWE-939","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"43bd464573724a15fc78c0f3872fad7d9baecc0e703da10fc7f97943e4a41c87"},"taxa":[{"id":"CWE-939","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f3804bca078b5897b0a4ac3c82ffdd5862ae722e018f6855fda41dcbe28218a1"},"taxa":[{"id":"CWE-939","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c3ec9423d2f7d65ed221516f2687deebb300d3ee9a9acf35628d1ecee655948c"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3e9a506f221e426f3b88a96003b00686360fc3ae957fb25e77cae9b663b9c5eb"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"02373f78e03014fe79296e965cbf6cc18cab15ea0096f37b9097625db13749f8"},"taxa":[{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"76da76ea4ebe2413141769c523226e087e530ab3ca9bfb954ae299187accb9b6"}},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"cfb545ae186d8d8b3144ce5fc905c9393b19b16be41ac545dbae9773b04769a8"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"317910a27e40687238927276e0886a227d8679fdd1d3be50fe1bebe673f75ca1"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c6f159f350216541203b79ed5af203834ea1a44dbf1c6fd4e5c06f0d1408321a"}},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1e4a7915a438d06f1a0f090a983eedc2c093304540ddba9cdf2e95132420b4c9"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"03dd834237738d7521a01cbeaa104c9e6a8b78c0e7e22908680751de4b62a0e1"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"759dca709f1a032fb6f624ce672e6afb5558fce53ecf01fb73618c4d33923164"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"eb00976a698a5d68999b7ee6d27206fd374e916853e7ff1ead5eed42386f043f"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"90f83b4fa27db32740afe9540c905f3c0499caed87f61049a8a903ecc95b41c3"},"taxa":[{"id":"CICD-SEC-8","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"cfcd82fdb168b13bb41affabdcb2cb35cf5ac7f10a66641c54fea8dc5b92503c"},"taxa":[{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a7010298cb30c78911759ca668fb8b95e4c78cd4ec3018a844a9e7b7462571dc"},"taxa":[{"id":"CICD-SEC-5","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"eee4835912cdfd62c828f461cce5d990f5cce949139cc35c9988270c53d3875e"},"taxa":[{"id":"CICD-SEC-4","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"171a5915161e926e35d9f9302156f7a2c57d16c96d5bdd1af3f21e2d4308269b"},"taxa":[{"id":"CICD-SEC-5","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"8a15b7b1799a50c6ed5b87948aab99b0fd0a5abc08f76dc36982af124131ef44"},"taxa":[{"id":"CICD-SEC-5","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ace515990e7ee0f17b5c17e44dd168a5bdecf90804a3a3dd845cf05540978013"},"taxa":[{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"M2","level":"note","message":{"text":"No ADRs: No Architecture Decision Records found \u2014 no conventional ADR directory, no numbered \u0060NNNN-title\u0060 documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"670b3d6e36a756d63097d0dfbf90afd5fc761308800b9354894a07c3f4e4aa14"}},{"ruleId":"M4","level":"note","message":{"text":"README/code drift: training/README.md names Python 3.8 or later, but setup.py:859 requires \u0060python_requires=\u0022\u003E=3.9\u0022,\u0060 (the lowest of 3 declarations): the package does not install on Python 3.8. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents\u0027 own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/README.md"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"21f3ee3db9acf37b6d22b3379759fe8b263231114f71872b4f835096d34aa80a"}},{"ruleId":"P3","level":"note","message":{"text":"No SAST: No static application security testing detected. For this repository\u0027s stack, add bandit, \u0060semgrep --config=p/python\u0060, or CodeQL\u0027s python pack as a CI step. What was searched, so you can tell an absence from a miss: the 6 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge\u0027s web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen \u2014 if that is your case the row is wrong, and saying so is more useful than adding a second scanner."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/workflows/pre-commit.yaml"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"P3","level":"note","message":{"text":"No dependency-update automation: \u0060flash_attn/cute/pyproject.toml\u0060 declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices \u2014 including after an advisory is published against it. Add a \u0060.github/dependabot.yml\u0060 with one \u0060package-ecosystem\u0060 entry per ecosystem the tree uses (or an enabled \u0060renovate.json\u0060), and gate pull requests with \u0060actions/dependency-review-action\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/pyproject.toml"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"99b22d5a2a465fc895ead521a5fbb29de69df0c9c8322e51927e7f27cfcf66dd"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060ColumnParallelLinear is None or RowParallelLinear is None\u0060 appears character-identically in 2 files \u2014 flash_attn/modules/mha.py, flash_attn/modules/mlp.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/modules/mha.py"},"region":{"startLine":787}}}],"partialFingerprints":{"codehealthFindingId/v1":"129178e4c249d7efc0f4e9e23c6818c8f1f259975cce66b948bcd7340356c1e3"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060cache_seqlens is not None and isinstance(cache_seqlens, int)\u0060 appears character-identically in 2 files \u2014 flash_attn/flash_attn_interface.py, hopper/flash_attn_interface.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_interface.py"},"region":{"startLine":1600}}}],"partialFingerprints":{"codehealthFindingId/v1":"568b3954a5b0ce4dc39fe3ae4e60328c3198db61d0475e7d3c3104a0ccdc807d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060cb_conf is not None and \u0022_target_\u0022 in cb_conf\u0060 appears character-identically in 2 files \u2014 training/src/eval.py, training/src/train.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/eval.py"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e4ed90f66eb5b36cdd8ce726e788feca11370824b3996b93ae1faeaf53189ff"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060const_expr(not self.is_split_kv) or split_idx == 0\u0060 appears character-identically in 3 files \u2014 flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py, flash_attn/cute/flash_fwd_mla_1cta_sm100.py, flash_attn/cute/flash_fwd_sm100.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_kb64_sm100.py"},"region":{"startLine":2179}}}],"partialFingerprints":{"codehealthFindingId/v1":"79c78daa1def73179a1ad697c0216b560282486a14e5b2ba2ef4757eb7c6e2b0"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060const_expr(self.ragged_kv_tma) and batch_idx != kv_desc_batch_idx\u0060 appears character-identically in 2 files \u2014 flash_attn/cute/flash_bwd_sm100.py, flash_attn/cute/flash_bwd_sm90.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":2515}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fce774dabdd2e253b8aa3d08b3f7120b0b179d88f00e665b3db94f4312b887b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060const_expr(self.ragged_tma_V) and batch_idx != v_desc_batch_idx\u0060 appears character-identically in 2 files \u2014 flash_attn/cute/flash_fwd_sm100.py, flash_attn/cute/flash_fwd_sm90.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":1667}}}],"partialFingerprints":{"codehealthFindingId/v1":"24a9b16d6dc1afc2647927ea6940c54bf9f2c909cdb731a948c635838875c240"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060cu_seqlens_k is not None or seqused_k is not None\u0060 appears character-identically in 2 files \u2014 flash_attn/cute/compute_block_sparsity.py, flash_attn/cute/interface.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/compute_block_sparsity.py"},"region":{"startLine":391}}}],"partialFingerprints":{"codehealthFindingId/v1":"08cafa8445e86b45cbb2dec841142ba23d98da49b4f8c6c114d7e534068bca71"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060fastdiv_mods is not None and fastdiv_mods[0] is not None\u0060 appears character-identically in 2 files \u2014 flash_attn/cute/flash_bwd_sm100.py, flash_attn/cute/flash_bwd_sm90.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":4172}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f32a3ca7bd8e1a6571ff3f6570274bb0516aaeabc9656a465c6a60abe2386d5"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060lg_conf is not None and \u0022_target_\u0022 in lg_conf\u0060 appears character-identically in 2 files \u2014 training/src/eval.py, training/src/train.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/eval.py"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d1f32534455d9bd16c6f3a0a9ab1f273184cb085cafb7cc959d492fbc4032bc"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060mCuSeqlensK is not None or mSeqUsedK is not None\u0060 appears character-identically in 4 files \u2014 flash_attn/cute/flash_bwd_sm100.py, flash_attn/cute/flash_bwd_sm90.py, flash_attn/cute/flash_fwd_sm100.py, flash_attn/cute/flash_fwd_sm90.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":860}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c7eab593c71040e1e3810a44a32f1e8e2758ea007b7c21d7aefd0b142a3d189"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060mCuSeqlensQ is not None or mSeqUsedQ is not None\u0060 appears character-identically in 4 files \u2014 flash_attn/cute/flash_bwd_sm100.py, flash_attn/cute/flash_bwd_sm90.py, flash_attn/cute/flash_fwd.py, flash_attn/cute/flash_fwd_sm90.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":861}}}],"partialFingerprints":{"codehealthFindingId/v1":"6eb30e95f59946e8d3188e60e9932be96ad3216111b7a95373d60d01ecb4fac8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060mLSE is not None or learnable_sink is not None\u0060 appears character-identically in 4 files \u2014 flash_attn/cute/block_sparse_utils.py, flash_attn/cute/flash_fwd_mla_1cta_sm100.py, flash_attn/cute/flash_fwd_mla_sm100.py, flash_attn/cute/flash_fwd_sm100.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/block_sparse_utils.py"},"region":{"startLine":886}}}],"partialFingerprints":{"codehealthFindingId/v1":"815f267b6993b7530fdc387b6e456866cc4bd17761ef38a667c8f8620be83964"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060mPageTable is not None and self.use_tma_KV\u0060 appears character-identically in 2 files \u2014 flash_attn/cute/flash_fwd_sm100.py, flash_attn/cute/flash_fwd_sm90.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":1831}}}],"partialFingerprints":{"codehealthFindingId/v1":"32a91cbb6d1db94354e68098096ce75c7d3ee515616a51f505b0c7974993ed85"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not USE_TRITON_ROCM and getattr(torch.version, \u0027hip\u0027, None) is not None\u0060 appears character-identically in 2 files \u2014 flash_attn/flash_attn_interface.py, hopper/flash_attn_interface.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/flash_attn_interface.py"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"387ac9df8bd32b53bdb06f4c088bd3cbb7192c78c9dc8dc7975b3471ab932636"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not self.is_local and not self.is_varlen_q\u0060 appears character-identically in 2 files \u2014 flash_attn/cute/flash_bwd_sm100.py, flash_attn/cute/flash_bwd_sm90.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":3664}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc573aa9e475e0a580b6219e04d143eb00b71456e7303b5196a5157432a7c707"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not self.use_tma_KV or not self.use_tma_Q\u0060 appears character-identically in 2 files \u2014 flash_attn/cute/flash_fwd_sm100.py, flash_attn/cute/flash_fwd_sm90.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b13652278869724374c479419da3daf277818d792d7cfde4ac8da2b4e2be2e4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060num_n_blocks % 2 == 0 and num_n_blocks \u003E 0\u0060 appears character-identically in 2 files \u2014 flash_attn/cute/flash_fwd_mla_1cta_sm100.py, flash_attn/cute/flash_fwd_mla_sm100.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":2360}}}],"partialFingerprints":{"codehealthFindingId/v1":"e39f91a2fce548740722d8c21cc3452b8596f82b0c012b2f76a32124b7889cd5"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060query_unused_mask is not None or key_unused_mask is not None\u0060 appears character-identically in 2 files \u2014 flash_attn/cute/testing.py, flash_attn/utils/testing.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/testing.py"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e38774d9a64281d259b6e227c97ebe5d6a9d95692c50a814ccf674e84dbad62"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.check_hdim_oob or self.check_hdim_v_oob\u0060 appears character-identically in 2 files \u2014 flash_attn/cute/flash_fwd_sm100.py, flash_attn/cute/flash_fwd_sm90.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbb615f6472e9001aea48f13b41675d893636ccdf104454738c5342f99fcb7dd"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.fused_dropout_add_ln and layer_norm_fn is None\u0060 appears character-identically in 2 files \u2014 flash_attn/models/bert.py, flash_attn/models/vit.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/models/bert.py"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d1a5be8625c3fd438a5f6b6c7bf85f42c2cd05010907791313d6e4311673331"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.is_local and block_info.window_size_left is not None\u0060 appears character-identically in 2 files \u2014 flash_attn/cute/flash_fwd_sm100.py, flash_attn/cute/flash_fwd_sm90.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_sm100.py"},"region":{"startLine":2742}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a092defc84438cbfb0f2b5fb54a4417702b4911dd7e4a22b9dd63f5edd62b54"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.is_varlen_q and not self.use_packed_varlen_sched\u0060 appears character-identically in 2 files \u2014 flash_attn/cute/flash_fwd_mla_1cta_sm100.py, flash_attn/cute/flash_fwd_mla_sm100.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_fwd_mla_1cta_sm100.py"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a10f7ba1e943fb917f09032dfa9e400034052fa7c7c08d1b77b4fb1cd436645"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060seqlen.has_cu_seqlens_k or seqlen.has_seqused_k\u0060 appears character-identically in 4 files \u2014 flash_attn/cute/flash_bwd_sm100.py, flash_attn/cute/flash_bwd_sm90.py, flash_attn/cute/flash_fwd_sm100.py, flash_attn/cute/flash_fwd_sm90.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":4169}}}],"partialFingerprints":{"codehealthFindingId/v1":"051dbeeafde4f80007f1839cecc46d3480e141d8365b1babb02c296677dbb27f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060seqlen.has_cu_seqlens_q or seqlen.has_seqused_q\u0060 appears character-identically in 5 files \u2014 flash_attn/cute/flash_bwd_sm100.py, flash_attn/cute/flash_bwd_sm90.py, flash_attn/cute/flash_fwd.py, flash_attn/cute/flash_fwd_sm100.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_sm100.py"},"region":{"startLine":4166}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ce2631fa5ca9efb3e6abc01c14290d188c5cbe34c91af86e3cffc7f0217b1df"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060warp_idx == self.empty_warp_ids[i] and warp_idx != self.clc_scheduler_warp_id\u0060 appears character-identically in 3 files \u2014 flash_attn/cute/flash_bwd_mla_sm100.py, flash_attn/cute/flash_fwd_mla_1cta_sm100.py, flash_attn/cute/flash_fwd_mla_sm100.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_sm100.py"},"region":{"startLine":1348}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bd1470f580b4eec347c8075505683ede0b54898998fe1916a005ba8c052de36"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060warp_idx \u003E= self.epilogue_warp_ids[0] and warp_idx \u003C= self.epilogue_warp_ids[-1]\u0060 appears character-identically in 3 files \u2014 flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py, flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py, flash_attn/cute/flash_fwd_sm100.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":963}}}],"partialFingerprints":{"codehealthFindingId/v1":"74643878967a5a03e6f1987f97e647f3639c5c4ad52941c4e0477816d52823f1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060warp_idx \u003E= self.kv_load_warp_ids[0] and warp_idx \u003C= self.kv_load_warp_ids[-1]\u0060 appears character-identically in 2 files \u2014 flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py, flash_attn/cute/flash_bwd_mla_dq_dqv_sm100_h64.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/flash_bwd_mla_dq_dqv_sm100.py"},"region":{"startLine":768}}}],"partialFingerprints":{"codehealthFindingId/v1":"dce7f34f5961cb0907ea1b55ccc6dff88ab95221ab344218250373636a28a4df"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060window_size[0] is not None or window_size[1] is not None\u0060 appears character-identically in 2 files \u2014 flash_attn/cute/testing.py, flash_attn/utils/testing.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/testing.py"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1b93d742f7edca6f22693c958e240a5718a30748f7d525eae69cbeb0cf8b9ff"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/utils.py"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a4f3ac063041fd836473ffc1718ae4b6bb6678ca15ce421636122f04a879138"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 26 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"training/src/callbacks/gpu_affinity.py"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e61c02d7589a860cd9291f649d2f89b9bf0e80f3c026d0889f1d98ee24b5bff"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on parse failure: \u0060_parse_log_level\u0060 returns \u00600\u0060 when \u0060ValueError\u0060 is raised, with no log or raise \u2014 a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"flash_attn/cute/fa_logging.py"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e1e444cee5df2acf6f20aacbcc9be3eb313ebb176949407e7e0bafa8bf1f3a4"}}],"taxonomies":[{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d","organization":"MITRE","informationUri":"https://cwe.mitre.org/","isComprehensive":false,"shortDescription":{"text":"The MITRE Common Weakness Enumeration (CWE)."},"taxa":[{"id":"CWE-1032","guid":"5f21e517-68aa-a650-9a25-5771ef024637","name":"OWASP Top Ten \u2014 Security Misconfiguration category","shortDescription":{"text":"OWASP Top Ten \u2014 Security Misconfiguration category"},"helpUri":"https://cwe.mitre.org/data/definitions/1032.html"},{"id":"CWE-1104","guid":"4c918cb5-b2a6-6c55-9963-a44ee464305e","name":"Use of Unmaintained Third Party Components","shortDescription":{"text":"Use of Unmaintained Third Party Components"},"helpUri":"https://cwe.mitre.org/data/definitions/1104.html"},{"id":"CWE-1357","guid":"e4d2e772-757e-0a5c-bd7d-77052949d866","name":"Reliance on Insufficiently Trustworthy Component","shortDescription":{"text":"Reliance on Insufficiently Trustworthy Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1357.html"},{"id":"CWE-16","guid":"659db3ea-affc-8453-8add-c1218fbfcb92","name":"Configuration","shortDescription":{"text":"Configuration"},"helpUri":"https://cwe.mitre.org/data/definitions/16.html"},{"id":"CWE-259","guid":"ae9ad959-fbb6-9d5e-892d-3dca66da0b69","name":"Use of Hard-coded Password","shortDescription":{"text":"Use of Hard-coded Password"},"helpUri":"https://cwe.mitre.org/data/definitions/259.html"},{"id":"CWE-353","guid":"09d7e902-d4ee-f05d-ae6c-0a1554d0c18f","name":"Missing Support for Integrity Check","shortDescription":{"text":"Missing Support for Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/353.html"},{"id":"CWE-494","guid":"b8a65e0d-e459-4a55-a931-fc1136482375","name":"Download of Code Without Integrity Check","shortDescription":{"text":"Download of Code Without Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/494.html"},{"id":"CWE-502","guid":"f7d3b296-aac0-5c5a-b706-e07faba26c36","name":"Deserialization of Untrusted Data","shortDescription":{"text":"Deserialization of Untrusted Data"},"helpUri":"https://cwe.mitre.org/data/definitions/502.html"},{"id":"CWE-522","guid":"71fb233e-ce6a-ae57-9419-ef8373540b09","name":"Insufficiently Protected Credentials","shortDescription":{"text":"Insufficiently Protected Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/522.html"},{"id":"CWE-732","guid":"1da27e8f-b330-7650-ab63-bd61953eae5d","name":"Incorrect Permission Assignment for Critical Resource","shortDescription":{"text":"Incorrect Permission Assignment for Critical Resource"},"helpUri":"https://cwe.mitre.org/data/definitions/732.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)","shortDescription":{"text":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-829","guid":"13c33925-97fb-5a5e-b40c-56d328b8a4d7","name":"Inclusion of Functionality from Untrusted Control Sphere","shortDescription":{"text":"Inclusion of Functionality from Untrusted Control Sphere"},"helpUri":"https://cwe.mitre.org/data/definitions/829.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-939","guid":"12397742-f2c4-8254-8012-482c3356c551","name":"CWE-939","shortDescription":{"text":"CWE-939"},"helpUri":"https://cwe.mitre.org/data/definitions/939.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Improper Control of Generation of Code (\u0027Code Injection\u0027)","shortDescription":{"text":"Improper Control of Generation of Code (\u0027Code Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]},{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61","version":"2025","organization":"OWASP Foundation","informationUri":"https://top10.owasp.org/2025/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10:2025 web application security risks."},"taxa":[{"id":"A02:2025","guid":"668dee9e-41bc-6354-97d0-fdf8f40c50c1","name":"Security Misconfiguration","shortDescription":{"text":"Security Misconfiguration"},"helpUri":"https://top10.owasp.org/2025/A02_2025-Security_Misconfiguration/"},{"id":"A03:2025","guid":"168e227c-7735-2e57-bc6e-997affe644c5","name":"Software Supply Chain Failures","shortDescription":{"text":"Software Supply Chain Failures"},"helpUri":"https://top10.owasp.org/2025/A03_2025-Software_Supply_Chain_Failures/"},{"id":"A05:2025","guid":"87e86033-3231-8458-8e4a-5cb82743553a","name":"Injection","shortDescription":{"text":"Injection"},"helpUri":"https://top10.owasp.org/2025/A05_2025-Injection/"},{"id":"A06:2025","guid":"491554d7-b8e4-9652-91a9-53700dc92ece","name":"Insecure Design","shortDescription":{"text":"Insecure Design"},"helpUri":"https://top10.owasp.org/2025/A06_2025-Insecure_Design/"},{"id":"A07:2025","guid":"334ddd78-539d-d35c-83dd-253647eb7eaf","name":"Authentication Failures","shortDescription":{"text":"Authentication Failures"},"helpUri":"https://top10.owasp.org/2025/A07_2025-Authentication_Failures/"},{"id":"A08:2025","guid":"84b0c297-710e-9a5f-9335-936ecb260c36","name":"Software or Data Integrity Failures","shortDescription":{"text":"Software or Data Integrity Failures"},"helpUri":"https://top10.owasp.org/2025/A08_2025-Software_or_Data_Integrity_Failures/"}]},{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35","organization":"OWASP Foundation","informationUri":"https://owasp.org/www-project-top-10-ci-cd-security-risks/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10 CI/CD Security Risks."},"taxa":[{"id":"CICD-SEC-3","guid":"458c83a6-ebf7-cf55-8cc3-b4d949bbf271","name":"Dependency Chain Abuse","shortDescription":{"text":"Dependency Chain Abuse"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-03-Dependency-Chain-Abuse"},{"id":"CICD-SEC-4","guid":"c859d8ea-8b24-a157-9406-94929c10397a","name":"Poisoned Pipeline Execution (PPE)","shortDescription":{"text":"Poisoned Pipeline Execution (PPE)"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-04-Poisoned-Pipeline-Execution"},{"id":"CICD-SEC-5","guid":"cc7f4610-8859-e654-9029-d5f97d992220","name":"Insufficient PBAC (Pipeline-Based Access Controls)","shortDescription":{"text":"Insufficient PBAC (Pipeline-Based Access Controls)"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-05-Insufficient-PBAC"},{"id":"CICD-SEC-6","guid":"f2ee2486-b260-2952-a41f-6b67fa713940","name":"Insufficient Credential Hygiene","shortDescription":{"text":"Insufficient Credential Hygiene"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-06-Insufficient-Credential-Hygiene"},{"id":"CICD-SEC-8","guid":"b6b2dacf-a168-4957-876e-a8c73ee00eb0","name":"Ungoverned Usage of 3rd Party Services","shortDescription":{"text":"Ungoverned Usage of 3rd Party Services"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-08-Ungoverned-Usage-of-3rd-Party-Services"},{"id":"CICD-SEC-9","guid":"b3d36727-0395-5b51-94c4-5e173d62eab3","name":"Improper Artifact Integrity Validation","shortDescription":{"text":"Improper Artifact Integrity Validation"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-09-Improper-Artifact-Integrity-Validation"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":65,"secretScannerRunsExcluded":0}},"redactionTokens":["A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."]}]}