In Relax design notes, one of the key constructs for symbolic shape computations is match_shape
. According to the design notes and early demos, match_shape
was originally defined as a Relax expression R.match_shape
. (I couldn’t find the right version of TVM to run the demo.)
Upon inspecting the latest TVM release candidate that support Relax source code, I noticed that match_shape
is now defined as a Relax VM runtime function, R.call_packed("vm.builtin.match_shape")
. This function is automatically matched through the transformation applied by the relax.transform.VMShapeLower
pass. A relevant test case demonstrates this process.
Can someone please help to explain why this transition from an expression to a VM runtime function took place?