The GitHub Actions job "Lint" on tvm.git/main has failed.
Run started by GitHub user tlopex (triggered by tlopex).

Head commit for run:
577e57641d46db11ea3fce348e83e16417578748 / Hangshuai He 
<[email protected]>
[Relax] Fix bucketize output dtype during legalization (#19936)

This PR fixes Relax bucketize lowering to pass the correct integer
output dtype to TOPI searchsorted.

Previously, both LegalizeOps and DispatchSortScan passed the input
tensor dtype as the output dtype. For float input tensors, this caused
TOPI searchsorted to receive a float output dtype, which later failed
during binary-search lowering because bucket indices must be integer
values.

This patch derives the output dtype from bucketize's out_int32
attribute:
  - int32 when out_int32=True
  - int64 otherwise

  A numerical ExportedProgram frontend test is added to cover:
  - right=False
  - right=True
  - out_int32=False
  - out_int32=True
  - float input values on bucket boundaries

  Test:
python -m pytest
tests/python/relax/test_frontend_from_exported_program.py -k "bucketize"
-q

Report URL: https://github.com/apache/tvm/actions/runs/29069328461

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to