)]}'
{
  "commit": "7ea0931a5442aa9baf5e40e9f97745984db2a394",
  "tree": "45d9acaebbefde3faa002b56cdd784037ff0d7b5",
  "parents": [
    "0c45114d4950015dbab7e4b7eb49018020a77182"
  ],
  "author": {
    "name": "Valentin Churavy",
    "email": "v.churavy@gmail.com",
    "time": "Thu Sep 03 18:59:05 2026 +0200"
  },
  "committer": {
    "name": "Valentin Churavy",
    "email": "v.churavy@gmail.com",
    "time": "Thu Sep 03 18:59:05 2026 +0200"
  },
  "message": "BLAS: add rules for cblas_?dotc_sub and cblas_?dotu_sub\n\nAdd derivative rules for the complex dot products in their cblas `_sub`\nform (e.g. cblas_zdotc_sub64_), whose result is written through a\npointer passed as the last argument instead of being returned.\n\n  dotc: res \u003d sum(conj(x_i) * y_i)   REV: dx +\u003d conj(dres)*y, dy +\u003d dres*x\n  dotu: res \u003d sum(x_i * y_i)         REV: dx +\u003d dres*y,       dy +\u003d dres*x\n  FWD (both): dres \u003d dot(dx, y) + dot(x, dy)\n\nTo express this in the BLAS tblgen:\n* new `fpret` argument type for a scalar result returned through a\n  pointer; its shadow provides DiffeRet in reverse mode (and is reset,\n  since the primal overwrote the result) and receives the dual in\n  forward mode. BlasCalls to `*_sub` functions get a result alloca\n  appended and their result loaded back, like the cublas v2 path.\n* new `BConj` op for the complex conjugate of an fp scalar.\n* per-pattern `supportsComplex` bit, so the blanket \"complex inputs not\n  supported in reverse mode\" error only applies to patterns that have\n  not been checked for complex inputs.\n* complex scalars under the cblas ABI are passed by pointer, so\n  byRefFloat now accounts for that (shared helper for all generators).\n\nThe result pointer is attributed nocapture but not writeonly: with\nwriteonly, the unused-value analysis drops a local result buffer\n(e.g. a julia Ref) while keeping the primal call writing to it.\nnocapture is also no longer applied to non-pointer (integer) vector\narguments, which is invalid IR.\n\nAssisted-by: Claude Code (Fable 5.1)\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "cfb57caa0ff7ae41834c0cd7933e57569bb0c677",
      "old_mode": 33188,
      "old_path": "enzyme/Enzyme/BlasDerivatives.td",
      "new_id": "1d1c7ded3984519a0205c6e37ba0d0dbf4014384",
      "new_mode": 33188,
      "new_path": "enzyme/Enzyme/BlasDerivatives.td"
    },
    {
      "type": "modify",
      "old_id": "39148a439df6a76802cdf4ca9fda858aae626152",
      "old_mode": 33188,
      "old_path": "enzyme/Enzyme/Utils.cpp",
      "new_id": "d1e59bcfd38112bf4b81bdda4866281e6de6815e",
      "new_mode": 33188,
      "new_path": "enzyme/Enzyme/Utils.cpp"
    },
    {
      "type": "modify",
      "old_id": "70444af3e7200e902723b7780d5b4ae8e5657b49",
      "old_mode": 33188,
      "old_path": "enzyme/Enzyme/Utils.h",
      "new_id": "53be61a61cd711f05be9ac998f30322f6837274d",
      "new_mode": 33188,
      "new_path": "enzyme/Enzyme/Utils.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "1c9e3b137afdc6d2738372ca0efd78dc8ea30db4",
      "new_mode": 33188,
      "new_path": "enzyme/test/Enzyme/ForwardMode/blas/cblas_zdotc_sub64_.ll"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "7e0bba874c84a931a8d0bc81dc630bbb4d815e1b",
      "new_mode": 33188,
      "new_path": "enzyme/test/Enzyme/ForwardMode/blas/cblas_zdotu_sub64_.ll"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "29a035cdcb2f83c97e9879619ecd322200e98817",
      "new_mode": 33188,
      "new_path": "enzyme/test/Enzyme/ReverseMode/blas/cblas_zdotc_sub64_.ll"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "85a4cdba7ed11c0868acdd916a72f5e00ac80bcc",
      "new_mode": 33188,
      "new_path": "enzyme/test/Enzyme/ReverseMode/blas/cblas_zdotu_sub64_.ll"
    },
    {
      "type": "modify",
      "old_id": "8442d6903249bc14a179dcdd3e69f32d13a70861",
      "old_mode": 33188,
      "old_path": "enzyme/tools/enzyme-tblgen/blas-tblgen.cpp",
      "new_id": "ace5e00b1c0c7c08277590d636ac6b10afa3600b",
      "new_mode": 33188,
      "new_path": "enzyme/tools/enzyme-tblgen/blas-tblgen.cpp"
    },
    {
      "type": "modify",
      "old_id": "436db80cb44f0335512960cf892ef484367c1215",
      "old_mode": 33188,
      "old_path": "enzyme/tools/enzyme-tblgen/blasDeclUpdater.h",
      "new_id": "d9f08c5845d040029e70ed937a050e2ff4916146",
      "new_mode": 33188,
      "new_path": "enzyme/tools/enzyme-tblgen/blasDeclUpdater.h"
    },
    {
      "type": "modify",
      "old_id": "758ae19a785d5f714e4330f2090f65d2d7f181de",
      "old_mode": 33188,
      "old_path": "enzyme/tools/enzyme-tblgen/blasDiffUseUpdater.h",
      "new_id": "97c37627c7dc887090a76237ca395a1133fb3409",
      "new_mode": 33188,
      "new_path": "enzyme/tools/enzyme-tblgen/blasDiffUseUpdater.h"
    },
    {
      "type": "modify",
      "old_id": "2ff92d047b06c8c7b8d47f98edf6d6e0e8abd14e",
      "old_mode": 33188,
      "old_path": "enzyme/tools/enzyme-tblgen/blasTAUpdater.h",
      "new_id": "2dbec069b663a559305c44f903351a6045ed4749",
      "new_mode": 33188,
      "new_path": "enzyme/tools/enzyme-tblgen/blasTAUpdater.h"
    },
    {
      "type": "modify",
      "old_id": "e154c50313bee2c44d2d82f695d23117d525e2be",
      "old_mode": 33188,
      "old_path": "enzyme/tools/enzyme-tblgen/caching.cpp",
      "new_id": "da43e6b5697a7bd2053e226f94f85697cc1d2f9c",
      "new_mode": 33188,
      "new_path": "enzyme/tools/enzyme-tblgen/caching.cpp"
    },
    {
      "type": "modify",
      "old_id": "5b23401e03f020ec33e240c2da59ad823b4fcff7",
      "old_mode": 33188,
      "old_path": "enzyme/tools/enzyme-tblgen/datastructures.cpp",
      "new_id": "1e516b79aa23305351e8d6f97ae24c5e67aff7c7",
      "new_mode": 33188,
      "new_path": "enzyme/tools/enzyme-tblgen/datastructures.cpp"
    },
    {
      "type": "modify",
      "old_id": "2061fb5e1cf768fdcecb4c07afa82b23484dc373",
      "old_mode": 33188,
      "old_path": "enzyme/tools/enzyme-tblgen/datastructures.h",
      "new_id": "5c12989c668c91ce4cb7ff20f6d34e7c8d1f95aa",
      "new_mode": 33188,
      "new_path": "enzyme/tools/enzyme-tblgen/datastructures.h"
    }
  ]
}
