Discussion:
[theano-users] float64 gpu cholesky factorization and triangular solve
Wong Hang
2018-10-18 04:15:42 UTC
Permalink
Hi there,

May I ask why theano gpuarray does not support float64 cholesky
factorization and triangular solve?
Are there any reason behind that?
I think I can simply hack the code in theano/gpuarray/linalg.py to
invoke cusolver.cusolverDnDpotrf / cublas.cublasDtrsm / cublas.cublasDtrsv
rather than cusolver.cusolverDnSpotrf / cublas.cublasStrsm /
cublas.cublasStrsv to get float64 support?

Best,
Hang
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Arnaud Bergeron
2018-10-18 17:39:05 UTC
Permalink
Post by Wong Hang
Hi there,
May I ask why theano gpuarray does not support float64 cholesky factorization and triangular solve?
Are there any reason behind that?
The main reason is that there is little interest in float64 because it is *much* slower than float32 on GPUs.
Post by Wong Hang
I think I can simply hack the code in theano/gpuarray/linalg.py to invoke cusolver.cusolverDnDpotrf / cublas.cublasDtrsm / cublas.cublasDtrsv rather than cusolver.cusolverDnSpotrf / cublas.cublasStrsm / cublas.cublasStrsv to get float64 support?
Yes, that should work, but make sure to update the surrounding support code so that it checks for float64 rather than float32. You could also make it switch the function used based on the input argument types.
Post by Wong Hang
Best,
Hang
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Wong Hang
2018-10-19 02:34:28 UTC
Permalink
Thank you very much for your reply.
I have several GPU with high TFLOPS double precision and I somehow need
linear algebra subroutine (and automatic differentiation of them to save
time) to do my work.
theano is the only framework that currently suits my need. I may implement
it by myself and will later pull request later.
Post by Wong Hang
Hi there,
May I ask why theano gpuarray does not support float64 cholesky
factorization and triangular solve?
Are there any reason behind that?
The main reason is that there is little interest in float64 because it is
*much* slower than float32 on GPUs.
I think I can simply hack the code in theano/gpuarray/linalg.py to
invoke cusolver.cusolverDnDpotrf / cublas.cublasDtrsm / cublas.cublasDtrsv
rather than cusolver.cusolverDnSpotrf / cublas.cublasStrsm /
cublas.cublasStrsv to get float64 support?
Yes, that should work, but make sure to update the surrounding support
code so that it checks for float64 rather than float32. You could also
make it switch the function used based on the input argument types.
Best,
Hang
--
---
You received this message because you are subscribed to the Google Groups
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...