Function tvm::tirx::SubstituteWithDataTypeLegalization(Stmt, ffi::TypedFunction(const Var&)>)

Function tvm::tirx::SubstituteWithDataTypeLegalization(Stmt, ffi::TypedFunction<ffi::Optional<PrimExpr>(const Var&)>)#

Function Documentation#

Stmt tvm::tirx::SubstituteWithDataTypeLegalization(Stmt stmt, ffi::TypedFunction<ffi::Optional<PrimExpr>(const Var&)> vmap)#

Substitute the var specified by vmap and legalize data types after substitution.

This statement overload legalizes only core TIRX nodes. Dtype-changing substitutions must be applied after lowering dialect blocks: structural traversal of extension statements does not legalize their iterator domains or bindings. Type-preserving mappings continue to traverse schedulable blocks structurally before lowering.

Parameters:
  • stmt – The source statement to be substituted

  • vmap – returns a new value if re-mapping is needed, otherwise returns nullptr.

Returns:

The result.