-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPU implementation #21
Comments
@ccruizm seems you can invoke the GPU utility by
and all the commands are available with
I have tried it on a V100 GPU and it takes forever even for 2 epochs on my data. I am not sure are there any further preprocessing required!. I think I should try the spectra test data and see what happens. |
hi all,
I’m in the process of adding a new GPU file.
…On Wed, Jun 14, 2023 at 2:40 PM Shams ***@***.***> wrote:
@ccruizm <https://github.com/ccruizm> seems you can invoke the GPU
utility by
from spectra import spectra_gpu as spc_gpu
and all the commands are available with spc_gpu.'...'. It seems still
experimental and gives info while calling
Spectra GPU support is still under development. Raise any issues on github
Changes from v1:
(1) GPU support [see tutorial]
(2) minibatching for local parameters and data
Note that minibatching may affect optimization results
Code will eventually be merged into spectra.py
I have used it on a V100 GPU and it takes forever even for 2 epochs on my
data. I am not sure are there any further preprocessing required!. I think
I should try the spectra test data and see what happens.
—
Reply to this email directly, view it on GitHub
<#21 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACNE3EGVNDTUYWZHPFQ4UKDXLIVUVANCNFSM6AAAAAAZEPBIL4>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Thanks for your comments @kvshams and looking forward to testing the new GPU implementation @russellkune 🤓 |
That’s a great improvement but not sure why it’s not showing in the resource usage. Is there any branch that I can try the new implementation?. |
It is implemented in the master branch. I only changed the code |
Thank you for very quick response.
Are there any specific commands or preprocesses required? I tried it
yesterday. CPU version is running fine but when I tried on GPU version, it
seems not working even for 2 epochs. Am I missing something?
Thanks
Shams
On Thu, Jun 15, 2023 at 6:59 AM Cristian ***@***.***> wrote:
It is implemented in the master branch. I only changed the code from
spectra import spectra_gpu as spc and kept everything the same.
—
Reply to this email directly, view it on GitHub
<#21 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTFBLCAF2XJFNOBV5XQVJDXLLTJBANCNFSM6AAAAAAZEPBIL4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Email from machine with auto correction = Cell phone
|
Not at all. I am running exactly the same pipeline, only with the change I mentioned before. Maybe there are some issues with
Do you see you GPU? |
Yes, I have GPU detected in the session. Just modified the snippets above
that gives,
My session info is
|
@russellkune Seems there are two independent problems.
My data set is (114k cells, 14 cell types, 100 gene sets and kept use_highly_variable=False with about 5k genes).
Then the Kernel dies. |
Finally it works (n#1 did work after about an hour stalling. Not sure what is causing it, but once it started the process, it was much faster, yay!). Are there any reason for not having Update: for the stallingSeems it is associated with the memory allocation process. Got a GPU memory error while running multiple scripts in the same GPU core
|
Nice you made it work @kvshams! About your second comment, I also experienced something similar (running on CPU tho). I raised an issue (#22) but closed it because I could not reproduce it in another HPC infrastructure. If you are having the same problem, it might be worthwhile to look at why this is happening. |
I thought that option is not there in the spectra_gpu.py functions. I
couldn’t find those options there. Am I missing something?
Shams
On Fri, Jun 16, 2023 at 1:07 AM Cristian ***@***.***> wrote:
Nice you made it work @kvshams <https://github.com/kvshams>! About your
second comment, I also experienced something similar (running on CPU). I
raised an issue (#22 <#22>) but
closed it because I could not reproduce it in another HPC infrastructure.
If you are having the same problem, it might be worthwhile to look at why
this is happening.
—
Reply to this email directly, view it on GitHub
<#21 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTFBLAB6CS7WFPGQG7SP4DXLPSYRANCNFSM6AAAAAAZEPBIL4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Email from machine with auto correction = Cell phone
|
I guess if I call both gpu and cpu version in the same notebook (ie For the speed it is ~3x faster in my case too (in 16 core CPU, 240g VM it is ~21hrs and on a Tesla V100-SXM2-32GB GPU vm with 16 core CPU its ~7hrs). What is the timeline for adding the new GPU file? Are there any big difference that I need to be worried about using the results in the current version? |
I am also seeing same issue. Yesterday I saw my script was running in the GPU but did not finish due to insuffiecient memory. On fresh node today, it is running 3X faster but the PID is not listed in
|
Well, I have some results to share 🤓
I was waiting for the CPU job to finish and compare the results because I found some 'weird' behavior in the GPU run, but it also happened on the CPU implementation. I will raise a new issue to ask about it. |
Good day,
I would like to know whether
Spectra
can use GPU. n the example notebook could not find much information about it, but I saw there seems to be an implementation to use GPU (https://github.com/dpeerlab/spectra/blob/main/spectra/spectra_gpu.py).Does this automatically detect I am using a GPU node? Are there differences in the outcome between running using CPU vs GPU?
Thanks in advance!
The text was updated successfully, but these errors were encountered: