tvm icon indicating copy to clipboard operation
tvm copied to clipboard

[Relax] Identify tuple unpack/repack in CanonicalizeBindings

Open Lunderberg opened this issue 1 year ago • 0 comments

Prior to this commit, the CanonicalizeBindings pass could identify and simplify a value that had been packed into a tuple, then extracted from it. (e.g. Simplifying tup = (x,y); z = tup[0] into z = x.) However, it could not identify a value that had been expanded from a tuple, and then re-bundled. (e.g. Simplifying new_tuple = (tup[0], tup[1]) into new_tuple = tup.)

This commit updates CanonicalizeBindings to identify and remove unnecessary tuple unpacking/repacking.

Lunderberg avatar Aug 28 '24 16:08 Lunderberg