Closed
Description
LazyTensor(Callable[[], ir.TensorProtocol], dtype, shape, name)
This can save more memories and disk space for temporary files.
Create a LazyTensor class that implements the ir.TensorProtocol protol in onnxscript/ir/_core.py. It should take a function which returns a ir.TensorProtocol, a dtype and a shape argument. The idea is that the function will be lazily evaluated to get the actual ir.TensorProcol tensor when tobytes() or numpy() is called.