Support torch.sparse_mask on strided input with sparse CSR, CSC, BSR, and BSC mask. (#107777)
While `input.sparse_mask(mask)` can be defined as `input.mul(ones_like(mask))`, implementing this definition leads to a chicken-and-egg problem because the multiplication of dense and sparse_compressed tensors relies on the `sparse_mask` support.
This PR implements `sparse_mask` support for sparse compressed masks using utility functions from sparse compressed tensor conversions support.
Fixes https://github.com/pytorch/pytorch/issues/107373
Fixes https://github.com/pytorch/pytorch/issues/107370
Pull Request resolved: https://github.com/pytorch/pytorch/pull/107777
Approved by: https://github.com/amjames, https://github.com/cpuhrsch
ghstack dependencies: #107638