The checks in https://github.com/pytorch/pytorch/blob/master/aten/src/TH/generic/THBlas.c should really always pass, eg ld* ones, except for INT_MAX ones. Maybe we should assert them rather than checking and resorting to slow c code when failing.
cc @soumith