# How to solve rectangular, linear systems in batch?

**URL:** <https://forums.developer.nvidia.com/t/how-to-solve-rectangular-linear-systems-in-batch/65806>\
**Category:** GPU-Accelerated Libraries\
**Created:** [October 3, 2018, 5:10pm UTC](https://forums.developer.nvidia.com/t/how-to-solve-rectangular-linear-systems-in-batch/65806 "2018-10-03T17:10:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Lund](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@David\_Lund](https://forums.developer.nvidia.com/u/David_Lund)\
**Post date:** [October 3, 2018, 5:10pm UTC](https://forums.developer.nvidia.com/t/how-to-solve-rectangular-linear-systems-in-batch/65806/1 "2018-10-03T17:10:17Z")

</div>

Hi,

I am trying to solve dense rectangular, linear systems A\*x = b in batch.

I have seen it is possible to solve the non-batched version using a combination of “geqrf”, “ormqr” and “trsm”, as shown in the following example:  
[url][https://docs.nvidia.com/cuda/cusolver/index.html#ormqr-example1[/url]](https://docs.nvidia.com/cuda/cusolver/index.html#ormqr-example1%5B/url%5D)

I have found batched versions of “geqrf” and “trsm”:  
[url][https://docs.nvidia.com/cuda/cublas/index.html#cublas-lt-t-gt-geqrfbatched[/url]](https://docs.nvidia.com/cuda/cublas/index.html#cublas-lt-t-gt-geqrfbatched%5B/url%5D)  
and  
[url][https://docs.nvidia.com/cuda/cublas/index.html#cublas-lt-t-gt-trsmbatched[/url]](https://docs.nvidia.com/cuda/cublas/index.html#cublas-lt-t-gt-trsmbatched%5B/url%5D)  
respectively.  
However, I am not able to find a batched “ormqr” function and can therefore not complete the solve.

i Is there another way to use the batched “geqrf” and “trsm” to complete the solve? (is there a reason that there’s no batched “ormqr”?)[/i]

As another possibility, I found that batched “gels” can solve an overdetermined linear system:  
[url][https://docs.nvidia.com/cuda/cublas/index.html#cublas-lt-t-gt-gelsBatched[/url]](https://docs.nvidia.com/cuda/cublas/index.html#cublas-lt-t-gt-gelsBatched%5B/url%5D)  
However, it seems batched “gels” lacks the possibility to solve underdetermined systems for the time being.

i Does anyone know if this limitation will be removed sometime soon?  
(3) Does anyone know if there is any other possible way to solve a dense rectangular, linear system in batch?[/i]

[Note: I found a post dealing with a similar question, which is about a year old:  
[url][https://devtalk.nvidia.com/default/topic/1021856/?comment=5200231[/url]](https://devtalk.nvidia.com/default/topic/1021856/?comment=5200231%5B/url%5D)  
However, the answer there only points to non-batched solutions.  
Therefore, I thought I should try my luck and ask the question again.]

Best regards,  
David
