yuchaoli commented on a change in pull request #8065:
URL: https://github.com/apache/tvm/pull/8065#discussion_r634076852
##########
File path: python/tvm/topi/sparse/utils.py
##########
@@ -116,11 +170,187 @@ def convert_model_dense_to_sparse(mod, params,
random_params=False, bs_r=1, bs_c
Dict[Srting, tvm.nd.array]
The updated parameters.
"""
+
mod, params = ddo.simplify_fc_transpose.convert(mod["main"], params)
if random_params:
# Manually replace the parameters of dense model to sparse tensors
params = random_sparse_dense_params(mod, params, bs_r=bs_r, bs_c=bs_c,
density=1 - sparsity)
+ params = random_sparse_conv2d_params(
+ mod, params, bs_r=bs_r, bs_c=bs_c, density=1 - sparsity,
layout=layout
+ )
# Currently we only support to conver dense matmul to sparse dense matmul
Review comment:
Done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]