IPB

Welcome Guest ( Log In | Register )

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda), Formerly "lossless codecs and CUDA"
gib
post Jul 13 2008, 05:34
Post #1





Group: Members
Posts: 227
Joined: 20-January 03
From: A Tropical Isle
Member No.: 4640



With my recent purchase of a 9000 series nVidia graphics card, I started thinking, has anyone investigated if nVidia's CUDA could be useful for lossless compression? I'm not even remotely close to being a programmer, so I haven't a clue how the code works, but it seems like CUDA is valuable for coding/decoding. I know nVidia is already holding a contest to speed up LAME (which ends in about 2 weeks), so perhaps it could be used to speed up lossless compressors? The fastest modes of several codecs are already blazing fast, approaching the limits of hard drives, but perhaps the high-compression modes could be sped-up through CUDA. Maybe, if the speed-up is enough, developers could even implement more ways to gain compression while still maintaining good encoding rates. It would be pretty cool if compression levels like La's best could be done at 50x or something.

Anyway, my curiosity is large, so just thought I'd ask. :)
Go to the top of the page
+Quote Post
 
Start new topic
Replies
guruboolez
post Sep 26 2009, 18:57
Post #2





Group: Members (Donating)
Posts: 3474
Joined: 7-November 01
From: Strasbourg (France)
Member No.: 420



I'm far from ridiculous performances with my little fanless 9400GT - so further improvements are still welcome smile.gif

CODE
       0.4     0.6
-0    102.29  145.79    +43%
-2     91.93  127.71    +39%
-4     62.25   54.83    -12%
-6     42.82   47.34    +11%
-8     26.29   36.49    +39%
-10    11.75   15.22    +30%


Speed is clearly better except for -4 compression level for which flacuda 0.4 is faster but with lower compression ratio (see table below).
The file is a 54 minutes full album on .wav (PCM) format. That's really impressive. Congratulations!

Could someone tell me if it's normal that CUETools.FlaCuda.exe reaches a 50% load on my Core2Duo E6300/9400GT whatever the compression level I choose? Shouldn't the CPU stay inactive during the encoding process? I'm using fb2k so I checked on foobar2000 options if I didn't do something wrong (like active DSP…) but apparently it isn't the case. Is it the same with stronger GPU?


APPENDIX: full table

CODE

flacuda version 0.4 size in KB
GPU -0 102.29x 265.028
GPU -2 91.93x 263.071
GPU -4 62.25x 262.059
GPU -6 42.82x 261.771
GPU -8 26.29x 261.579
GPU -10 11.75x 261.254
GPU -11 7.75x 261.137

flacuda version 0.6
GPU -0 145.79x 265.543
GPU -1 131.13x 263.687
GPU -2 127.71x 262.563
GPU -3 126.77x 262.335
GPU -4 54.83x 261.881
GPU -6 47.34x 261.712
GPU -8 36.49x 261.578
GPU -10 15.22x 261.253
GPU -11 9.92x 261.137


flac.exe version 1.21
CPU -0 122.84x 275.077
CPU -5 74.47x 263.170
CPU -8 26.88x 262.408
Go to the top of the page
+Quote Post
Gregory S. Chudo...
post Sep 26 2009, 19:23
Post #3





Group: Developer
Posts: 690
Joined: 2-October 08
From: Ottawa
Member No.: 59035



QUOTE (guruboolez @ Sep 26 2009, 21:57) *
Could someone tell me if it's normal that CUETools.FlaCuda.exe reaches a 50% load on my Core2Duo E6300/9400GT whatever the compression level I choose? Shouldn't the CPU stay inactive during the encoding process? I'm using fb2k so I checked on foobar2000 options if I didn't do something wrong (like active DSP…) but apparently it isn't the case. Is it the same with stronger GPU?

Yep... Maybe NVIDIA will fix this at some point, but currently the function call that's waiting for the GPU to finish work is wasting 100% of one CPU, obviously just spinning in a loop and constantly checking if GPU is ready. There are options in CUDA which control the waiting mode, but the one which was supposed to make a process sleep and wait for results doesn't seem to be working on Windows Vista, i suppose it's only implemented on Linux where CUDA driver is more advanced.

This post has been edited by Gregory S. Chudov: Sep 26 2009, 19:25


--------------------
CUETools 2.1.4
Go to the top of the page
+Quote Post
alvaro84
post Sep 27 2009, 06:35
Post #4





Group: Members
Posts: 128
Joined: 9-August 06
Member No.: 33830



QUOTE (Gregory S. Chudov @ Sep 26 2009, 19:23) *
Yep... Maybe NVIDIA will fix this at some point, but currently the function call that's waiting for the GPU to finish work is wasting 100% of one CPU, obviously just spinning in a loop and constantly checking if GPU is ready. There are options in CUDA which control the waiting mode, but the one which was supposed to make a process sleep and wait for results doesn't seem to be working on Windows Vista, i suppose it's only implemented on Linux where CUDA driver is more advanced.


Now that you mentioned... I had a look at the processes and foobar eats up ~20% and FlaCuda ~38 while converting.
It would be interesting to compare the energy consumption of the CPU and GPU implementation but I don't have the proper instruments now...
Go to the top of the page
+Quote Post

Posts in this topic
- gib   FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)   Jul 13 2008, 05:34
- - Martel   I apologize for being completely incorrect.   Jul 13 2008, 09:29
|- - Garf   QUOTE (Martel @ Jul 13 2008, 10:29) If I...   Jul 13 2008, 10:00
- - gib   Ah, I see now. Thanks very much for the response,...   Jul 14 2008, 03:52
- - Gregory S. Chudov   Here is good news. An alfa version of flac encode...   Sep 10 2009, 03:27
- - Dr_Colossus   Sounds awesome, care to elaborate on the performan...   Sep 10 2009, 05:58
- - Gregory S. Chudov   Less impressive than i hoped to, but this is only ...   Sep 10 2009, 06:05
- - Grunpfnul   No love for ati? *sniff*   Sep 10 2009, 09:24
- - Gregory S. Chudov   There is love, but there's no implementation ^...   Sep 10 2009, 09:49
- - Case   I ran some tests with my Core i7 940 (stock speed)...   Sep 10 2009, 16:30
- - Gregory S. Chudov   Thank you!   Sep 10 2009, 20:34
- - Ron Jones   I'm anxious to see how this would perform on t...   Sep 10 2009, 20:44
- - thundat00th   QUOTE (Grunpfnul @ Sep 10 2009, 03:24) No...   Sep 10 2009, 21:20
- - hlloyge   Here are my test results: Klaus Shultze - Dreams ...   Sep 10 2009, 22:42
- - Gregory S. Chudov   What was the file size for flac -6? We should comp...   Sep 10 2009, 23:33
- - Wombat   Not to shabby. Tried it on a C2D@3600+GTX260 Drea...   Sep 11 2009, 00:33
- - GHammer   This is on a 9500 GT FlaCuda Filename : Clocks.w...   Sep 11 2009, 02:21
- - Gregory S. Chudov   QUOTE (GHammer @ Sep 11 2009, 05:21) Flac...   Sep 11 2009, 03:24
- - Lucho   GPU audio encoding will be useful when OpenCL get ...   Sep 11 2009, 08:28
- - hlloyge   Here I am again, this time, more detailed: Flac 1...   Sep 11 2009, 19:52
|- - Justin Ruggles   QUOTE (hlloyge @ Sep 11 2009, 14:52) Is t...   Sep 12 2009, 02:45
- - gib   Hey, wow. This topic of mine was bumped, and with...   Sep 12 2009, 06:10
- - PatchWorKs   Well, I believe that even a small gain is always w...   Sep 12 2009, 09:40
- - hlloyge   Again: C2D8200, Geforce 9600GT album.wav to flac ...   Sep 12 2009, 10:32
- - Gregory S. Chudov   QUOTE (PatchWorKs @ Sep 12 2009, 12:40) I...   Sep 12 2009, 11:33
- - Dologan   Wow, nice work Gregory! Just wondering... how...   Sep 12 2009, 11:40
- - Gregory S. Chudov   Current GPUs do integer computations quite alright...   Sep 12 2009, 11:52
|- - Garf   QUOTE (Gregory S. Chudov @ Sep 12 2009, 12...   Sep 12 2009, 21:35
- - Dologan   Hmm, does the encoder do pipe encoding (i.e. for p...   Sep 12 2009, 12:15
- - Wombat   Some questions regarding Flaccuda. Back when flake...   Sep 12 2009, 13:41
- - Maurits   How hard would it be to convert this CUDA version ...   Sep 12 2009, 14:48
- - Gregory S. Chudov   QUOTE (Dologan @ Sep 12 2009, 15:15) Hmm,...   Sep 12 2009, 15:07
|- - Maurits   QUOTE (Gregory S. Chudov @ Sep 12 2009, 15...   Sep 12 2009, 15:57
|- - Dologan   QUOTE (Gregory S. Chudov @ Sep 12 2009, 15...   Sep 12 2009, 17:40
- - Wombat   Thanks for explaining it. Really a nice work you h...   Sep 12 2009, 15:39
- - guruboolez   My results on a old Core2Duo E6300 and small Nvidi...   Sep 12 2009, 20:09
- - arri   Just finished my tests: image.wav: flac 1.2.1  ...   Sep 12 2009, 22:16
- - Wombat   QUOTE (arri @ Sep 12 2009, 22:16) Just fi...   Sep 12 2009, 22:51
|- - arri   QUOTE (Wombat @ Sep 12 2009, 23:51) Afaik...   Sep 12 2009, 23:40
- - Wombat   QUOTE (arri @ Sep 12 2009, 23:40) QUOTE (...   Sep 12 2009, 23:53
- - Case   I made a more thorough comparison with the new ver...   Sep 13 2009, 10:00
- - hlloyge   It sure isn't that compile, as they (at least ...   Sep 13 2009, 14:36
- - alvaro84   I've done a quick test, how a 2+ year old full...   Sep 13 2009, 16:19
- - Gregory S. Chudov   Thank you for detailed test results. Looking at th...   Sep 13 2009, 16:47
|- - alvaro84   QUOTE (Gregory S. Chudov @ Sep 13 2009, 16...   Sep 13 2009, 19:33
|- - Gregory S. Chudov   QUOTE (alvaro84 @ Sep 13 2009, 22:33) Is ...   Sep 13 2009, 19:42
- - Case   Seems to me like other modes got a speed boost too...   Sep 13 2009, 21:39
- - Gregory S. Chudov   Phew. I think i finally squeezed everything i coul...   Sep 14 2009, 20:25
- - Case   Impressive.   Sep 14 2009, 21:18
|- - alvaro84   QUOTE (Case @ Sep 14 2009, 21:18) Impress...   Sep 15 2009, 04:57
- - Gregory S. Chudov   Thank you.   Sep 14 2009, 21:26
- - sauvage78   So far I wasn't much interested in the small c...   Sep 15 2009, 05:24
- - hlloyge   I wouldn't kill nVidia just yet. AFAIK, as of ...   Sep 15 2009, 06:50
- - sauvage78   IMHO audio or video encoding will not help nvidia ...   Sep 15 2009, 07:05
|- - GeSomeone   QUOTE (sauvage78 @ Sep 15 2009, 08:05) As...   Sep 15 2009, 12:43
|- - odyssey   QUOTE (GeSomeone @ Sep 15 2009, 13:43) QU...   Sep 16 2009, 09:11
|- - alvaro84   QUOTE (odyssey @ Sep 16 2009, 09:11) Now ...   Sep 17 2009, 08:51
|- - skamp   QUOTE (alvaro84 @ Sep 17 2009, 09:51) Sou...   Sep 19 2009, 09:38
|- - alvaro84   QUOTE (skamp @ Sep 19 2009, 09:38) As for...   Sep 19 2009, 13:04
- - Case   Just converted my entire FLAC -8 library to FlaCud...   Sep 15 2009, 20:34
- - Wombat   Seems like i found a strange behaviour. If you hav...   Sep 16 2009, 08:45
|- - [JAZ]   QUOTE (Wombat @ Sep 16 2009, 09:45) Seems...   Sep 16 2009, 18:36
- - lvqcl   FlaCuda_0.4 with "-8" switch, original t...   Sep 16 2009, 19:09
- - Wombat   QUOTE (lvqcl @ Sep 16 2009, 20:09) FlaCud...   Sep 16 2009, 19:14
- - Gregory S. Chudov   Added lossyWav support. It shouldn't make any ...   Sep 17 2009, 23:12
- - Wombat   Thanks for your fast work on that!! Works ...   Sep 17 2009, 23:30
- - Gregory S. Chudov   Is there anybody here who knows the math behind Ch...   Sep 18 2009, 19:05
- - Gregory S. Chudov   I must add, that when computations are done in dou...   Sep 18 2009, 19:54
- - gib   I've gotten flacuda to work with the old but s...   Sep 19 2009, 22:39
- - Wombat   QUOTE (gib @ Sep 19 2009, 23:39) I've...   Sep 19 2009, 23:10
- - gib   Wombat, thanks for the suggestion of using Multi F...   Sep 20 2009, 00:41
- - Gregory S. Chudov   Here is version that is a tiny bit faster, i hope....   Sep 25 2009, 23:45
- - Wombat   I eally canīt tell if your FlaCuda became any fast...   Sep 26 2009, 01:58
- - Case   This is getting ridiculous. New FlaCuda 0.6 is fas...   Sep 26 2009, 11:19
- - alvaro84   I second, it's ridiculous Now FlaCuda 0.6 at ...   Sep 26 2009, 12:54
- - hlloyge   CUDA: CODED:\temp_2>CUETools.FlaCuda...   Sep 26 2009, 13:31
- - guruboolez   I'm far from ridiculous performances with my l...   Sep 26 2009, 18:57
|- - Gregory S. Chudov   QUOTE (guruboolez @ Sep 26 2009, 21:57) C...   Sep 26 2009, 19:23
|- - alvaro84   QUOTE (Gregory S. Chudov @ Sep 26 2009, 19...   Sep 27 2009, 06:35
- - Dologan   Holy crap! Nice work, Greg! FlaCuda -4 on...   Sep 26 2009, 18:58
- - guruboolez   Thank you for the explanation, Gregory. I Hope it...   Sep 26 2009, 19:36
- - odyssey   It crashes on my Geforce 9300 that's supposed ...   Sep 26 2009, 20:15
|- - Gregory S. Chudov   Previous versions too?   Sep 26 2009, 21:20
- - odyssey   FlaCUDA03-05: CODEError : Exception of type ...   Sep 27 2009, 01:37
- - Wombat   One small question about FlaCudas default blocksiz...   Oct 1 2009, 01:01
- - Gregory S. Chudov   Smaller blocks make it slower, but have their adva...   Oct 1 2009, 07:17
- - johnsonlam   Sorry for breaking in ... Did someone planning fo...   Oct 1 2009, 15:40
|- - odyssey   QUOTE (johnsonlam @ Oct 1 2009, 16:40) Di...   Oct 1 2009, 15:48
|- - johnsonlam   QUOTE (odyssey @ Oct 1 2009, 22:48) QUOTE...   Oct 2 2009, 08:49
- - hlloyge   That was exactly what I was thinking - because it ...   Oct 1 2009, 20:08
- - glebe   johnsonlam, see screenshot   Oct 2 2009, 17:42
|- - johnsonlam   QUOTE (glebe @ Oct 3 2009, 00:42) johnson...   Oct 5 2009, 17:27
- - Rotareneg   Sempron 3400+ (Socket 754) o/c'ed to 2500 MHz,...   Oct 4 2009, 01:14
- - Ron Jones   Can't wait to see how Fermi does with FLACuda....   Oct 4 2009, 02:08
|- - VeaaC   QUOTE (Ron Jones @ Oct 4 2009, 03:08) Can...   Oct 5 2009, 02:56
|- - Garf   QUOTE (VeaaC @ Oct 5 2009, 03:56) QUOTE (...   Oct 5 2009, 20:06
|- - probedb   QUOTE (Garf @ Oct 5 2009, 20:06) Or OpenC...   Oct 5 2009, 20:44
|- - alvaro84   QUOTE (probedb @ Oct 5 2009, 20:44) QUOTE...   Oct 7 2009, 12:59
|- - Maurits   QUOTE (probedb @ Oct 5 2009, 20:44) QUOTE...   Oct 8 2009, 09:44
- - Maurits   QUOTE AMD Leads Industry as First Chip Supplier to...   Oct 19 2009, 12:17
5 Pages V   1 2 3 > » 


Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 1st August 2014 - 05:14