Query or set the storage mode for AD. If nonzero, gradients will try to store partial derivatives as a sparse matrix