Revert "Enable all SIM rules except disabled ones (#164645)"

This reverts commit 321e6026925f6b6e8a36e3a8b7c0295cd7541911.

Reverted https://github.com/pytorch/pytorch/pull/164645 on behalf of https://github.com/izaitsevfb due to causes lint failures ([comment](https://github.com/pytorch/pytorch/pull/164645#issuecomment-3369274351))
This commit is contained in:
PyTorch MergeBot
2025-10-05 19:32:21 +00:00
parent 321e602692
commit 5d7360bb03
97 changed files with 255 additions and 182 deletions

View File

@ -18,7 +18,7 @@ class PruningOpTest(TestCase):
def _generate_rowwise_mask(self, embedding_rows):
indicator = torch.from_numpy((np.random.random_sample(embedding_rows)).astype(np.float32))
threshold = float(np.random.random_sample())
mask = torch.BoolTensor([val >= threshold for val in indicator])
mask = torch.BoolTensor([True if val >= threshold else False for val in indicator])
return mask
def _test_rowwise_prune_op(self, embedding_rows, embedding_dims, indices_type, weights_dtype):