Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda) (Read 468215 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #75
CUDA:

Code: [Select]
D:\temp_2>CUETools.FlaCuda.exe -8 "Coldplay - Left Right Left Right Left.wav"
CUETools.FlaCuda, Copyright (C) 2009 Gregory S. Chudov.
This is free software under the GNU GPLv3+ license; There is NO WARRANTY, to
the extent permitted by law. <http://www.gnu.org/licenses/> for details.
Filename  : Coldplay - Left Right Left Right Left.wav
File Info : 44100kHz; 2 channel; 16 bit; 00:39:54.7470000
Results   : 157,73x; 285525875 bytes in 00:00:15.1828684 seconds;


FLAC took one minute and 12 seconds!

Code: [Select]
D:\temp_2>flac -8 "Coldplay - Left Right Left Right Left.wav"
flac 1.2.1, Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007  Josh Coalson
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.
Coldplay - Left Right Left Right Left.wav: wrote 285951666 bytes, ratio=0,677


Mighty Impressive! I think I will use FlaCuda for FLAC encoding.
Error 404; signature server not available.

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #76
I'm far from ridiculous performances with my little fanless 9400GT - so further improvements are still welcome 

Code: [Select]
       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: [Select]
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

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #77
Holy crap! Nice work, Greg!

FlaCuda -4 on my 8800GT is now pretty much as fast FLAC -6 as 3 of my Q6600 cores, with a tiny bit better compression. The strange slowdown I was getting when using multiple converter threads seems no longer to be an issue; in fact, it speeds up from one thread to up to three, after which it seems to slightly slow down.

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #78
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.
CUETools 2.1.6

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #79
Thank you for the explanation, Gregory. I Hope it'll be fixed by Nvidia soon.

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #80
It crashes on my Geforce 9300 that's supposed to support CUDA 

Works fine on my Quadro 2700M though.
Can't wait for a HD-AAC encoder :P

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #81
Previous versions too?
CUETools 2.1.6

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #82
FlaCUDA03-05:
Code: [Select]
Error     : Exception of type 'GASS.CUDA.CUDAException' was thrown.


FlaCUDA06 shows info of source-file, then crashes in Windows and returns in the console at last:
Code: [Select]
Unhandled Exception: ErrorNotInitialized


Can you recommend anything stable I can test/verify that CUDA is working correctly on my GPU?
Can't wait for a HD-AAC encoder :P

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #83
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...

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #84
One small question about FlaCudas default blocksize. When i remeber right flac used a blocksize at -8 of 4608 and changed to 4096 cause of small advantages in compression on average. My own limited tests with FlaCuda show also a tiny advantage with the blocksize at 4096 with a selection of mixed kinds of music.
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #85
Smaller blocks make it slower, but have their advantages. I will try to reduce performance penalty for smaller blocks if i can.
CUETools 2.1.6

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #86
Sorry for breaking in ...

Did someone planning for a Foobar2000 Flac-CUDA plugin?
Will makes the conversion a lot easier.
Hong Kong - International Joke Center (after 1997-06-30)

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #87
Did someone planning for a Foobar2000 Flac-CUDA plugin?

No need for a plugin. foobar2000 relies on commandline encoders, and you can setup any commandline-encoder as you wish - including FlaCUDA. However, if you have a multicore CPU, you might need to set the Thread Count to 1 under Advanced, since this encoder is not CPU-dependant. Note that this affects all encoders (including CPU dependant).

Would be nice if this setting was user-definable for each encoder.
Can't wait for a HD-AAC encoder :P

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #88
That was exactly what I was thinking - because it is needed, too, when using iTunes AAC encoder through foobar2000.
Error 404; signature server not available.

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #89
Did someone planning for a Foobar2000 Flac-CUDA plugin?

No need for a plugin. foobar2000 relies on commandline encoders, and you can setup any commandline-encoder as you wish - including FlaCUDA. However, if you have a multicore CPU, you might need to set the Thread Count to 1 under Advanced, since this encoder is not CPU-dependant. Note that this affects all encoders (including CPU dependant).

Would be nice if this setting was user-definable for each encoder.


Thanks.

Any example of setting FlacCUDA in Foobar2000?
I'm not good at command line settings.
Hong Kong - International Joke Center (after 1997-06-30)

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #90
johnsonlam, see screenshot

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #91
Sempron 3400+ (Socket 754) o/c'ed to 2500 MHz, GeForce GTX 260 Core 216 at standard frequencies:

Album is Paul Simon's Graceland, converted to a single 456,539,708 byte WAV.

Flac 1.2.1b (RareWare's ICL compile) -8 : 01:06.812, 250,990,457 bytes.

FlaCuda06 -8 : 00:26.015, 250,421,454 bytes.

2.57x faster, sounds good to me!

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #92
Can't wait to see how Fermi does with FLACuda. Very exciting stuff to think about, that's for certain.

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #93
Can't wait to see how Fermi does with FLACuda. Very exciting stuff to think about, that's for certain.


A DirectX11 version would be better as it could run on ATI hardware too. 

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #94
johnsonlam, see screenshot


Thank you very much for your help!

Hong Kong - International Joke Center (after 1997-06-30)


FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #96
Or OpenCL...


Haven't Nvidia just realised their OpenCL drivers? Wish AMD would do the same!


FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #98
Or OpenCL...


Haven't Nvidia just realised their OpenCL drivers? Wish AMD would do the same!


Apparently AMD/ATI is not sitting on its hands: ATI Jumps on OpenCL Bandwagon by Releasing OpenCL Drivers.

OpenCL would be a lot better than DirectX support as it means it won't be limited to just Windows. Apparently Windows 7 comes standard with OpenCL compatible NVIDIA drivers which is promising...

A more in depth look at OpenCL: OpenCL: To GPGPU and Beyond
AMD: An Introduction to OpenCL
Every night with my star friends / We eat caviar and drink champagne
Sniffing in the VIP area / We talk about Frank Sinatra
Do you know Frank Sinatra? / He's dead

FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)

Reply #99
Quote
AMD Leads Industry as First Chip Supplier to Offer OpenCL™ Development Kit that Supports GPUs and x86 CPUs

ATI Stream SDK v2.0 beta with support for OpenCL 1.0 allows developers to program complete AMD platforms for breakthrough performance on processing-intensive applications

October 19, 2009 12:01 AM Eastern Daylight Time

SUNNYVALE, Calif.--(EON: Enhanced Online News)--AMD (NYSE: AMD) announced availability of a key piece of its strategy to help improve the end-user's compute experience by leveraging the combined power of AMD graphics processors (GPUs) and AMD multi-core x86 processors through software. With the beta release of its ATI Stream Software Development Kit (SDK) v2.0, featuring OpenCL 1.0 support, AMD provides a free set of tools software developers can use to create applications that are accelerated by AMD GPUs and AMD multi-core x86 CPUs working together. The ATI Stream SDK v2.0 is certified compliant with OpenCL 1.0 by the Khronos Working Group.

    * The ATI Stream SDK v2.0 beta is available for download today and can be accessed here.


Good news...
Every night with my star friends / We eat caviar and drink champagne
Sniffing in the VIP area / We talk about Frank Sinatra
Do you know Frank Sinatra? / He's dead