The GitHub Actions job "Publish TVM wheels" on tvm.git/main has failed. Run started by GitHub user MasterJH5574 (triggered by MasterJH5574).
Head commit for run: 0e3250795bf450438a2224b6e2d76d5568d4873e / Javier De Jesus <[email protected]> [Relax][PyTorch] Cast non-bool inputs to bool in logical_and converter (#19679) ### Motivation `torch.logical_and` accepts input tensors of any dtype (treating any nonzero element as `True`) and always returns a `bool` tensor. The PyTorch frontend did not produce that `bool` result. The ExportedProgram frontend lowered `logical_and.default` with `self._binary_op(relax.op.logical_and, operator.and_)`, which kept the operand dtype and emitted `relax.op.logical_and` on non-bool inputs (for example `float32`). `relax.op.logical_and` requires boolean inputs and otherwise fails `LegalizeOps` in the TOPI `logical_and`. The FX frontend did not register `logical_and` at all, so the op was unsupported there. ### Changes - Add a shared `_logical_and` converter in `BaseFXGraphImporter` that casts non-bool operands to `bool` before applying `relax.op.logical_and`. Bool operands are passed through unchanged (no redundant cast). - Point the `logical_and.default` (ExportedProgram) registration at the new converter, and add a `logical_and` (FX) registration that was previously missing, matching the existing `logical_not` converter. - Add a standalone `test_logical_and` to both the FX and ExportedProgram test suites asserting the corrected IR (`astype` to bool on each operand, then `logical_and`, producing a `bool` output). ### Notes The cast to `bool` lowers to an elementwise nonzero test, so it matches PyTorch's "nonzero is True" semantics for float, integer, and NaN inputs. Report URL: https://github.com/apache/tvm/actions/runs/27165341043 With regards, GitHub Actions via GitBox --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
