Autoscheduler repeatedly prints warnings for sparse

I’m running tutorials/frontend/deploy_sparse.py and seeing many of these warnings:

Tensor sparse_dense_bsr_768_768_1_1_0.01_W_data exists in TASK_INPUT_BUFFER_TABLE, set overwrite to True or this Tensor will not be registered
Tensor sparse_dense_bsr_768_768_1_1_0.01_W_indices exists in TASK_INPUT_BUFFER_TABLE, set overwrite to True or this Tensor will not be registered
Tensor sparse_dense_bsr_768_768_1_1_0.01_W_indptr exists in TASK_INPUT_BUFFER_TABLE, set overwrite to True or this Tensor will not be registered

It seems like there are multiple sparse matrices that have the same characteristics. Can we remove this warning because tuning should be the same regardless of differences in sparsity pattern? Or should we do what I suggested in the associated PR (https://github.com/apache/tvm/pull/7313) and hash the sparsity pattern?

@jcf94

Emm … This warning is by my design.

It should only show once in each schedule search?

There’s a override option to update the buffer, or the warning message will be shown and the buffer data will be remained.

For the sparse hash, I agree it’s useful. Just in my test, I didn’t see performance change in different input data with fixed shape. If we really need to distinguish the sparse pattern, then let’s figure out a way to do it~ :smiley: