)]}'
{
  "commit": "84657c01e5d3672cfd299bd3d5c77bff3888a1a9",
  "tree": "78db787b851ba999b1f5392206e20341f9c875ce",
  "parents": [
    "f53a340c3104ae060a216ff7815427c73044150a"
  ],
  "author": {
    "name": "Dundy Pasupuleti",
    "email": "42792754+dundysm@users.noreply.github.com",
    "time": "Wed Dec 02 02:07:46 2026 -0500"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Dec 02 15:07:46 2026 +0800"
  },
  "message": "[Relax][Frontend][ONNX] Lower ThresholdedRelu with where in the input dtype (#20861)\n\nfixes #20851\n\nthe ThresholdedRelu converter computed `(x \u003e alpha).astype(\"float32\") *\nx`. that gives nan for nan and -inf inputs (nan * 0 and -inf * 0 are\nnan) where onnx expects 0, and the float32 mask doesn\u0027t match float16 or\nfloat64 inputs, so those failed to convert.\n\nthis lowers it as `where(x \u003e alpha, x, 0)` with alpha and zero built in\nthe input dtype, which matches the Where-based function body in the onnx\nspec.\n\ntests:\n- new `test_thresholded_relu_nonfinite_and_dtypes` runs `[nan, -inf, -2,\n0, 0.5, 1, 2, inf]` in float32, float16 and float64 and checks the exact\noutput and dtype; it fails before the change and passes after.\n- updated the expected IR in `test_thresholded_relu`.\n\nnote: i couldn\u0027t build libtvm from source on this machine, so i ran the\nchanged converter and these tests (plus the other relu tests, 9 passed)\nagainst the 0.27.0.post1 wheel\u0027s runtime; the converter code is\nidentical there. ruff format and check are clean.\n\n---------\n\nSigned-off-by: Dundy Pasupuleti \u003cdundysm@gmail.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "33a4392d25e0d1b381beaf9a27b092a93c2a7e44",
      "old_mode": 33188,
      "old_path": "python/tvm/relax/frontend/onnx/onnx_frontend.py",
      "new_id": "2d82dcb1aba297bd229ba99fce1ccdca2dee641f",
      "new_mode": 33188,
      "new_path": "python/tvm/relax/frontend/onnx/onnx_frontend.py"
    },
    {
      "type": "modify",
      "old_id": "d9a4037baa87efd5be07cd87955b6ec64db17544",
      "old_mode": 33188,
      "old_path": "tests/python/relax/test_frontend_onnx.py",
      "new_id": "1f59b74a24b5dfcefd7aaa1d8a81baaac2c33cec",
      "new_mode": 33188,
      "new_path": "tests/python/relax/test_frontend_onnx.py"
    }
  ]
}
