huggingface/pytorch_block_sparse

Incorrect error message (says in_features, should be out_features)

ejohb opened this issue · 3 comments

ejohb commented

raise Exception(f"BlockSparseLinear invalid in_features={in_features}, should be multiple of {self.BLOCK_SIZE}")

It looks like there is an requirement that the any dimension should be a multiply of the block size (32). Can we relax this requirement?

ejohb commented

It looks like there is an requirement that the any dimension should be a multiply of the block size (32). Can we relax this requirement?

Yeah, or auto-zero-pad the input to the closest multiple.

@ejohb how to relax this requirement.