Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CPU vs GPU
#1
hi,
okay so i understood that the GPU can also compute parallel and is also suitable for that,
i understood there's a software called CUDA that makes it possible to run the program (code) in the GPU,
i do have a NVIDIA GPU but unfortunately it is not compatible with CUDA, but now is my question (and therefore my consequent decision if to replace my GPU with a new compatible one),
what i need to know is whether in having the GPU do the following job, is will it be much faster ?

i have about 20,000 csv files, with 5 days/raws per week with 7 float numbers per day for about the last 30 years on average....
these csv files comprise the stock charts that are to be viewed, but the bulk of the code will run on the csv files - finding patterns.

now, will it make much difference whether the CPU or the GPU do the job ? in this certain scenario
Reply
#2
(Nov-24-2022, 11:26 PM)astral_travel Wrote: now, will it make much difference whether the CPU or the GPU do the job ? in this certain scenario
Yes,the differnce can be big it depend on the task.
A lot of stuff is happing in data science space with parallel computing as Python is so much used.

Can try out GPU for free with Colab,so will give you a free GPU to use.
It easy to use just change runtime to GPU here a Notebook where a test the speed.
So CPU use 41-sec and GPU use 1.5-sec

Dask and Ray are libaires that make parallel computing in Python easier.
I write a some about in this post that can look at.
Larz60+ likes this post
Reply
#3
okay, i understand Colab enables you to run the code on a remote server ? is this correct ?
Reply
#4
(Nov-25-2022, 10:18 AM)astral_travel Wrote: okay, i understand Colab enables you to run the code on a remote server ? is this correct ?
Yes,as it run bye Google so use there server park CPU/GPU.
Also a lot is pre-installed eg if want run Pandas,Dask,Matplotlib...ect and don't need to install anything.
If you not familiar with this so is Notebook format a popular way to run Python code i web-based interactive development.
Can install and run it loacal with you Pc JupyterLab.
Reply
#5
okay, well - one thing i don't want is having my code be for others to see, that includes the service's staff....

i want to have it run locally (on my laptop) with my own GPU,

one additional question i have is this - is there a way to load the CSV data files on to the RAM memory and work on it from there ? does it make a time execution difference when i have an SSD hardisk ?
Reply
#6
(Nov-25-2022, 01:32 PM)astral_travel Wrote: okay, well - one thing i don't want is having my code be for others to see, that includes the service's staff....
It's not like Google service's staff can go in an look at your private stuff without a very good reason,like foreded bye legal requests.
(Nov-25-2022, 01:32 PM)astral_travel Wrote: one additional question i have is this - is there a way to load the CSV data files on to the RAM memory and work on it from there ? does it make a time execution difference when i have an SSD hardisk ?
Python will use all the memory that's available on your Pc,look at advice in Dask DataFrame
Dask doc Wrote:
  • If your dataset fits comfortably into RAM on your laptop, then you may be better off just using pandas.
    There may be simpler ways to improve performance than through parallelism
If not can Dask help.
Dask doc Wrote:
  • Manipulating large datasets, even when those dataset s don’t fit in memory
  • Accelerating long computations by using many cores
Reply
#7
thank you very much

one more thing - is it possible to ruin the CPU or GPU by giving it a too much strong task ?
Reply
#8
(Nov-25-2022, 05:10 PM)astral_travel Wrote: one more thing - is it possible to ruin the CPU or GPU by giving it a too much strong task ?
No,or that is extremely rare that it happens,it's build in safte guard for CPU/GPU when temp get to high then Pc will shut down.
Can look temp when run program thar use much CPU/GPU,eg Open Hardware Monitor.
Reply
#9
i see,

do you know such software (hardware moinitor) for linux ? (ubuntu)

i wanted to search for it in the 'ubuntu software' application but it doesn't work now for some reason...
Reply
#10
(Nov-25-2022, 07:31 PM)astral_travel Wrote: do you know such software (hardware moinitor) for linux ? (ubuntu)
Open Hardware Monitor Alternatives for Linux
For Linux so can also most of the time psutil work with the method psutil.sensors_temperatures().
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020