1. A method comprising: receiving an input matrix containing a plurality of elements, wherein the elements are organized into one or more rows and one or more columns; partitioning the one or more columns of the input matrix into one or more sparse columns and one or more dense columns; identifying a plurality of matrix components that form a cross product matrix, wherein each matrix component of the plurality of matrix components is based on one or more of: the one or more sparse columns or the one or more dense columns; computing the cross product matrix, wherein a first set of components of the plurality of matrix components that are based at least partially on the one or more dense columns are computed using dense matrix multiplication and a second set of components of the plurality of matrix components that are based solely on the one or more sparse columns are computed using sparse matrix multiplication; and wherein the method is performed by one or more processors.