Thank you for all the feedback! @junrushao1994 @yzh119 @MarisaKirisame Sorry for the ambiguity in my proposal. I want to make some clarifications and answer some of the questions.
When we declare a `relay.var(TensorType(shape=(m,n), format='CSR'))`, we would lower it to a `tvm.placeholder(shape=(m,n), sformat=SparseFormat([Dense, Sparse])`, which is WIP by @ZihengJiang . We adopt the representation used in [TACO compiler] (https://github.com/tensor-compiler/taco) in which user can easily register `CSR = SparseFormat([Dense, Sparse])`. For each topi, we can then define operations and generate schedules for each sparse type (Maybe add an interface for registering ops & schedules?). The benefit of having an extra field in relay TensorType is that we can easily infer format and shape information from the Relay end. w.r.t. The tradeoff between having a new type or new field, I wonder if we want to maintain some consistency in between Relay and TVM Tensor Representation. If that's the case, a new type might be preferable. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/dmlc/tvm/issues/3731#issuecomment-521456113