Hydrogenaudio Forums

Lossless Audio Compression => FLAC => Topic started by: gib on 2008-07-13 05:34:41

Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: gib on 2008-07-13 05:34:41
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.  :)
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Martel on 2008-07-13 09:29:29
I apologize for being completely incorrect.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Garf on 2008-07-13 10:00:06
If I'm not mistaken, lossless coding usually employs dictionary methods (like LZW/LZMA) which generate a lot of random access and branching operations.


Not at all!

Most lossless audio compressors use large predictive LPC filters. This would be an operation that is well fit to a GPU, if it weren't for a small detail: because of the need to be LOSSLESS, the operations are often integer, not floating point. It would be possible to do it in floating point also, but then there is a need to have PRECISELY defined operations, rounding, precision. Exactly what GPU's dont have.

Despite all the hype, there aren't that many things GPUs are actually good at.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: gib on 2008-07-14 03:52:43
Ah, I see now.  Thanks very much for the response, Garf.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2009-09-10 03:27:30
Here is good news.

An alfa version of flac encoder for GPU.

I only tested it on GTS 250, so i'm eager to hear from people with other cards.

As all my applications, this requires .NET framework.

And this time of course a CUDA-enabled graphics card (http://www.nvidia.com/object/cuda_learn_products.html).

Source code as usual on SourceForge (http://cuetoolsnet.svn.sourceforge.net/viewvc/cuetoolsnet/CUETools.FlaCuda/).

UPD1: A bit more optimized version re-tuned to not so paranoid compression levels.
UPD2: added pipe encoding for use with fb2k (encoder parameters: -5 - -o %d)
UPD3: seeking problem with pipe encoding in fb2k fixed, lower compression levels speed up.
UPD4: general speed improvement
UPD5: wasted_bits/lossyWav support
UPD6: final optimizations
UPD7: rice partitioning on GPU (--gpu-only), multi-core CPU utilization support (--cpu-threads #)
UPD8: default compression level changed to -7, rice partitioning on GPU on by default, memory/IO optimizations
UPD9: bugfix release; UPD91 - fb2k pipe input fix

* Download: [attachment=5617:FlaCuda091.rar]* Old version: [attachment=5407:FlaCuda06.rar]
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Dr_Colossus on 2009-09-10 05:58:56
Sounds awesome, care to elaborate on the performance for those of us without a CUDA capable card.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2009-09-10 06:05:54
Less impressive than i hoped to, but this is only initial version, and GPUs grow faster each day.
On my GTS 250 it's approximately as fast as my C# encoder (which is fast by the way).
FlaCuda -4 achieves the same compression ratio as reference flac -8 (version 1.2.1 on Core 2 Duo@3Gz) at approximately double-triple speed.
FlaCuda -8 is as slow as flac -8, but gives an extra 0.5% of compression ratio.
Would be nice if someone could thoroughly compare them on a different hardware and post his/her results here.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Grunpfnul on 2009-09-10 09:24:55
No love for ati? *sniff*
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2009-09-10 09:49:06
There is love, but there's no implementation ^^
But i guess someone else can do it, now that we have a proof-of-concept
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Case on 2009-09-10 16:30:06
I ran some tests with my Core i7 940 (stock speed) and GeForce GTX 285. Original wav file was 237368588 bytes in size. Not too impressive results:
FLAC -5 : Elapsed Time :  00:00:08.268 (181929373 bytes)
FLAC -8 : Elapsed Time :  00:00:30.560 (181788832 bytes)
FlaCuda -4 : Elapsed Time :  00:00:09.204 (181892106 bytes)
FlaCuda -5 : Elapsed Time :  00:00:10.904 (181763725 bytes)
FlaCuda -8 : Elapsed Time :  00:00:12.370 (181676614 bytes)
FlaCuda -11: Elapsed Time :  00:00:23.883 (181734405 bytes)
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2009-09-10 20:34:48
Thank you!
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Ron Jones on 2009-09-10 20:44:35
I'm anxious to see how this would perform on the next generation of NVIDIA hardware (GT300), which is supposedly significantly faster in general computational performance than the previous architecture (G200).

Very exciting -- thank you!
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: thundat00th on 2009-09-10 21:20:30
No love for ati? *sniff*

  as much as i love ati i wish they had as much support for things as nvidia does (they need to get to work on that hardware havok physics)

maybe the "evergreen" release here in a bit will improve things (i hope)

as far as this goes, i would be interested in lossy gpu encoding, and that might work a bit better regarding the inaccurate floating point calculations

ati stream support  pwease?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: itisljar on 2009-09-10 22:42:10
Here are my test results:

Klaus Shultze - Dreams Deluxe Edition, size 797 MB
Core2Duo 8200, Geforce 9600GT with passive cooling

Encoding with FLAC 1.2.1 in command line, -6, version from Sourceforge, 38 seconds

And this...

PS D:\temp_2> .\CUETools.FlaCuda.exe -6 '.\Klaus Schulze - Dreams Deluxe Edition.wav'
CUETools.FlaCuda, Copyright © 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  : .\Klaus Schulze - Dreams Deluxe Edition.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:19:00.8800000
Results  : 61,11x; 499280528 bytes in 00:01:17.5764372 seconds;

Windows 7 32 bit.

Well... not that impressive 

(edit) wrote 10 seconds too much for flac encode...
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2009-09-10 23:33:54
What was the file size for flac -6? We should compare the speed at the same compression ratio, e.g. output file size, not at the same compression level, because e.g. -6 for flac is much lower compression than -6 for flacuda. Please, try to compare flacuda -5 vs flac -8, and compare both execution times and file sizes.

Here's a graph i made of Case's results:
(http://www.cuetools.net/lib/exe/fetch.php/flacudatest.jpg)

This shows x3 speedup of flac -8 compression.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2009-09-11 00:33:17
Not to shabby. Tried it on a C2D@3600+GTX260

Dream Theater, Awake

Original    793.976.444 Bytes
Flac 1.21 -8    568.604.561 Bytes ~94 sec. encoding time
Flaccuda  -8   567.956.198 Bytes ~53 sec.

I don´t have a recent Flake version at hand so i don´t know how much comes from Cuda alone.

Edit:
Flaccuda -6      568.280.716 Bytes ~48 sec.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: GHammer on 2009-09-11 02:21:23
This is on a 9500 GT

FlaCuda
Filename  : Clocks.wav
File Info : 44100kHz; 2 channel; 16 bit; 00:05:07.4670000
Results  : 43.10x; 35657424 bytes in 00:00:07.1331000 seconds;

Flac 1.2.1
Clocks.wav: wrote 35796074 bytes, ratio=0.660
2.91 seconds

Both were just run as <executable> Clocks.wav
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2009-09-11 03:24:03
Flac 1.2.1
Clocks.wav: wrote 35796074 bytes, ratio=0.660
2.91 seconds

That's a bit too small file for comparison. And it's better to compare against flac -8. Default flac compression level is very fast, i don't think it can be beaten by FlaCuda, at least yet. FlaCuda is focusing on higher compression.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Lucho on 2009-09-11 08:28:15
GPU audio encoding will be useful when OpenCL get adopted by both ATI and Nvidia for now is just "proof of concept"
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: itisljar on 2009-09-11 19:52:45
Here I am again, this time, more detailed:

Flac 1.2.1 vs Cuda 01

File: album.wav  643566044

Windows 7, C2Q9400 @ 2.66 GHz, Geforce 9500 GS

flac -8: wrote 405957413 bytes, ratio=0,631 in 99 seconds
cuda -8: 34,98x; 405731414 bytes in 00:01:44.2910429 seconds;

Is there multicore flac encoder?  that would be a nice thing to test...
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Justin Ruggles on 2009-09-12 02:45:56
Is there multicore flac encoder?  that would be a nice thing to test...

http://softlab-pro-web.technion.ac.il/Proj.../downloads.html (http://softlab-pro-web.technion.ac.il/Projects/2008Winter/Performance%20Tuning/website/downloads.html)

I haven't tested this personally or done anything about trying to adapt the code for inclusion in Flake.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: gib on 2009-09-12 06:10:13
Hey, wow.  This topic of mine was bumped, and with proof of concept software to boot.  Thank you, Gregory!

Here are my results to add to the data (I used flac 1.2.1 -8 and Flacuda01 -8 as suggested):

CPU:  Athlon X2 @ 2.35 GHz
GPU:  9600 GSO @ 600 MHz

File 1:  656647868 bytes
Flac:    466183490 in 148 seconds
cuda:  465898530 in 65 seconds

File 2:  654389948 bytes
Flac:    362792762 in 145 seconds
cuda:  360670158 in 63 seconds

More than 2x faster and better compression too.  That's pretty impressive.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: PatchWorKs on 2009-09-12 09:40:29
Well, I believe that even a small gain is always welcome.

I'm not a developer, so I dunno if possible, but: what about a liboil (http://freshmeat.net/projects/liboil/)-like library but for GPGPU encodings, so *any* codec could benefit from GPU computations ?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: itisljar on 2009-09-12 10:32:54
Again: C2D8200, Geforce 9600GT

album.wav to flac -8

original: 578046380
flac: 344489508 in 80 seconds
cuda: 344226134 bytes in 00:00:52.8150209 seconds

Nice.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2009-09-12 11:33:27
I'm not a developer, so I dunno if possible, but: what about a liboil (http://freshmeat.net/projects/liboil/)-like library but for GPGPU encodings, so *any* codec could benefit from GPU computations ?

Not sure. The code i wrote is quite codec specific. The catch is in a relatively slow connection between CPU and GPU. I had to implement practically the whole FLAC algorithm on the device, so that i won't have to transfer intermediate values between host and GPU, only the final result.

FLAC turned out to be very convenient for GPU. Probably the most convenient. One look at e.g. ALAC algorithm was enough to understand it can never get the same benefit.

original: 578046380
flac: 344489508 in 80 seconds
cuda: 344226134 bytes in 00:00:52.8150209 seconds

Nice.

Thank you. And how about FlaCuda -5? It should provide enough compression to beat flac -8.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Dologan on 2009-09-12 11:40:13
Wow, nice work Gregory!

Just wondering... how did you get around the limitation mentioned by Garf earlier on this thread about GPUs only doing floating point and therefore not being suitable for lossless encoding?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2009-09-12 11:52:35
Current GPUs do integer computations quite alright.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Dologan on 2009-09-12 12:15:02
Hmm, does the encoder do pipe encoding (i.e. for proper foobar2000 use)?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2009-09-12 13:41:44
Some questions regarding Flaccuda.
Back when flake was new i had problems encoding at higher compression then standard Flac and playback on my Slimdevice.
Does Flaccuda use the same options at the corresponding compression level of Flac? At least it looks like i can play back Flaccuda -8 on my Slimdevice. How does it come it compresses better then?
Shouldn´t it be named "FlakeCuda" in the end?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Maurits on 2009-09-12 14:48:29
How hard would it be to convert this CUDA version into a more versatile OpenCL (http://en.wikipedia.org/wiki/OpenCL) implementation? It is said that OpenCL is largely based on CUDA but non vendor-specific. That suggests it should be easy to adapt.

That way it wouldn't be limited to NVIDIA GPUs. In fact, it would even remove the limit of just using a GPU as OpenCL can combine all available GPUs and processor cores in the system as if it was one unit.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2009-09-12 15:07:58
Hmm, does the encoder do pipe encoding (i.e. for proper foobar2000 use)?

It does now (version 02), but i would suggest to be careful with your precious files while this is still an alfa version.

Some questions regarding Flaccuda.
Back when flake was new i had problems encoding at higher compression then standard Flac and playback on my Slimdevice.
Does Flaccuda use the same options at the corresponding compression level of Flac? At least it looks like i can play back Flaccuda -8 on my Slimdevice. How does it come it compresses better then?
Shouldn´t it be named "FlakeCuda" in the end?

It doesn't use the same options at the corresponding compression levels. But it does stick to a so called FLAC subset (supported by hardware devices) for compression levels 0-8. Compression levels 9-11 are non-subset, and might not play on some devices. Flake has the same conventions.

Better compression is achieved mainly by brute-force search of optimal compression parameters (stereo modes, LPC orders, and window functions). Flac does this only at level 8, and it only tries one window function, and not the best one.

As much as i'm greateful to Justin for his wonderful Flake encoder, but unlike my C# Flake port, FlaCuda is not a derivative work. Flake's algorithm was written for CPU, not GPU, and those are two very different realms. Flake does a great job at smart guessing the best compression parameters, while FlaCuda just makes a brute-force search on a GPU. FlaCuda however contains a C# Flake library, and uses it for FLAC decompression, if source file is flac, or if --verify mode is enabled.

How hard would it be to convert this Cuda version into a more versatile OpenCL (http://en.wikipedia.org/wiki/OpenCL) implementation?

That way it wouldn't be limited to NVIDIA GPUs. In fact, it would even remove the limit of just using a GPU as OpenCL can combine all available GPUs and processor cores in the system as if it was one unit.

I'm not yet experienced enough in this matter, but i assume that this versatility will come for a price of speed. I will try to verify this later.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2009-09-12 15:39:16
Thanks for explaining it. Really a nice work you have done, thanks for that. Now i know what i can use Cuda for, it should really be mentioned on the nvidia Cuda pages.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Maurits on 2009-09-12 15:57:11
How hard would it be to convert this Cuda version into a more versatile OpenCL (http://en.wikipedia.org/wiki/OpenCL) implementation?

That way it wouldn't be limited to NVIDIA GPUs. In fact, it would even remove the limit of just using a GPU as OpenCL can combine all available GPUs and processor cores in the system as if it was one unit.

I'm not yet experienced enough in this matter, but i assume that this versatility will come for a price of speed. I will try to verify this later.


That's possible. Although a performance hit might be offset by the fact that OpenCL combines the CPU and all available GPUs. The biggest difference I seem to find after some research is that there are a couple of things implemented in CUDA that OpenCL doesn't have yet. However, if you don't use any of these additional features for your specific implementation that wouldn't matter.

I must say that I am only speculating, I don't know much about this matter either, I was just wondering...
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Dologan on 2009-09-12 17:40:07
Hmm, does the encoder do pipe encoding (i.e. for proper foobar2000 use)?

It does now (version 02), but i would suggest to be careful with your precious files while this is still an alfa version.

Wow, thanks! Pipe encoding  seems to be working, with no differences in the decoded data of the resulting file. Speed for -8 is ~70x on my 8800GT vs ~40x on a single core of my Q6600. However, the resulting file appears to be lacking any length and bitrate information and so seeking is impossible.

Also, obviously foobar2000 isn't ready to properly handle GPU encoding. With the converter set to handle three simultaneous encoding processes for my quad core, FlaCuda actually slows down to around ~35x overall, whereas the standard Flac naturally scales well to ~110x

So yeah, not quite flac-replacement ready, then  Looks promising for inherently single thread things like rip+encodes, though (once/if it gets tagging arguments implemented, that is)
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: guruboolez on 2009-09-12 20:09:52
My results on a old Core2Duo E6300 and small Nvidia GeForce 9400 GT. I took two disks: one solo piano disc that compress very well (<400 kbps) and a baroque orchestral work that doesn't (750 kbps).


PIANO MUSIC

Code: [Select]
WAV        594.191 KB
FLAC -5    163.122 KB    49313 milliseconds    x69.94
FLAC -8    159.276 KB   116641 milliseconds    x29.57
CUDA -0    158.750 KB    60188 milliseconds    x57.30
CUDA -4    158.024 KB    88531 milliseconds    x38.96
CUDA -8    156.881 KB   176656 milliseconds    x19.52
CUDA 11    156.799 KB   527922 milliseconds     x6.53



VIVALDI

Code: [Select]
WAV        754.037 KB
FLAC -5    393.834 KB    68047 milliseconds    x64.32
FLAC -8    393.279 KB   160109 milliseconds    x27.33
CUDA -0    394.796 KB    78688 milliseconds    x55.62
CUDA -4    394.034 KB   111469 milliseconds    x39.26
CUDA -8    393.191 KB   223328 milliseconds    x19.59
CUDA 11    392.079 KB    675656 milliseconds    x6.47


On this cheap GPU, FlaCuda 0.2 performs rather well. It can't be as fast as the CPU but this encoder could approach this speed at -0 and sometimes compress better than flac.exe -8! Nevertheless the CPU has two cores and only one was used for this benchmark.
If I'm not wrong a similar 9400 GPU is used in the ION system. It means that cheap and powerless nettops or netbooks with ION chipset could perfectly be used for batch flac encoding. To be confirmed...

SMALL DECODING SPEED:

Code: [Select]
FLAC -8:   x409
CUDA -8:   x392
CUDA 11:   x285


As you can see there's a drastic fall in decoding speed with flacuda -11 (tested with latest foobar2000). On my Sansa Clip (2GB) the playback seems to be fine (I just tried one file though).


More tests are needed but it looks like a very interesting encoder which should work nicely on a ION chipset.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Garf on 2009-09-12 21:35:32
Current GPUs do integer computations quite alright.


It used to be so, on the Nvidia side, that you can only do 24 bit arithmetic, which might be enough for FLAC. I don't know about ATI. 32-bits (i.e. normal) arithmetic is only possible with a huge performance penalty.

New versions of CUDA or the cards might have changed this, or FLAC might have been simple enough that it wasn't an issue.

PS. Are these posts comparing multithreaded FLAC implementations on the host? (I don't know if those exist)
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: arri on 2009-09-12 22:16:09
Just finished my tests: 

image.wav:
flac 1.2.1   -8 : 52 sec
flac-cuda  -8 : 32 sec

image.wav divided in 10 songs (1.wav, 2.wav etc.)
flac 1.2.1  -8 : 52 sec
flac-cuda  -8 : 32 sec

flac 1.2.1-icl : 30 sec

flac 1.2.1-icl is operating on both cores on my processor.
Intel Core 2 Duo E8500; Nvidia 8800 GT

flac 1.2.1-icl I found sometime ago somewhere in hydrogenaudio 
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2009-09-12 22:51:12
Just finished my tests: 

image.wav:
flac 1.2.1   -8 : 52 sec
flac-cuda  -8 : 32 sec

image.wav divided in 10 songs (1.wav, 2.wav etc.)
flac 1.2.1  -8 : 52 sec
flac-cuda  -8 : 32 sec

flac 1.2.1-icl : 30 sec

flac 1.2.1-icl is operating on both cores on my processor.
Intel Core 2 Duo E8500; Nvidia 8800 GT

flac 1.2.1-icl I found sometime ago somewhere in hydrogenaudio 


Afaik there isn´t a good Multi-Core version and i can´t believe a different compile can speed up by 75%. Please upload this version somewhere or link to its source.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: arri on 2009-09-12 23:40:00
Afaik there isn´t a good Multi-Core version and i can´t believe a different compile can speed up by 75%. Please upload this version somewhere or link to its source.


I think those different flac encoders I have came from rarewares (http://www.rarewares.org/lossless.php#flac-bundle)

Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2009-09-12 23:53:34
Afaik there isn´t a good Multi-Core version and i can´t believe a different compile can speed up by 75%. Please upload this version somewhere or link to its source.


I think those different flac encoders I have came from rarewares (http://www.rarewares.org/lossless.php#flac-bundle)

It can´t be that compile and please don´t waste my time with trying some versions you link to cause you "think" it may be the one.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Case on 2009-09-13 10:00:56
I made a more thorough comparison with the new version. I combined a wav from 18 different genres giving hopefully a better representation of real abilities. This compares each compression mode. Horizontal scale is compression ratio and vertical scale is encoding speed vs realtime. With this test set CUDA version was more efficient starting from compression mode 6 but then only faster than FLAC's modes 7 and 8.
[attachment=5395:flac_vs_flacuda.png]
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: itisljar on 2009-09-13 14:36:17
It sure isn't that compile, as they (at least for me) run at the same speed for -8.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: alvaro84 on 2009-09-13 16:19:04
I've done a quick test, how a 2+ year old full-fledged mainstream CPU (to be more precise: one core of it) stands against a pretty cheap, a little better than low-end GPU of its own era, both overclocked. The Core2 (E6420, Conroe core) duo runs at 3328Mhz with ddr2-832 cl4; the 8600GT runs at 580/1296/837MHz, this is all it can do with passive cooling (probably at a decreased core voltage).

CPU: 49.8x (3328/416MHz)
GPU: 69.4x (580/1296/837MHz)
GPU: 66.4x (540/1188/702MHz)

lv6:
GPU: 54.3x (580/1296/837MHz)

I've tested both -5 and -6 because for my test material file size with FLAC 1.2.1 -8 fell right between FLACuda -5 and -6.
Decoding speed (performed by fb2k):
1.1.2 -8: 615x
CUDA -5: 618x
CUDA -6: 572x
(FLACUDA -11 encoded much slower, ~12x; and it also decoded slower, ~300x)

Considering how insane performance (and extremely power hogging) GPUs are around these days, a GPU FLAC encoder seems a good idea.

I just found one glitch: the decoded voice data seems identical but the FLAC/Cuda files are not seekable in my fb2k 0.9.6.9. The parameters were -6 - -o %d
(OK, I see, I'm not alone with this problem)

[p.s. I also made a comparison with TAK -p2m what I regularly use: 77.7x encoding by one CPU core, 3.5% smaller (968 vs 1002kbps) and decodes at 384x speed - definitely slower than FLAC, except extreme FLACuda files]
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2009-09-13 16:47:05
Thank you for detailed test results. Looking at them i decided to focus on optimizing performance at lower compression levels. Version 03 (http://www.hydrogenaudio.org/forums/index.php?act=attach&type=post&id=5396) must be noticeably faster at levels 0..7. I also fixed the problem with files being unseekable when using pipe encoding from fb2k.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: alvaro84 on 2009-09-13 19:33:44
Thank you for detailed test results. Looking at them i decided to focus on optimizing performance at lower compression levels. Version 03 (http://www.hydrogenaudio.org/forums/index.php?act=attach&type=post&id=5396) must be noticeably faster at levels 0..7. I also fixed the problem with files being unseekable when using pipe encoding from fb2k.


The good #1: the resulting FLAC is seekable!
The good #2: -6 is definitely faster, 60.4x vs 54.3x
The bad: the files are slightly larger, now I need -7 to get smaller result than Flac 1.1.2 -8 (CPU -8: 37810k; CUDA -6: 37857k; CUDA -7: 37791k)
The ugly: FLACuda -7 is slower than CPU FLAC -8. On my 'nose heavy' system, that is.

Hm, I probably should try with different tracks (my ad-hoc test sample is a ZUN theme from the Changeability of Strange Dream album, strictly speaking it's not a Touhou soundtrack, but similar to the game background music).
Is it the seek table that makes -6 files larger?

update: In case of a Rammstein track GPU -6 got smaller than CPU -8. Need more samples to test.
(Sorry, I was a bit hasty to post about it. Human error )
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2009-09-13 19:42:28
Is it the seek table that makes -6 files larger?

Nope. Old-style -6 can be invoked by parameters "-5 -l 12". That's a lower-case L there, not a digit 1.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Case on 2009-09-13 21:39:57
Seems to me like other modes got a speed boost too:
[attachment=5397:flac_vs_flacuda.png]
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2009-09-14 20:25:12
Phew. I think i finally squeezed everything i could out of it, at least for now.

Version 04 (http://www.hydrogenaudio.org/forums/index.php?act=attach&type=post&id=5398) should be faster than anything.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Case on 2009-09-14 21:18:31
Impressive.
[attachment=5399:flac_vs_flacuda.png]
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2009-09-14 21:26:56
Thank you.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: alvaro84 on 2009-09-15 04:57:18
Impressive.


Confirmed.

Code: [Select]
                  CPU -8    GPUv3 lv6   GPUv4 lv6   GPUv3 lv7   GPUv4 lv7   GPUv4 lv11
ZUN                49.8x       60.4x      71.4x       46.8x      52.0x      13.57x
Rammstein          49.5x       63.4x      74.7x       48.9x      54.3x      13.59x


And the file sizes are down again. Decode times don't seem to suffer against the CPU Flac-encoded files at similar sizes either (592x vs 600x and the file is 0.3% smaller).
Keep up the good work!
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: sauvage78 on 2009-09-15 05:24:02
So far I wasn't much interested in the small compression gain, but V0.4 speed gain is impressive.
Anyway I will not buy an Nvidia card just for Cuda... sadly I own a geforce 7600GS & my next graphic card will be integrated to my future Core I3 530 ... so I guess I will never use flacuda ;(

It makes me wonder how fast could be a multi-threaded flacuda -4 encoding runned on a sandy bridge octo-core with a geforce 300  ... more than 16X faster compared to my old athlon XP 3000+ (barton) I guess

The sad thing for flacuda is that in a near future cheap GPU will be integrated to low end CPU as soon as 2010 (clarkdale, 2 core+45mn GPU), & the middle-end CPU as soon as 2011 (sandy bridge, 4 core+32mn GPU) for intel, & AMD will follow (one year late as always), all these integrated GPU will have hardware acceleration for blu-ray video codecs so unless you're a die-hard gamer, buying an nvidia card will be a pure loss of money.

The coming years will be hard for nvidia. I am not even sure it will survive.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: itisljar on 2009-09-15 06:50:25
I wouldn't kill nVidia just yet. AFAIK, as of now, it is the only card that supports GPU video transcoding, and it is heavily used in newer encoding applications, as well in new Photoshop for calculations of some effects.
While we are on the subject, where is this multithreaded flac encoder, BINARY, so I can test it?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: sauvage78 on 2009-09-15 07:05:35
IMHO audio or video encoding will not help nvidia survive long because if the only purpose of buying GPU become to accelerating encoding then you'd better buy a higher-end CPU, being written in a lower process than GPU, CPU will always have the advantage in brute encoding force vs. power consumption & heat.

As for a multithreaded flac encoder, AFAIK there is none, I think I recall I read about some very experimental proof-of-concept code on some mailing list, but nothing serious.

Maybe we should start a donation to buy a quad core for Josh, it cannot be more useless than buying a PC for Klemm afterall
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: GeSomeone on 2009-09-15 12:43:45
As for a multithreaded flac encoder, AFAIK there is none, ..

The simpelest way to use multi threading for any encoder is to run multiple encoders simultaneously (foobar2000 can do that). The number of usable threads depends on when the hard disk becomes the bottleneck.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Case on 2009-09-15 20:34:05
Just converted my entire FLAC -8 library to FlaCuda -8 and it became 0.157% smaller. That's a bit smaller difference than my sample file suggested (0.166%).
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2009-09-16 08:45:13
Seems like i found a strange behaviour. If you have a 16bit file not using all of them it gets much larger as with flac or even your CUETools.Flake.exe encoder.

For the example i used a 16bit file made it to 8bit and back to 16. So 8bit are unused.
All for -8

flac 1.21          8.561.886 Bytes
your flake        8.572.572 Bytes
FlaCuda          45.509.060 Bytes
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: odyssey on 2009-09-16 09:11:35
As for a multithreaded flac encoder, AFAIK there is none, ..

The simpelest way to use multi threading for any encoder is to run multiple encoders simultaneously (foobar2000 can do that). The number of usable threads depends on when the hard disk becomes the bottleneck.

Now we just need a way to simultanously run CUDA and CPU encoders
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: [JAZ] on 2009-09-16 18:36:25
Seems like i found a strange behaviour. If you have a 16bit file not using all of them it gets much larger as with flac or even your CUETools.Flake.exe encoder.


Could you try to encode a lossywav-processed file to see if it shows the same behaviour? ( In this case,  wav -> flacuda would have the same size than wav -> lossywav -> flacuda).

If that is true, it would seem that this FLAC implementation misses part of the specification (and maybe could reduce the size even further).
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: lvqcl on 2009-09-16 19:09:26
FlaCuda_0.4 with "-8" switch, original test file: 975 kbps;

After LossyWAV --standard:

FlaCuda_0.4  -8: 996 kbps;
FlaCuda_0.4  -8 -b 512: 1011 kbps.

Flake_0.11 -8: 1000 kbps (Flake encoder from Winamp Essentials Pack 5.55).

Flac_1.2.1 -5 -b 512: 462 kbps.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2009-09-16 19:14:14
FlaCuda_0.4 with "-8" switch, original test file: 975 kbps;

After LossyWAV --standard:

FlaCuda_0.4  -8: 996 kbps;
FlaCuda_0.4  -8 -b 512: 1011 kbps.

Flake_0.11 -8: 1000 kbps (Flake encoder from Winamp Essentials Pack 5.55).

Flac_1.2.1 -5 -b 512: 462 kbps.


I can second that behaviour. One thing is that Mr. Chudovs CUETools.Flake.exe does compress ~as good as Flac 1.21 on lossywav also.
So hopefully it will be only need a small fix.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: alvaro84 on 2009-09-17 08:51:32
Now we just need a way to simultanously run CUDA and CPU encoders


Sounds fun, though I'm afraid we'd bump into a strong bottleneck because of disk head positioning  Even converting with 2 threads one HDD seeks like crazy - but it's still a lot faster than 1 thread.
NCQ in AHCI mode should help a lot with more threads, but it didn't when I tested it a while ago. Physically different source/target drives can alleviate this bottleneck quite a bit.
Fast SSDs are worth a try too
This CUDA encoder can be a different solution, in case of one instance it's faster than the reference encoder running on one core of my CPU (converting one file at a time is the least disk-bottlenecked way to do it).
A natively multithreaded CPU-based encoder (working on segments of one single track) is another option.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2009-09-17 23:12:25
Added lossyWav support. It shouldn't make any difference for normal wavs.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2009-09-17 23:30:04
Thanks for your fast work on that!!
Works flawless now on the 8bit and lossywav file.
Using it on normal files at -8 gets even a few bytes smaller as 0.4

Edit: For the ones that use lossywav. Standard flac seems to compress a bit better on that but not much.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2009-09-18 19:05:07
Is there anybody here who knows the math behind Cholesky decomposition used in ffmpeg as an alternative method of LPC coefficients search?
This method is too slow for CPU, but i thought i'd give it a shot on GPU.
The problem is, GPU doesn't do double precision very well.
The lls code from ffmpeg doesn't work on single precision floats due to overflows.
My first idea was to scale down the signal to avoid overflows, but results were poor.
There's something i don't understand about this algorithm: in theory, LPC coeffs shouldn't depend on the scale of the signal - after all, they are linear
I have a suspicion that in practice this algorithm does depend on the scale of the signal a lot. I don't pretend to understand this math, but:
First suspicious piece of code is this (from av_solve_lls):

Code: [Select]
            double sum= covar[i][j];
            for(k=i-1; k>=0; k--)
                sum -= factor[i][k]*factor[j][k];


When the signal is multiplied by 10, covar[j] is multiplied by 100, and both factor[k] and factor[j][k] are multiplied by 100, so factor[k]*factor[j][k] is multiplied by 10000. So this sum doesn't scale in any predictable fashion.

I also don't understand this magic 'threshold' business.

Code: [Select]
                if(sum < threshold)
                    sum= 1.0;


How should the threshold scale with the signal? Should the sum always be set to 1.0 if it's below threshold, or to some value depending on the scale of the signal? Or am i on the wrong track completely?

I also found this old post from Josh:
I have actually been doing experiments solving the full prediction linear system with SVD; this should give a lower bound on the compression achievable by the FLAC filter.

Is there any working code left from those experiments, and how successful were they?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2009-09-18 19:54:14
I must add, that when computations are done in double precision, lls coeffs do not depend much on the scale of the signal, so the algorithm works, despite non-linear scaling of intermediate values.
But in single precision they start to drift much more. Which is wierd, because in literature Cholesky decomposition is said to be more stable than Levinson-Durbin recursion, with regard to rounding errors.

Here is a sample of this drift in double precision:
Code: [Select]
SCALE: 1.0/6 COEFF[31,0..2]: 0.523100 0.287037 0.204438; COVAR[31,0..2]: 43226.383239 170398.007602 -241511.245261
SCALE: 1.0/7 COEFF[31,0..2]: 0.523086 0.287057 0.204432; COVAR[31,0..2]: 37051.186185 146055.437263 -207009.641880
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: skamp on 2009-09-19 09:38:56
Sounds fun, though I'm afraid we'd bump into a strong bottleneck because of disk head positioning  Even converting with 2 threads one HDD seeks like crazy - but it's still a lot faster than 1 thread. […] A natively multithreaded CPU-based encoder (working on segments of one single track) is another option.

Ideally you would run multiple instances of a single-threaded encoder (one track per CPU core) and one instance of the CUDA encoder per GPU at the same time - it's just a matter of making sure that all instances are kept busy.

When the number of remaining tracks gets lower than the number of available cores, you prioritize the GPU instance (since it's faster than a single-threaded encoder on a single CPU core), but also run (if available) a multi-threaded encoder; one MT encoder over two cores is likely to be slower than two instances of a ST encoder over the same number of cores (see the Lancer builds of the Ogg Vorbis encoder). In other words, an MT encoder is particularly useful for keeping CPU cores busy when the workload dries up.

In short, the priorities go like this (if you have a multi-core CPU, that is):
ST * n CPU cores > GPU > MT

As for the I/O bottlenecks, that's when a large enough RAMdisk comes in very handy. Even just 1GiB is often enough for encoding a whole album (WAV + FLAC or FLAC + Ogg Vorbis or whatever on the RAMdisk).

I already use all available CPU cores when I encode my rips to FLAC or any other codec (one track per core); what I could really use, even before a MT FLAC encoder comes up, is a simple, command-line, multi-threaded Replay Gain utility. As I've said in the past, computing RG values on an album now takes longer than encoding it in the first place (because the former uses only one core while the latter uses all 4 cores on my quadcore CPU).
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: alvaro84 on 2009-09-19 13:04:26
As for the I/O bottlenecks, that's when a large enough RAMdisk comes in very handy. Even just 1GiB is often enough for encoding a whole album (WAV + FLAC or FLAC + Ogg Vorbis or whatever on the RAMdisk).


You're absolutely right, I don't know how I could forget about RAMdisks. I used them all the time when 8MiB felt plenty of RAM, but somehow I never thought about them since we have multiple GiBs at our disposal... talk about contradictions...
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: gib on 2009-09-19 22:39:37
I've gotten flacuda to work with the old but still handy Flac Frontend.  The only little issue is that flacuda doesn't recognize the -V option as verify like the flac.exe does, so I can't use the verify checkbox in the Frontend.  It's a tiny thing, but it would be cool if, maybe along with a future update, -V was added to flacuda.  If not, I'll just go about setting it up to work with Foobar.

Thank you again, Gregory.  Very cool stuff.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2009-09-19 23:10:38
I've gotten flacuda to work with the old but still handy Flac Frontend.  The only little issue is that flacuda doesn't recognize the -V option as verify like the flac.exe does, so I can't use the verify checkbox in the Frontend.  It's a tiny thing, but it would be cool if, maybe along with a future update, -V was added to flacuda.  If not, I'll just go about setting it up to work with Foobar.

Thank you again, Gregory.  Very cool stuff.

Since you can´t use replaygain with Flac Frontend and FlaCuda and you still want its simple layout just try Multi-Frontend from the same author. There you can define your line with --verify.
I even resurrected frontah for mirroring old files to new folder and FlaCuda and tags with one click. Its ini is simple to adjust to make it work. To sad frontah developement was stopped.

Edit: When anyone recommends foobar now, please tell me how you can simple mirror (reencode) folders + copying Tag + replaygaininfo in one go. I didn´t manage to do it that simple but i read here and there  "Use foobar" but no detailed info how. Maybe i do misunderstand its functionality.

Edit2:
Finished the reencode of my collection. Since i used flac 1.10-1.21, flake and some other builds over the years i suppose it is of no use to calculate my space savings as a guiding value.
On some albums there were big savings. A few albums come out bigger, mainly very silent music or with many silent parts in it. I can imagine on some collections with special kinds of music it won´t save as much space as expected.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: gib on 2009-09-20 00:41:23
Wombat, thanks for the suggestion of using Multi Frontend.  I can't believe that I haven't downloaded it before.  Thanks again!
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2009-09-25 23:45:07
Here (http://www.hydrogenaudio.org/forums/index.php?act=attach&type=post&id=5407) is version that is a tiny bit faster, i hope. Since for previous version HDD is a bottleneck, i was able to measure the speed improvement only when using RAMDisk.

I'm still curious about alternative algorithms to Levinson-Durbin (i commented above on my problems with ffmpeg's least-square model). Any help would be appreciated.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2009-09-26 01:58:10
I eally can´t tell if your FlaCuda became any faster cause it was damn fast before. All i can say it is kind of fun having the GPU doing its job while you don´t notice your system being under heavy stress. So encoding with FlaCuda you can still do heavy tasks in Front. I love it.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Case on 2009-09-26 11:19:30
This is getting ridiculous. New FlaCuda 0.6 is faster even in mode -8 than 0.4 was in -0.
[attachment=5408:flac_vs_flacuda.png]
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: alvaro84 on 2009-09-26 12:54:37
I second, it's ridiculous
Now FlaCuda 0.6 at -6 is a almost as fast as Flac 1.2.1 -8 running on two threads... and this is a stock 8600GT standing up against a pretty much overclocked core2 duo... If I give the geforce a little bit of overclock, it comes out faster than the 2 instances of Flac1.2.1 together... the file sizes are even a bit smaller than with the CPU encoder and there are 'more hardcore' settings... it's true that heavier compression takes a toll on decoding speed too, so I stick with the original -8-ish compression when I use FLAC.
TAK is somewhat slower to decode, but it compresses better than even FlaCuda does at -11 and that's beyond the speed crossover point: that -11 FLAC is slower to decode than the -p2m TAK (which is 18kbps smaller in case of my test material).
No, it's not a TAK marketing remark, I'm just testing that too, it's interesting for me to compare these codecs.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: itisljar on 2009-09-26 13:31:49
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.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: guruboolez on 2009-09-26 18:57:10
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
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Dologan on 2009-09-26 18:58:37
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.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2009-09-26 19:23:54
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.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: guruboolez on 2009-09-26 19:36:46
Thank you for the explanation, Gregory. I Hope it'll be fixed by Nvidia soon.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: odyssey on 2009-09-26 20:15:39
It crashes on my Geforce 9300 that's supposed to support CUDA 

Works fine on my Quadro 2700M though.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2009-09-26 21:20:21
Previous versions too?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: odyssey on 2009-09-27 01:37:09
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?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: alvaro84 on 2009-09-27 06:35:36
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...
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2009-10-01 01:01:21
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.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2009-10-01 07:17:44
Smaller blocks make it slower, but have their advantages. I will try to reduce performance penalty for smaller blocks if i can.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: johnsonlam on 2009-10-01 15:40:48
Sorry for breaking in ...

Did someone planning for a Foobar2000 Flac-CUDA plugin?
Will makes the conversion a lot easier.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: odyssey on 2009-10-01 15:48:08
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.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: itisljar on 2009-10-01 20:08:25
That was exactly what I was thinking - because it is needed, too, when using iTunes AAC encoder through foobar2000.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: johnsonlam on 2009-10-02 08:49:50
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.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: glebe on 2009-10-02 17:42:42
johnsonlam, see screenshot
(http://pic.ipicture.ru/uploads/091002/ROThYFFsmi.png)
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Rotareneg on 2009-10-04 01:14:08
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!
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Ron Jones on 2009-10-04 02:08:16
Can't wait to see how Fermi (http://www.nvidia.com/object/fermi_architecture.html) does with FLACuda. Very exciting stuff to think about, that's for certain.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: VeaaC on 2009-10-05 02:56:23
Can't wait to see how Fermi (http://www.nvidia.com/object/fermi_architecture.html) 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. 
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: johnsonlam on 2009-10-05 17:27:56
johnsonlam, see screenshot


Thank you very much for your help!

Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Garf on 2009-10-05 20:06:22
Can't wait to see how Fermi (http://www.nvidia.com/object/fermi_architecture.html) 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. 


Or OpenCL...
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: probedb on 2009-10-05 20:44:32
Or OpenCL...


Haven't Nvidia just realised their OpenCL drivers? Wish AMD would do the same!
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: alvaro84 on 2009-10-07 12:59:46
Or OpenCL...


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


That would be the best - there's no hope for DX11 compute shader for XP (ok, I know, I know, in a few years no one will still be using XP...)
AMD/CUDA is the same
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Maurits on 2009-10-08 09:44:34
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. (http://www.xbitlabs.com/news/video/display/20090610074239_ATI_Jumps_on_OpenCL_Bandwagon_by_Releasing_OpenCL_Drivers.html)

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 (http://www.hpcwire.com/features/OpenCL-To-GPGPU-and-Beyond-36016144.html)
AMD: An Introduction to OpenCL (http://ati.amd.com/technology/streamcomputing/intro_opencl.html)
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Maurits on 2009-10-19 12:17:11
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 (http://cts.businesswire.com/ct/CT?id=smartlink&url=http%3A%2F%2Flinks.amd.com%2Fbetadownload&esheet=6075924&lan=en_US&anchor=accessed+here&index=2&md5=83ade8c5ee3badbf6f75d268c017f19f).


Good news...
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: RendoR on 2009-10-20 03:25:55
I was reading you could take 2-3 of those Nvidia Tesla cards and build a super computer that would rival a million dollar rack system. You would use a server type Mobo with like 64 gigabytes of RAM, and 2 intel Zeon processors. The throughput is just ridiclous, look at these specs! I realize it's a 5k PC we're building but damn! That's what I call getting it done! (http://i262.photobucket.com/albums/ii81/rendor21/Tesla.jpg)
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: saratoga on 2009-10-20 04:18:30
I was reading you could take 2-3 of those Nvidia Tesla cards and build a super computer that would rival a million dollar rack system. You would use a server type Mobo with like 64 gigabytes of RAM, and 2 intel Zeon processors. The throughput is just ridiclous, look at these specs! I realize it's a 5k PC we're building but damn! That's what I call getting it done!


If you just want to do audio, the GTX from Newegg is ~$220 and a little faster then that model.  I've got one in my PC they're pretty nice.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Chinch on 2009-12-02 07:35:31
Just a benchmarking result for you, according to foobar2000:

Input file length: 52:53.493 (139951056 samples), PCM WAV 44.1khz 16-bit

Original FLAC encoder (compression -8) = 1 minute, 07 seconds  /  Output file: 357MB (374 398 783 bytes) @ 944 kbps  /  Length: 52:53.493 (139951056 samples)
flaCUDA 0.6 (compression -11) = 58 seconds  /  Output file: 355MB (373 035 151 bytes) @ 940 kbps  /  Length:  52:53.493 (139951056 samples)
flaCUDA 0.6 (compression -8) = 16 seconds  /  Output file: 356MB (373 983 388 bytes) @ 943 kbps  /  Length: 52:53.493 (139951056 samples)

All MD5's match up.

Video card is an nVidia GeForce 9600 GSO. Hope that helps you out.

Note: The ENCODER field still says "FlaCuda#0.5", even though I downloaded FlaCuda06.rar from the website... so either you forgot to change the version number, or 0.5 is really in the 0.6 rar file...
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: MachineHead on 2009-12-09 06:05:14
Interesting tool here. Currently my drives seem to be holding back the true potential of what speeds this will do for me.

A little tidbit from console: Total encoding time: 0:09.236, 394.12x realtime

Files uncompressed: 612MB (642 120 224 bytes)

Files compressed: 358MB (375 779 070 bytes)

Parameters: -8 - -o %d
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Unkosibomvu on 2009-12-17 08:21:02
Apologies if this is not the right thread, but I couldn't find any that looked like a better place.  I would like to request support for multichannel (at least up to 8) in flacuda.  It doesn't seem to be there now - I tried feeding 0.6 a 7.1 multichannel flac for re-compression and it threw an exception saying that the input was an invalid flac file.

Multichannel support is important to me because I rip all of my blurays and re-encode the lossless audio tracks (truehd/mlp, dts master audio and raw lpcm) to flac.  The flac encoding accounts for at least half of the wall-clock time of the rip (typically 15+ minutes just for the audio re-encoding).  Occasionally I'll rip a DVD-A with 5.1 audio to flac for easy playback in foobar too and that can also take roughly the same amount of time as a bluray.

I haven't looked at the source for flacuda, but I was wondering if doing multichannel might be able to get a super-linear speed-up due to the parallel nature of gpus - similar to the way that Kaspersky is doing massively parallel pattern matching on the gpu to speed up their anti-virus scanning.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2009-12-18 23:17:14
Since i read more then once some people don´t trust in GPU encoding cause of errors that can creep in i tried to force Flacuda to do so.
My 24/7 overclock on my 260 is 648/1100 at lowered voltage. Here i never got an error since i use Flacuda.
So i tried 684/1161, this is were gaming may hang or crashes to desktop after a while at this voltage. I encoded ~20 albums without a problem.
Now i tried a surely unstable overclock of  725/1242 but only tried 5 albums in a row cause i don´t want to fry anything. All 5 albums encoded without a problem.

I have the imagination using Cuda isn´t really stressing my card in any way.

Now i have 2 questions. How secure is the verify implementation? Are these fears of highered chances for errors in the data justified in any way for Flacuda?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2009-12-20 08:49:03
Multichannel support is important to me because I rip all of my blurays and re-encode the lossless audio tracks

I'm afraid those multichannel tracks also have higher bit depth, most probably 24 bits per sample instead of CD's 16 bits per sample.
That might be a problem, because those require 64-bit integer arithmetic at some point, which current GPU's aren't very good at.
I'm not saying it can't be done, but the encoder might be very slow.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2009-12-20 08:57:08
Now i have 2 questions. How secure is the verify implementation? Are these fears of highered chances for errors in the data justified in any way for Flacuda?

Verify is secure. It decodes each frame (on CPU) and compares each sample with original, so we can be sure that the result can be decoded into original at least using this decoder.

The fears of GPU errors aren't really justified in general, and are completely unjustified for Flacuda. It uses GPU to calculate best encoding options for each frame, but generates the output on CPU, so even if GPU would produce an error, this would only result in slightly lower compression.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: ChronoSphere on 2009-12-20 12:13:52
I do compare the original wav to the one decoded from the flac file just to be sure and so far i had no checksum mismatch between the files.
My laptop does become really laggy (visual lag of the aero UI) while encodning with flaCUDA but at least i'm now compressing in about half the time for the same filesize 
Thank you for writing this tool.

2 things that i miss are the --cuesheet and the --image parameters. I have a batch file that embeds both the cue and the cover into the flac automatically, but now i have to do it manually... could you please add this? (and possibly other general option switches like replaygain that the reference encoder has?)

edit:

A 59min 16-bit 44,1 kHz wav file,


The 2 MB difference aren't worth the double encoding time for me, so i kept the default level. Oh and i encoded into a RAMdisk, not on HDD.
That's on a 8600m GT & C2D T7250 CPU (2GHz)
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2009-12-20 23:55:56
Verify is secure. It decodes each frame (on CPU) and compares each sample with original, so we can be sure that the result can be decoded into original at least using this decoder.

The fears of GPU errors aren't really justified in general, and are completely unjustified for Flacuda. It uses GPU to calculate best encoding options for each frame, but generates the output on CPU, so even if GPU would produce an error, this would only result in slightly lower compression.


Many thanks for clarifying this!
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2009-12-24 16:38:37
I noticed that in some cases CPU is still a bottleneck for FLACuda, so i'm experimenting with utilizing multicore processors.
Here is an experimental alpha version: FlaCuda07(08) (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=64628&view=findpost&p=656451). I strongly recommend not to use it to encode anything valuable.
Experimental features are activated using two new command line parameters:
"--gpu-only" tries to ultilize GPU even for the tasks, which are maybe better suitable for CPU. Use it if you have a fast GPU and/or slow CPU. Note, that it also provides a very slightly better compression ratio.
"--cpu-threads N" tries to utilize N additional CPU cores.
I also somewhat retuned compression levels. -8 is still the maximum compression level compatible with flac subset (used by some hardware implementations). It is however quite impractical now, -7 is much faster and provides almost identical compression.

On my Core2 Duo + GTX 250 it works best with "--gpu-only --cpu-threads 1". Quadcore CPUs in theory might benefit from "--cpu-threads 3" or  "--gpu-only --cpu-threads 2". Please, test it.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Case on 2009-12-24 18:44:24
I got a nice speed boost from --gpu-only option even though my CPU is quite fast (Core i7 940). CPU thread count only affected results very little and with different compression modes the winner changed. The changes were too small to capture in my traditional graph.
[attachment=5567:flac_vs_flacuda.png]
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2009-12-24 18:46:07
Thank you!
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2009-12-24 23:21:44
Thanx Mr. Chudov for improving Flacuda again. --gpu-only --cpu-threads 1 here on my C2D/GTX260 seems to utilize my system best also. With threads 2 it seems encoding gets tiny hickups. Compression at -8 got a bit better again against 0.6
Edit: i saw block size 4096 is default now, that of cause may be the small benefit.

Encoding speed is impressive!
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: glebe on 2009-12-25 10:04:35
Hi!

Thank you, Gregory, for your great tools!

My setup: Q6600 @ 2.4GHz, 8800GT (660/1675/1900, FW 191.07), foobar2000 as front-end for FlaCUDA.

Verification was done after encoding using "bitcompare tracks" function, verification time is not included in results. All that I can say about verification is that there were no errors at all.

Size of the source WAV-file is 847,696,124 bytes. Encoding was done to another physical hard drive.

Here are results.

First, threading does not affect compression, files produced with a single thread and with multiple threads are bit-identical.

Code: [Select]
FlaCUDA 0.6
-7     0:33    545,049,178 bytes
-8     0:34    544,573,469 bytes
-11    1:02    540,785,523 bytes

FlaCUDA 0.7 --cpu-threads 3
-7     0:16    544,274,937 bytes
-8     0:16    544,238,955 bytes
-11    0:24    540,874,729 bytes

FlaCUDA 0.7 --cpu-threads 2
-7     0:16    544,274,937 bytes
-8     0:16    544,238,955 bytes
-11    0:24    540,874,729 bytes

FlaCUDA 0.7 --cpu-threads 1
-11    0:40    540,874,729 bytes

FlaCUDA 0.7 --cpu-threads 0 (i.e. single thread like 0.6)
-8     0:35    544,238,955 bytes
-11    0:53    540,874,729 bytes


Summary on threading tests:
1. In 0.7 version compression of -7 and -8 modes was slightly increased at the expense of speed, compression of -11 mode was decreased with a little speed up.
2. On quad-core Q6600 4 threads are useless, total 3 threads are enough.
3. -7 and -8 modes are practically equal.


Code: [Select]
FlaCUDA 0.7 --gpu-only --cpu-threads 3
-7     0:17    544,234,754 bytes
-8     0:18    544,198,701 bytes
-11    0:26    540,846,838 bytes

FlaCUDA 0.7 --gpu-only --cpu-threads 2
-7     0:16    544,234,754 bytes
-8     0:17    544,198,701 bytes
-11    0:26    540,846,838 bytes

FlaCUDA 0.7 --gpu-only --cpu-threads 0
-7     0:22    544,234,754 bytes
-8     0:22    544,198,701 bytes
-11    0:37    540,846,838 bytes


Summary on GPU tests:
1. Compression in all modes is better a bit than in non-GPU-only modes.
2. 4 threads on Q6600 are useless, 3 threads are the best.
3. "GPU-only + 3 threads" is slightly slower than "3 threads".


Final words: encoding 800+ MB file in just 16 (sixteen) seconds looks VERY impressive. It is 50MB/s, and maybe speed is limited by hard drive. Nice work!
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2009-12-27 14:10:35
Due earlier testing i found in some rare cases some music compresses worse as flac. With your Flacuda 0.7 these ones all compress better then Flac now. Must be some optimizations working.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: jpl73 on 2009-12-28 16:00:39
I have been lurking on HA for several years, but with the release of Flacuda 0.7, I just had to register to say AMAZING!!!!

I could not get v0.6 to run stable on my non-OC'd 8400GS for long periods of time.  1-2 albums would go fine but more than 10-15 would always fail.  I think the problem was heat related.  Using -- gpu-only and -- num-threads 1, I was able to get 40 albums to convert bit perfect with foobar.  Additionally the performance (at level -11) went from 6.5x real time in v0.6 to 20x real time in v0.7.  After remounting the heat sink with Arctic Silver 5, I was able to OC from 459/400/918 to 550/475/1500 MHz (core /mem/shaders) and now it runs at over 30x real time.

THANK YOU!

This program is incredible, excellent work and thank you for the X-mass present!
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: XAVeRY on 2009-12-29 19:00:24
Hello.

Even though I'm a newcomer here, it was very difficult for me to simply ignore such a topic. I have performed some of my own tests, based on three different recordings which - I believe - represent very different music types so that we can see how the encoder behaves when fed with various musical styles. I've used Morrissey's "Live at Earls Court", My Bloody Valentine's "Loveless" and David Bowie's "Low" for my tests. All these recordings were ripped from original CDs by EAC in secure mode as single-file WAV CD images.

I've encoded the files with FlaCuda 0.7 with two different sets of switches, FlaCuda 0.6, a 64-bit compile of FLAC v1.2.1 (from here (http://don.mozfaq.org/bin/64bitstuff/flac-1.2.1-win64.zip), the exe itself says that it's flac 1.2.0, but the encoder tag is 1.2.1, so I think it's 1.2.1) and the ordinary 32-bit FLAC v1.2.1. I know that the two last ones are probably a bit offtopic, but I've been looking for a chance to try out the 64-bit binary I've found sometime ago.

My setup isn't very impressive, it's a laptop with Core 2 Duo T7300, 2GB of RAM, and GeForce 8600M GT with 256MB of RAM. The input files were stored on the laptop's internal drive, encoder's output files were directed to an external hard drive connected via eSATA. I would've used a ramdisk if only I could find a ramdisk driver for the 64-bit version of Windows 7 Professional, which I have installed.

Without further ado, here are the results :
Code: [Select]
Morrissey - Live at Earls Court (1h14m10s = 4450s) :

WAV size = 785 024 732 bytes

FlaCUDA 0.7 --gpu-only --cpu-threads 1 :

/-----------------------------------\
| Lvl |      Time     |   Filesize  |
|-----------------------------------|
|  8  | 1m11s, 62.21x | 580 785 189 |
|  9  | 0m45s, 99.16x | 580 734 747 |
|  10 | 1m10s, 63.93x | 580 665 650 |
|  11 | 1m38s, 45.43x | 580 641 565 |
\-----------------------------------/

FlaCUDA 0.7 --cpu-threads 1 :

/-----------------------------------\
| Lvl |      Time     |   Filesize  |
|-----------------------------------|
|  8  | 1m05s, 68.92x | 580 820 235 |
|  9  | 0m36s, 122.38x| 580 769 799 |
|  10 | 1m01s, 73.30x | 580 700 243 |
|  11 | 1m29s, 50.14x | 580 676 064 |
\-----------------------------------/

FlaCUDA 0.6 :

/-----------------------------------\
| Lvl |      Time     |   Filesize  |
|-----------------------------------|
|  8  | 1m31s, 48.87x | 581 189 153 |
|  9  | 2m07s, 34.84x | 581 016 298 |
|  10 | 3m38s, 20.38x | 580 924 773 |
|  11 | 5m35s, 13.27x | 580 903 271 |
\-----------------------------------/

FLAC v1.2.1, 64-bit binary :

/-----------------------------------\
| Lvl |      Time     |   Filesize  |
|-----------------------------------|
|  5  | 0m57s, 78.07x | 582 393 173 |
|  6  | 0m59s, 75.42x | 582 374 477 |
|  7  | 1m55s, 38.70x | 582 063 693 |
|  8  | 2m32s, 29.28x | 581 599 608 |
\-----------------------------------/

FLAC v1.2.1, 32-bit binary :

/-----------------------------------\
| Lvl |      Time     |   Filesize  |
|-----------------------------------|
|  5  | 0m45s, 98.89x | 582 393 173 |
|  6  | 0m48s, 92.71x | 582 374 477 |
|  7  | 1m53s, 39.38x | 582 063 693 |
|  8  | 2m36s, 28.53x | 581 599 493 |
\-----------------------------------/

~~~~~~~~~~

My Bloody Valentine - Loveless (48m36s = 2916s) :

WAV size = 514 398 908 bytes

FlaCUDA 0.7 --gpu-only --cpu-threads 1 :

/-----------------------------------\
| Lvl |      Time     |   Filesize  |
|-----------------------------------|
|  8  | 0m47s, 61.53x | 313 373 855 |
|  9  | 0m41s, 70.49x | 311 032 216 |
|  10 | 1m09s, 42.55x | 310 584 559 |
|  11 | 1m34s, 30.96x | 310 500 491 |
\-----------------------------------/

FlaCUDA 0.7 --cpu-threads 1 :

/-----------------------------------\
| Lvl |      Time     |   Filesize  |
|-----------------------------------|
|  8  | 1m05s, 65.96x | 313 396 279 |
|  9  | 0m34s, 85.32x | 311 043 003 |
|  10 | 1m02s, 47.24x | 310 595 777 |
|  11 | 1m27s, 33.55x | 310 512 544 |
\-----------------------------------/

FlaCUDA 0.6 :

/-----------------------------------\
| Lvl |      Time     |   Filesize  |
|-----------------------------------|
|  8  | 1m00s, 48.84x | 313 436 464 |
|  9  | 1m24s, 34.70x | 312 379 410 |
|  10 | 2m23s, 20.36x | 310 902 529 |
|  11 | 3m40s, 13.27x | 310 269 981 |
\-----------------------------------/

FLAC v1.2.1, 64-bit binary :

/-----------------------------------\
| Lvl |      Time     |   Filesize  |
|-----------------------------------|
|  5  | 0m36s, 81.00x | 316 076 796 |
|  6  | 0m38s, 76.74x | 316 074 660 |
|  7  | 1m14s, 39.41x | 315 819 946 |
|  8  | 1m42s, 28.59x | 314 357 377 |
\-----------------------------------/

FLAC v1.2.1, 32-bit binary :

/-----------------------------------\
| Lvl |      Time     |   Filesize  |
|-----------------------------------|
|  5  | 0m28s, 104.14x| 316 076 796 |
|  6  | 0m30s, 97.20x | 316 074 660 |
|  7  | 1m09s, 42.26x | 315 819 946 |
|  8  | 1m37s, 30.06x | 314 357 051 |
\-----------------------------------/

~~~~~~~~~~

David Bowie - Low (50m30s = 3030s)

WAV size = 534 492 044 bytes

FlaCUDA 0.7 --gpu-only --cpu-threads 1 :

/-----------------------------------\
| Lvl |      Time     |   Filesize  |
|-----------------------------------|
|  8  | 0m49s, 62.25x | 306 400 307 |
|  9  | 0m30s, 100.43x| 306 223 383 |
|  10 | 0m46s, 65.57x | 306 190 297 |
|  11 | 1m05s, 46.62x | 306 176 876 |
\-----------------------------------/

FlaCUDA 0.7 --cpu-threads 1 :

/-----------------------------------\
| Lvl |      Time     |   Filesize  |
|-----------------------------------|
|  8  | 0m44s, 68.56x | 306 424 702 |
|  9  | 0m24s, 124.51x| 306 245 100 |
|  10 | 0m40s, 75.40x | 306 211 961 |
|  11 | 0m59s, 51.53x | 306 198 420 |
\-----------------------------------/

FlaCUDA 0.6 :

/-----------------------------------\
| Lvl |      Time     |   Filesize  |
|-----------------------------------|
|  8  | 1m02s, 48.95x | 306 476 119 |
|  9  | 1m27s, 34.85x | 306 334 437 |
|  10 | 2m29s, 20.36x | 306 256 934 |
|  11 | 3m48s, 13.27x | 306 158 122 |
\-----------------------------------/

FLAC v1.2.1, 64-bit binary :

/-----------------------------------\
| Lvl |      Time     |   Filesize  |
|-----------------------------------|
|  5  | 0m36s, 84.17x | 307 282 187 |
|  6  | 0m36s, 84.17x | 307 277 929 |
|  7  | 1m13s, 41.51x | 306 994 345 |
|  8  | 1m42s, 29.71x | 306 797 897 |
\-----------------------------------/

FLAC v1.2.1, 32-bit binary :

/-----------------------------------\
| Lvl |      Time     |   Filesize  |
|-----------------------------------|
|  5  | 0m29s, 104.48x| 307 282 187 |
|  6  | 0m30s, 101.00x| 307 277 929 |
|  7  | 1m12s, 42.08x | 306 994 345 |
|  8  | 1m38s, 30.92x | 306 797 499 |
\-----------------------------------/

They seem very interesting to me. I'm the most surprised (and let down) by the inferior performance of the 64-bit binary in comparison to the 32-bit one. FlaCuda performed extremely well, I couldn't believe my eyes when I saw how fast the conversion was going with the newest version and the -9 switch. As expected, enabling --gpu-only slightly reduces the filesize at the cost of slightly longer encode time.

I'm taken aback by all the fabulous work you've done, Mr. Chudov, and hope to see new versions soon. By the way, how long do you intend to keep this project in alpha stage?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2009-12-30 00:10:36
Earlier in this thread i tried this one with Flacuda 0.4

Dream Theater, Awake

Original 793.976.444 Bytes
Flac 1.21 -8 568.604.561 Bytes ~94 sec. encoding time
Flaccuda -8 567.956.198 Bytes ~53 sec.


Now with Flacuda 0.7 it really seems like my HD speed became the limiting factor. Insane!
Flacuda 0.7 -8 567.754.207 Bytes ~13.4 sec. ~337x

There comes me to mind if people playing with the Flac codec before or even Mr. Coalson himself once had an idea how to improve compression but never digged deeper cause of maniac computing power it would need. I bet Mr. Chudov already did some under the hood or at least looses some sleep about that.
Now the time has come 
And imagine if Fermi hits the road or an alike code works under OpenCL for recent DX11 Ati cards...
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2009-12-30 01:08:37
Thanks to all for kind words and detailed test results, especially for test results

I'm the most surprised (and let down) by the inferior performance of the 64-bit binary in comparison to the 32-bit one.

That's to be expected. 64-bit compile itself doesn't normally make code faster. In some applications you can gain some speed by rewriting parts of code, but more often you loose some speed. In this case, 64-bit compile most probably has SSE optimizations disabled, because SSE assembler code has to be rewritten for 64-bit mode. The increased number of registers in 64-bit mode allowed the compiler to make up for it, and almost reach the speed of SSE code. Modern compilers are that good.

how long do you intend to keep this project in alpha stage?

At least until i can test it using flac test suite by Josh, and make sure it runs ok on the next generation of GPU's (Fermi).

Ideally, i would like to see it incorporated into mainstream flac in some form.

There comes me to mind if people playing with the Flac codec before or even Mr. Coalson himself once had an idea how to improve compression but never digged deeper cause of maniac computing power it would need. I bet Mr. Chudov already did some under the hood or at least looses some sleep about that.

I did for some time, but now i'm quite sure that we have reached the limit of flac format. There's no room for further compression improvement without a new one.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2009-12-30 01:21:55
There comes me to mind if people playing with the Flac codec before or even Mr. Coalson himself once had an idea how to improve compression but never digged deeper cause of maniac computing power it would need. I bet Mr. Chudov already did some under the hood or at least looses some sleep about that.

I did for some time, but now i'm quite sure that we have reached the limit of flac format. There's no room for further compression improvement without a new one.


I was under the impression there still is some room. At least i think to remember Mr. Beck the TAK developer somewhere mentioned he has some ideas to improve Flacs compression. This may of cause with some changes in the codes structure in mind.

If we reached the end this has of cause at least one positive side. I never have to reencode again
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Fandango on 2009-12-30 01:51:33
Gregory, have you decided yet if you want to give OpenCL a try soon or do you rather want to improve the existing flaCUDA for the time being?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2009-12-30 02:06:50
It's a bit early for OpenCL. According to NVIDIA, Fermi will be their first OpenCL-optimized architecture. The only upside to OpenCL is that such code would be easier to modify to work with AMD GPUs. That would require an AMD GPU, and i don't have one yet. I would also probably have to upgrade my computer to get a second PCIe slot, and i'm not even sure that i can have two different sets of GPUS/drivers/SDKs running on one computer.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2009-12-31 01:44:51
Noticed you updated the cuetools homepage and offering FlaCuda 0.8

One more question:
how long do you intend to keep this project in alpha stage?

At least until i can test it using flac test suite by Josh, and make sure it runs ok on the next generation of GPU's (Fermi).


What is that "Test Suite" and why isn´t it an easy thing to test? Is it a personal collection of files Mr. Coalson has in his "lab"?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2009-12-31 02:25:00
0.8 is basically a re-branded 0.7 with default compression mode changed from -5 to -7 and default mode set to --gpu-only, to provide better results for casual user who doesn't want to bother with command line switches  It doesn't deserve separate testing.

flac test suite is available in flac's sources, but has to be adapted for FlaCuda. This should be easy, it was done once with flake. I'm just very lazy and didn't find time to do it.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2009-12-31 03:02:13
0.8 is basically a re-branded 0.7 with default compression mode changed from -5 to -7 and default mode set to --gpu-only, to provide better results for casual user who doesn't want to bother with command line switches  It doesn't deserve separate testing.

flac test suite is available in flac's sources, but has to be adapted for FlaCuda. This should be easy, it was done once with flake. I'm just very lazy and didn't find time to do it.


Thanks for explaining. I should have known that since it is mentioned on the Flac pages.
btw. the first time i understand exactly what you are doing -> Being lazy is one of my favorite ambitions. Enjoy!
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: glebe on 2009-12-31 08:21:48
Some addition to my previous post (http://www.hydrogenaudio.org/forums/index.php?showtopic=64628&view=findpost&p=675254). If use "--verify" option then

1. 4 threads are faster than 3 threads
2. --gpu-only also gives speed boost

So on 0.8 for me optimal settings are "-8 --cpu-threads 3 --verify".

Thanks and happy new year!
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: skamp on 2010-01-05 13:46:39
Any plans for a CUDA port of LossyWAV? Direct encoding to lossyFLAC (from .wav to .lossy.flac in one pass) would be awesome.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2010-01-05 14:40:39
This can be done, but not very easy. Some of the features (like noise shaping) are not quite suitable for parallel processing, and quality control will be an issue, as the output will most likely be not bit-identical to the reference implementation, so some ABXing will be required. I should probably wait for a stable version.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: skamp on 2010-01-05 15:00:52
I should probably wait for a stable version.

…of LossyWAV? Latest stable (1.2.0) was released (http://www.hydrogenaudio.org/forums/index.php?showtopic=77042) last month. Also, there's a CUDA implementation (more than one? can't recall) of FFT, shouldn't that help?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2010-01-05 15:18:04
Oops, i missed that release. FFT is the easy part. Ok, i'll try when i have the time.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Nick.C on 2010-01-05 17:28:22
Shaping is off by default in 1.2.0. A speedup would be lost as the second 1024 point FFT for one 512 sample codec-block is the same as the first 1024 point FFT for the next codec-block. Other than that, I see no particular problems (other than keeping the processed blocks in the correct order if that level of parallelism is reached).
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2010-01-07 11:30:45
Good then, because CUDA version is likely to support only default options.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2010-01-07 11:35:32
Thanks to Wombat for finding quite a serious bug in FlaCuda 07-08. lossyWAV preprocessed files and other audio with blocks with zero lower bits were encoded incorrectly. Bugfix release (FlaCuda 09 (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=64628&view=findpost&p=656451)) is now available. Please, remember not to reencode anything with FlaCuda without verifying results, until it's no longer in alpha stage.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: skamp on 2010-01-07 13:08:56
Thanks, but it fails under linux again.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2010-01-07 13:31:23
Replace CUDA.NET.dll again.
This a third-party library: http://www.hoopoe-cloud.com/Solutions/CUDA.NET/Default.aspx (http://www.hoopoe-cloud.com/Solutions/CUDA.NET/Default.aspx)
Unfortunately they've chosen to make two separate versions, for windows and linux/macos.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: arri on 2010-01-10 16:01:14
Hello,

problems here with CUETools.FlaCuda v0.9 on Vista

tried to convert wav to flac:

Code: [Select]
1 out of 1 tracks converted with major problems.

Source: "H:\U2 - Achtung Baby.wav"
  An error occurred while finalizing the encoding process (Object not found) : "F:\U2 - Achtung Baby.flac"
  Conversion failed: Object not found


Conversion was made by foobar 1.0 with settings:

Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2010-01-10 16:31:34
Thanks, i think i fixed fb2k pipe input, try this one (http://www.hydrogenaudio.org/forums/index.php?act=attach&type=post&id=5617).
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: arri on 2010-01-10 17:07:31
Thanks, i think i fixed fb2k pipe input, try this one (http://www.hydrogenaudio.org/forums/index.php?act=attach&type=post&id=5617).


Thanks!

It worked like a charm 
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2010-01-10 22:21:34
One thing i am curious about.
Flac has more or less the "Variable Blocksize" implemented in its standard but never really realized it even if my hardware players decoder can manage it. With flake once there was a small advantage in using this.
Now with Flacuda i noticed it doesn´t matter what variable blocksize option i use it leads to bigger files.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2010-01-10 22:23:28
That's because it's not implemented yet.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: odyssey on 2010-01-29 13:59:25
Thanks for this great project!

I'm very impressed by the compressed filesize using flacuda (-11)! However, I'm still unable to make it work on my Geforce 9300 mainboard

Error    : Exception of type 'GASS.CUDA.CUDAException' was thrown.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2010-01-29 14:29:32
Can you please send me results of the following deviceQuery utility: [attachment=5698:deviceQuery.rar]
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: odyssey on 2010-01-29 14:37:56
Can you please send me results of the following deviceQuery utility: [attachment=5698:deviceQuery.rar]

Code: [Select]
CUDA Device Query (Driver API) statically linked version
Cuda driver error 3 in file 'd:/bld_sdk10.pl/devtools/SDK10/CUDA_2.3/SDK10/Compute/C/src/deviceQueryDrv/deviceQueryDrv.cpp' in line 38.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2010-01-29 14:42:45
Hm, either you have very old drivers or there is something wrong with your hardware. Even the most basic function cuDeviceGetCount, which should've returned the number of CUDA-capable devices in your system, fails.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: odyssey on 2010-01-29 14:47:38
I'm using the latest available drivers from the nVidia homepage. Just reinstalled the entire PC a few days ago. Win7 x64.

nForce driver v15.49 WHQL containing:
GPU Driver (v190.38) WHQL
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2010-01-29 15:06:45
Well, error 3 means:  CUDA_ERROR_NOT_INITIALIZED      = 3,        ///< Driver not initialized
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: odyssey on 2010-01-29 15:31:03
So, where do I go from here?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2010-01-29 16:10:19
No idea, to be honest. If you are sure that drivers are installed correctly and that your hardware is CUDA-capable, this leaves us only with NVIDIA customer support. Because if even the basic test (deviceQuery) from NVIDIA SDK doesn't work, FlaCuda certainly won't.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Maggi on 2010-01-29 16:20:10
I'm using the latest available drivers from the nVidia homepage. Just reinstalled the entire PC a few days ago. Win7 x64.

nForce driver v15.49 WHQL containing:
GPU Driver (v190.38) WHQL


according to nVidia's driver page, you are not using the latest drivers .. try these:

http://www.nvidia.com/object/win7_winvista...96.21_whql.html (http://www.nvidia.com/object/win7_winvista_64bit_196.21_whql.html)

as for your graphics card, it should be able to handle CUDA, if it has at least 256MB of local memory, but to be honest, I wouldn't expect any miracles, since it seems to be equipped with a mere of 16 cores

HTH,
Maggi
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: odyssey on 2010-01-29 16:53:19
according to nVidia's driver page, you are not using the latest drivers .. try these:

http://www.nvidia.com/object/win7_winvista...96.21_whql.html (http://www.nvidia.com/object/win7_winvista_64bit_196.21_whql.html)
Not sure they will work. Geforce 9300 isn't listed under supported products. I've been struggling previously to get newer releases to work on this. Note that while it's called Geforce 9300, it's a mainboard chipset based on a nForce 730i chip - Not to mix that up with the Geforce 9300 GS chip, which are entirely different.

as for your graphics card, it should be able to handle CUDA, if it has at least 256MB of local memory
I have not yet verified with 100% accuracy that I have activated 256MB on it, but according to Windows, it seems that I have. I'll be back on this one

but to be honest, I wouldn't expect any miracles, since it seems to be equipped with a mere of 16 cores
Well it IS sold as having CUDA capability, so no matter how good it would ever perform it should, and I'll be glad if I could just get FlaCUDA up and running. It compresses better than native FLAC, so if it's just able to compress my lossless music even further I'm happy
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: alvaro84 on 2010-01-29 18:11:30
Having a mere 16 cores is not that bad - my 8600GT has only 32 and it's faster in FLAC encoding (I've installed new drivers a few weeks ago and tried the actual flaCUDA) than 2 stock flac encoders running in parallel on my 3.33GHz conroe core2duo - so if these 16 cores have the same clock rate (which I'm not sure about at all...) it can still be faster than a single threaded software encoder on virtually any non-overclocked CPU.
It's almost scary how well these low level GPUs stand against much higher class CPUs of their own age
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: odyssey on 2010-01-29 19:37:06
Problem found: It's due to Microsoft's RDP-lameness. When using remote desktop, the graphics adapter is disabled and replaced by the one used for RDP.

So thanks MS, I can't use CUDA programs using RDP!
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Maggi on 2010-02-01 08:43:00
according to nVidia's driver page, you are not using the latest drivers .. try these:

http://www.nvidia.com/object/win7_winvista...96.21_whql.html (http://www.nvidia.com/object/win7_winvista_64bit_196.21_whql.html)
Not sure they will work. Geforce 9300 isn't listed under supported products. I've been struggling previously to get newer releases to work on this. Note that while it's called Geforce 9300, it's a mainboard chipset based on a nForce 730i chip - Not to mix that up with the Geforce 9300 GS chip, which are entirely different.


look again ...
Quote
GeForce 9 series:
9500 GS, 9600 GT, 9200, 9800 GX2, 9500 GT, 9600 GS, 9300, 9800 GT, 9400 GT, 9300 GS, 9400, 9600 GSO, 9300 GE, 9800 GTX/GTX+



as for your graphics card, it should be able to handle CUDA, if it has at least 256MB of local memory
I have not yet verified with 100% accuracy that I have activated 256MB on it, but according to Windows, it seems that I have. I'll be back on this one


you could try and run GPU-z for getting those details, as well as information about which APIs are supported by your card

http://www.techpowerup.com/gpuz/ (http://www.techpowerup.com/gpuz/)


but to be honest, I wouldn't expect any miracles, since it seems to be equipped with a mere of 16 cores
Well it IS sold as having CUDA capability, so no matter how good it would ever perform it should, and I'll be glad if I could just get FlaCUDA up and running. It compresses better than native FLAC, so if it's just able to compress my lossless music even further I'm happy


fair enough ...


Problem found: It's due to Microsoft's RDP-lameness. When using remote desktop, the graphics adapter is disabled and replaced by the one used for RDP.

So thanks MS, I can't use CUDA programs using RDP!


now that's a major bummer ... how about using eg. TightVNC for your remote activities ?

http://www.tightvnc.com/ (http://www.tightvnc.com/)

Cheers,
Maggi
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: RED_404 on 2010-04-24 09:44:59
I'm getting "Error    : Exception of type 'GASS.CUDA.CUDAException' was thrown."

Code: [Select]
CUETools.FlaCuda.exe -11 Priceless.wav
FlaCuda#.91, Copyright © 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  : Priceless.wav
File Info : 44100kHz; 2 channel; 16 bit; 00:04:07.6270000
Error    : Exception of type 'GASS.CUDA.CUDAException' was thrown.

I ran the deviceQuery.rar  and got this
Code: [Select]
CUDA Device Query (Driver API) statically linked version
There is 1 device supporting CUDA

Device 0: "GeForce GTX 480"
  CUDA Driver Version:                          3.0
  CUDA Capability Major revision number:        2
  CUDA Capability Minor revision number:        0
  Total amount of global memory:                1576468480 bytes
  Number of multiprocessors:                    15
  Number of cores:                              120
  Total amount of constant memory:              65536 bytes
  Total amount of shared memory per block:      49152 bytes
  Total number of registers available per block: 32768
  Warp size:                                    32
  Maximum number of threads per block:          1024
  Maximum sizes of each dimension of a block:    1024 x 1024 x 64
  Maximum sizes of each dimension of a grid:    65535 x 65535 x 1
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                            512 bytes
  Clock rate:                                    0.81 GHz
  Concurrent copy and execution:                Yes
  Run time limit on kernels:                    No
  Integrated:                                    No
  Support host page-locked memory mapping:      Yes
  Compute mode:                                  Default (multiple host threads can use this device simultaneously)

Test PASSED

OS: Windows 7 x64
GPU: GeForce GTX 480
Graphics Driver:  197.55 (8.17.11.9755)


Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2010-04-24 09:54:33
Wow. Congrats on getting a GTX 480  Sorry, Fermi cards are not supported yet.
I think i'll have to wait for the release of GTX 460, because GTX 480/470 are a bit over my budget.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: dragmore on 2010-04-24 20:11:34
Hi. Did some tests on Bel Canto's CD comparing Flac 1.21 to ure newest version .91.
HW: Intel Core 2 Quad Q9550, 8GB RAM, Nvidia GTX260 Driver: 197.45 @ Win7x64, Intel X-25 SSD

BelCanto.wav File Info : 44100kHz; 2 channel; 16 bit; 00:47:44.2000000 Results

Results:

FLAC 1.21
Mode -3 : Belcanto.wav: wrote 293901039 bytes, ratio=0,582 ,15,2Sec
Mode -6 : Belcanto.wav: wrote 284872007 bytes, ratio=0,564 ,20,4Sec
Mode -8 : Belcanto.wav: wrote 283904326 bytes, ratio=0,562 ,72.4Sec

FlaCuda#.91,

Mode -3 : 495,34x; 284585708 bytes in 00:00:05.7823308 seconds;
Mode -6 : 504,41x; 283252159 bytes in 00:00:05.6783248 seconds;
Mode -8 : 418,60x; 283217473 bytes in 00:00:06.8423914 seconds;

CPU Options:
c:\CDRIPS\cuda>CUETools.FlaCuda.exe -8 --cpu-threads 2 ..\BelCanto.wav
Results  : 433,81x; 283217473 bytes in 00:00:06.6023776 seconds;

c:\CDRIPS\cuda>CUETools.FlaCuda.exe -8 --cpu-threads 3 ..\BelCanto.wav
Results  : 392,28x; 283217473 bytes in 00:00:07.3014177 seconds;

c:\CDRIPS\cuda>CUETools.FlaCuda.exe -8 --cpu-threads 4 ..\BelCanto.wav
Results  : 406,71x; 283217473 bytes in 00:00:07.0424028 seconds;


Every other time i get a :

Error    : Exception of type 'GASS.CUDA.CUDAException' was thrown.
Unhandled Exception: ErrorLaunchTimeout

Description:
  Stopped working

Problem signature:
  Problem Event Name:   CLR20r3
  Problem Signature 01:   cuetools.flacuda.exe
  Problem Signature 02:   1.0.0.0
  Problem Signature 03:   4b49fea7
  Problem Signature 04:   CUDA.NET
  Problem Signature 05:   2.3.7.0
  Problem Signature 06:   4ae56b31
  Problem Signature 07:   345
  Problem Signature 08:   22
  Problem Signature 09:   GASS.CUDA.CUDAException
  OS Version:   6.1.7600.2.0.0.256.1
  Locale ID:   1044

Besides the crash, i must say, IMPRESSIVE
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: me7 on 2010-04-25 19:00:44
Wow, FLAC -8 works at ~50x on my laptop, FlaCuda -11 does ~150x, very impressive.

Is FlaCuda with the "--verify" switch considered to be safe for archive use? I understand that software can never be guaranteed to be error free and I don't ask for it, I just wonder if you consider your code (with the verify option) robust enough to be an alternative to the official FLAC.

As far as I understand you use the parallel processors on the GPU find the best "next step" (don't know how it's called in FLAC terminology) and then execute it on the CPU. Is this approach limited to FLAC or can similar computations of other audio/video formats use it?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2010-04-26 11:24:13
Unhandled Exception: ErrorLaunchTimeout

Exactly how often does it happen? Is there any pattern to this?
Does it look like a screenshot in this article: http://www.microsoft.com/whdc/device/displ...dm_timeout.mspx (http://www.microsoft.com/whdc/device/display/wddm_timeout.mspx) ?
Anybody else having those problems?

Is FlaCuda with the "--verify" switch considered to be safe for archive use?

Yes. --verify guarantees that produced file can be decoded, at least with CUETools.Flake decoder, and it's audio contents is identical to the source.
In theory, it cannot give a 100% guarantee that produced file can be decoded with reference FLAC decoder, because --verify uses other decoder, but so far nobody reported any such problems.

As far as I understand you use the parallel processors on the GPU find the best "next step" (don't know how it's called in FLAC terminology) and then execute it on the CPU.

More or less. Recent versions can do almost everything on GPU, and latest version does this by default (can be disabled with --slow-gpu option). CPU only does some sanity checks, formats the resulting data as a FLAC bitstream and writes it to file.

Is this approach limited to FLAC or can similar computations of other audio/video formats use it?

Effective parallel processing is possible only if format is suitable for it. For example, ALAC uses adaptive compression, which makes it very inconvenient for parallel processing. Maybe FLAC isn't the only codec which can benefit from GPU encoding, but for most codecs the task will be much harder and the speed won't be that impressive. Most of the GPU code in FlaCuda is very specific for FLAC.

As for video, there are several GPU encoders for x264 video codec, most if not all of them are proprietary.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: MachineHead on 2010-05-04 00:23:01
Getting a crash when I try to convert individual wave files using FlaCuda 091. The error codes are nearly the same as mentioned in an earlier post. Interestingly, FlaCuda does not crash if converting a wavpack image file with embedded cue to flac image with embedded cue.

Windows error report below.

Problem signature:
  Problem Event Name:   CLR20r3
  Problem Signature 01:   cuetools.flacuda.exe
  Problem Signature 02:   1.0.0.0
  Problem Signature 03:   4b49fea7
  Problem Signature 04:   mscorlib
  Problem Signature 05:   2.0.0.0
  Problem Signature 06:   4a27471d
  Problem Signature 07:   349e
  Problem Signature 08:   1c5
  Problem Signature 09:   System.IO.IOException
  OS Version:   6.1.7600.2.0.0.256.48
  Locale ID:   1033


This was using foobar2000. I also grabbed that error code:


Conversion failed: The encoder has terminated prematurely with code -532459699 (0xE0434F4D); please re-check parameters


Commandline parameters are set to: -8 - -o %d
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: modernartistry on 2010-05-29 07:26:31
Hell FlaCuda091 is ultra fast. Using a NVidia GT8800 with foobar v1.0.3 and "-8 - -o %d --verify" parameters. Only thing is that my HDD is limiting the encoding speed. A 46min Wav file took up less than 10sec. Detailed results coming up soon.
Thanks for that encoder. I hope and wish that the FlaCuda will be compatibel with all other software player, devices and decoder.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Bad Monkey on 2010-05-29 19:54:08
nVidia 8800 GT with Intel Q6600 Quad core.

Foobar 1.03 transcoding FLAC to FLAC (Pink Floyd Final Cut [13 tracks])

Code: [Select]
*** FLAC 1.2.1 @ 4 threads ***

level 8
Total encoding time: 0:22.277, 124.90x realtime

*** FlaCuda 0.91 ***

-8 - -o %d --verify
Total encoding time: 1:01.184, 45.47x realtime

-8 --cpu-threads 2 - -o %d --verify
Total encoding time: 0:50.529, 55.06x realtime

-8 --cpu-threads 3 - -o %d --verify
Total encoding time: 0:42.807, 65.00x realtime

-8 --cpu-threads 3 - -o %d
Total encoding time: 0:42.011, 66.23x realtime

-8 --cpu-threads 4 - -o %d --verify
Total encoding time: 0:42.027, 66.20x realtime

-8 --cpu-threads 4 - -o %d
Total encoding time: 0:41.356, 67.28x realtime

-8 --slow-gpu --cpu-threads 4 - -o %d --verify
Total encoding time: 0:37.939, 73.34x realtime


CPU usage with FlaCuda never peaks above 25% per core. Seems for a practical scenario with a quad core CPU it doesn't compete.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: NullC on 2010-06-04 06:58:24
I'm amused by flacuda's speed.... I can't think of too much use for 800x realtime flac encoding, but I thought I throw out something that I'm too lazy to implement that flacuda's speed would make almost reasonable:

_Optimal_ block size selection.  Flac lets you change the frame size on the fly. Truly optimal selection across all supported sizes would be a bit insane, but globally optimal selection on a subset of sizes is not too terrible. 

Lets consider all powers of two from 64 to 32768, there are ten sizes. At every 64 sample offset through the file, encode all ten sizes, and store the resulting sizes. Making the hand-wavy assumption that the computation per sample is constant this will be 1023x slower than normal.

Take the sizes and construct a directed graph with a vertex at every 64th sample and 10 edges leaving the sample connecting it to the vertex for the sample 64,128,256,etc.  away. Assign the coding cost for the block at each of the sizes to each of the edges.  Now run the Dijkstra shortest path algorithm from the first to last or last to first vertex. The result will be the globally optimal frame size selection given the  available block sizes.

Either re-encode or, if you wasted a lot of ram saving the results of the first past, reassemble the final stream.

Limiting yourself to powers of two in the flac subset over the range 64-4096 would be 127x the number of processed samples processed, 32-4096 would be 255x.  The cuda implementation might be able to maintain almost decent speeds while doing this extra work. ;) This isn't limited to power of two sizes, but you probably want to arrange it so that your smallest size is a common factor of all the sizes you use.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Brat2007 on 2010-07-29 19:36:19
Is there anybody here who knows the math behind Cholesky decomposition used in ffmpeg as an alternative method of LPC coefficients search?
This method is too slow for CPU, but i thought i'd give it a shot on GPU.
The problem is, GPU doesn't do double precision very well.



Gregory,

maybe you can find background info here : http://www.cise.ufl.edu/research/sparse/ch...OLMOD/Cholesky/ (http://www.cise.ufl.edu/research/sparse/cholmod/CHOLMOD/Cholesky/)
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Mataglap on 2010-07-30 02:24:50
Man, that's some fast encoding!  Nice work!

Is there any chance that tag writing will be added to the binary, so that it can be used with EAC?

Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2010-07-30 13:12:34
Man, that's some fast encoding!  Nice work!

Is there any chance that tag writing will be added to the binary, so that it can be used with EAC?


You already can with metaflac. I gave an example here flacuda.exe & metaflac.exe in EAC (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=76193&view=findpost&p=670975)
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: SCOTU on 2010-07-30 17:31:26
Has anyone tested this when using it multiple times in parallel?  The ability to single threaded encoding on several files at once is pretty amazing, wondered if this wouldn't use up all the GPU and could also be run several in parallel.  I don't run into a hard drive bottleneck as easily as most as I use a raid 0 configuration of high end desktop hard drives.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: alvaro84 on 2010-07-30 19:58:45
My 8600GT got used fully by one instance of the CUDA encoder, more threads gave no advantage. On the top of that it can be I/O limited very quickly (I tried it with the source being on different HDD than the target).
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Mataglap on 2010-07-30 20:46:07
Man, that's some fast encoding!  Nice work!

Is there any chance that tag writing will be added to the binary, so that it can be used with EAC?


You already can with metaflac. I gave an example here flacuda.exe & metaflac.exe in EAC (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=76193&view=findpost&p=670975)


Yep, you did.  Clever! Thanks.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: modernartistry on 2010-08-03 01:39:03
Is there any further developement on FlaCuda? Current version is 0.91?

Another test:

FlaCuda 091 + Foobar 1.03
Music: Edenbridge - Solitair / Symphonic Metal Album in a wav file, timelenght 57:25min
Hardware: Intel Dual Core E8400 / Nvidia GT8800 (with newer 92b core)

FLAC 1.2.1 level 8 (2 threads)
Total encoding time: 1:13.711, 46.74x realtime

FlaCuda -8 - -o %d --verify
Total encoding time: 0:31.216, 110.37x realtime

FlaCuda -8 --cpu-threads 2 - -o %d --verify
Total encoding time: 0:24.492, 140.67x realtime

FlaCuda is a good choice for Dual Core system. As Bad Monkey above wrote a quad core may be faster than gpu.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Bad Monkey on 2010-08-03 07:11:28
I have an 8800GT too but I was unable to get much above 70x, per my post above, with FlaCuda. Your results would beat my Q6600's benchmark of 125x. Am I missing something?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: modernartistry on 2010-08-03 20:10:06
I have an 8800GT too but I was unable to get much above 70x, per my post above, with FlaCuda. Your results would beat my Q6600's benchmark of 125x. Am I missing something?


Hm. As i wrote i have the newer version of 8800GT that came out in february 2008 with 512MB RAM instead of 378MB. This GPU core (G92) was the fastest out there. followed by the G200b core a year later which is nearly the same.
Might be that you have an older modell or drivers? I used the same setting as you. Maybe your harddrive is too slow?

My GPU card spec:
512 MByte GDDR3
65 nm
Stream-Processors: 112
RAM bandwith: 256-bit
Core-frequenz:    600 MHz
Shader-frequenz: 1500 MHz
RAM-frequenze:   900 MHz
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Bad Monkey on 2010-08-04 07:10:20
Yeah I have 512 MB but core clock is only 450 MHz / VRAM 700 MHz. Okay.

Am going to upgrade to a GTX 460 sometime soon. So that'll be interesting. Haha.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: alvaro84 on 2010-08-04 07:23:30
There must be some other limit, because this 70x matches my results with a 8600GT and an early version of flaCUDA. Any 8800GT should be much faster than it.
HDD speed, perhaps? Those are mechanical and thus seriously limited when they have to read/write more threads at once (have to move their heads back and forth). Whenever I tested any encoder I used a different HDD for destination and did not use more than 2 threads, ever (it wouldn't even benefit my core2duo, to begin with ).
I'm planning on getting an SSD in a few months (for system and some temp area) so I'll test 2-thread encoding again.

edit. I forgot that I'm planning on replacing my vcard to a Redeon too. Well, so much for CUDA...
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Bad Monkey on 2010-08-04 07:58:01
If there is another limit clearly it would have to be something not shared with the CPU [turning in faster results @ 125x], which is obviously not the case with a HDD restriction. In any case the FLAC result above is only 260 MB.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: SCOTU on 2010-08-04 08:31:32
Hard drive shouldn't need to really move back and forth for different threads unless they're taking from drastically different parts of the disk on a high priority basis.  Hard drives and OS' have a request queue that will make efficient sweeps of the disk and even prefetch data around what it's looking at, so it usually doesn't need to do much moving assuming your keep your HDD defragmented.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: modernartistry on 2010-08-24 21:11:04
@Bad Monkey
I found out something but test will follow later. There are speed differences when I use different encoded sources. So when I convert a wav or ape or flac file with flacuda there a differences in speed. Has something to do with the preparation of a track before flacuda encodes it.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: ChronoSphere on 2010-08-25 20:54:33
wav is uncompressed, flac/ape has to be decompressed. While flac decompression is very fast, ape's isn't - it's quite low actually (60x or something?), that's why it takes longer than wav to convert.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2010-08-25 21:16:23
Wonder why Mr. Chudov doesn´t respond in his threads since a while. I hope you are fine Gregory and enjoy holidays slurping some Cocktail

Now what i want to say. Regarding Cuda, i feel already a bit dissapointed. Since it is an Nvidia only thingy i wonder why even for the first next generation cards the code doesn´t work anymore.  Of cause the newer cards have much changes in hardware but...

I start to get a friend of this Opencl. Maybe we will see a Flacocl some day.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Nowings69 on 2010-09-05 02:45:44
@ Gregory S. Chudov
I designed FlaCuda logo with respect original logo.
Thank you very much

(http://img274.imagevenue.com/loc217/th_50722_01_122_217lo.jpg) (http://img274.imagevenue.com/img.php?image=th_50722_01_122_217lo.jpg)
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Maggi on 2010-09-07 14:31:34
I'm getting "Error    : Exception of type 'GASS.CUDA.CUDAException' was thrown."

[...]


I get the same error on my GTX460 ... is there anything I could do to help tackling this issue ?

Cheers,
Maggi

/edit (found an updated version)

maybe this doc could be helpful ?
http://developer.download.nvidia.com/compu...bilityGuide.pdf (http://developer.download.nvidia.com/compute/cuda/3_1/toolkit/docs/NVIDIA_FermiCompatibilityGuide.pdf)
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: dewdude on 2010-09-08 21:50:13
I'm VERY late to this party. I only found out about this encoder yesterday and for the longest time had no CUDA enabled hardware.

I'm currently running a GeForce GTX260M with 1GB DDR3 (that's dedicated video ram, not shared with system) in my Asus laptop which has a C2D 2.53 P8700 and actually uses a custom desktop chipset. The GPU though is underclocked to 500/1250/800 and i'm not arsed to restore it to defaults.

Anyway...here are my results from FLACuda encoding a rather large WAV of Dark Side Of The Moon to -8. This is for the GPU only encode:

Quote
C:\Users\Jay\Desktop\FlaCuda091>cuetools.flacuda.exe -8 "Untitled_mixdown.wav" -o dsotm.flac
FlaCuda#.91, Copyright © 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  : Untitled_mixdown.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:41:47.0100000
Results  : 192.97x; 615833373 bytes in 00:00:31.6468101 seconds;


I also ran tests with --slow-gpu and in addition to that..adding --cpu-threads 2. I will mention that my CPU by default runs in the usual "as-needed" clock mode...so auto-scales depending on requirements. I didn't look at the clock when it was going up...but I can imagine that it likely jumped to the full 2.5ghz when doing this. The result speed without --cpu-threads 2 was 234.87x, I didn't feel the need to list it for such a small variance.

Quote
C:\Users\Jay\Desktop\FlaCuda091>cuetools.flacuda.exe --slow-gpu --cpu-threads 2 -8 "Untitled_mixdown.wav" -o dsotm2.flac
FlaCuda#.91, Copyright © 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  : Untitled_mixdown.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:41:47.0100000
Results  : 234.98x; 615867393 bytes in 00:00:25.9894865 seconds;


I wanted to see what it could do with 96/24 data, but sadly it's limited to 16-bit audio...so while this may work great for archiving CD's, it won't outright replace all my FLAC usage.

I'd output times and stuff from the standard FLAC encoder, but i see no way to get it to display any data of such and assume i need some kind of special version,  which I don't feel like tracking down. However, based on the somewhat inaccurate method of a stopwatch and the flac.exe CLI encoder....it was no where near this kind of speed.

Excellent job though. I didn't think I'd see flac encode that fast at level 8.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2010-09-11 00:04:08
Lately i dropped in a Quadcore in my old fellow 965P board. Just have to show you how it looks when i encode a cd and even with verify. Just look at the "Time" column closely

(http://img521.imageshack.us/img521/3236/speedv.th.gif) (http://img521.imageshack.us/i/speedv.gif/)

Edit: together with my GTX260 i mentioned earlier in this thread.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2010-10-09 03:08:06

Should that have been it?
Another great idea fading?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2010-10-15 20:55:01
Sorry for slacking, i've been extremely busy at work lately and still don't have time to answer all PMs and such. Meanwhile, here's a beta version of OpenCL flac encoder for ATI/AMD GPUs. I only tested it on Radeon HD 5450, which is extremely slow. No idea if this thing will be much faster than CPU-based flac encoders when using more advanced GPUs. My guess is we won't see such speeds as with CUDA.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Case on 2010-10-16 00:17:13
Seems to be about the same speed on my Radeon HD 5870 as FlaCUDA v0.4 was on my GTX 285.
[attachment=6142:flaccl.png]
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2010-10-16 00:18:45
That's good news. I thought it was worse. Thanks a lot!
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2010-10-16 23:43:01
Nice!
Sadly i can´t get it running on my GTX260. The driver version is 258.96 and should support Opencl 1.0
I get this error: Build failed with errorcode BULD_PROGRAM_FAILURE
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2010-10-17 03:43:42
OpenCL doesn't automatically mean that it runs on any GPU. This is a version for AMD GPUs. There will be a combined version later.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2010-10-17 22:09:09
Ah ok, don´t hurry.
I just wonder what standards are for these days. You programmers must have a really hard time doing compatibility checks these days. For me noob Opencl is Opencl, shouldn´t matter what brand.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Destroid on 2010-10-18 07:34:02
I applaud the effort for getting OpenCL projects going. I suppose having an the AMD graphics adapter is my own issue but I don't think Stream/CUDA being sectioned-off to their respective brands can help the concept of "parallel processing is the future."

Gregory: would you mind commenting on your experience dealing with OpenCL vs. CUDA? I'd be interested to hear what pro's and con's are from a developer.

And I might add that the title of this topic is becoming less accurate
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2010-10-18 08:36:25
Well, the languages themselves are very similar. 99% of concepts are the same, sometimes renamed for no apparent reason. They could have just adopted CUDA as a standard, but i guess that was unacceptable for political reasons. Main added feature in OpenCL is language support for SSE-like vector operations, which are needed to effectively use AMD GPUs and probably Intel's future SandyBridge architecture.

Unfortunately, OpenCL cannot completely hide the differences in hardware architectures. You still have to write the same algorithm twice for NVIDIA and AMD hardware, or suffer unacceptable performance penalties. But at least you can reuse some parts and more easily write software that supports both.

AMD's OpenCL compiler and documentation in their current state were a huge disappointment. About half of the time i spent porting FlaCUDA to OpenCL was wasted on combating numerous compiler errors and such. CUDA had it problems too, but nothing like this (http://forums.amd.com/forum/messageview.cfm?catid=390&threadid=140722&enterthread=y), for example.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Maurits on 2010-10-25 22:46:12
Well, the languages themselves are very similar. 99% of concepts are the same, sometimes renamed for no apparent reason. They could have just adopted CUDA as a standard, but i guess that was unacceptable for political reasons. Main added feature in OpenCL is language support for SSE-like vector operations, which are needed to effectively use AMD GPUs and probably Intel's future SandyBridge architecture.

Unfortunately, OpenCL cannot completely hide the differences in hardware architectures. You still have to write the same algorithm twice for NVIDIA and AMD hardware, or suffer unacceptable performance penalties. But at least you can reuse some parts and more easily write software that supports both.

AMD's OpenCL compiler and documentation in their current state were a huge disappointment. About half of the time i spent porting FlaCUDA to OpenCL was wasted on combating numerous compiler errors and such. CUDA had it problems too, but nothing like this (http://forums.amd.com/forum/messageview.cfm?catid=390&threadid=140722&enterthread=y), for example.

Considering OpenCL is much newer than CUDA, is still developing (recently from version 1.0 to 1.1), the SDKs are still improving and the hardware manufacturers are still improving their implementation of OpenCL in the drivers, do you think this is just a temporary phase?

Could it be that eventually OpenCL is close to CUDA in performance and the multi-vendor opportunities make a small hit worth it?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2010-10-25 23:07:37
I sure hope so, but it might take a couple of years before it reaches maturity.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: alvaro84 on 2010-10-26 14:22:17
And what about DirectCompute?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2010-10-27 14:20:55
To be honest, i don't know much about it, except that it's not likely to be available outside of Windows world, so it doesn't sound promising.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: viktor on 2010-10-27 23:47:36
i've installed catalyst 10.10 APP version for my hd4350 on windows 7 x64.

when i try to encode a wav file, it keeps saying:

Error: Build failed with error code BUILD_PROGRAM_FAILURE

the same file encodes fine with flac.exe. any ideas?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: SCOTU on 2010-10-28 21:39:16
To be honest, i don't know much about it, except that it's not likely to be available outside of Windows world, so it doesn't sound promising.


Microsoft is actually porting DirectX to Linux, no clue when that'll actually happen, though.

edit: correction, it may only be Direct3D.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Lucho on 2010-10-29 08:02:49
i've installed catalyst 10.10 APP version for my hd4350 on windows 7 x64.

when i try to encode a wav file, it keeps saying:

Error: Build failed with error code BUILD_PROGRAM_FAILURE

the same file encodes fine with flac.exe. any ideas?


Probably you didnt install OpenCL driver, look at this page:  http://sites.amd.com/us/game/downloads/Pages/downloads.aspx (http://sites.amd.com/us/game/downloads/Pages/downloads.aspx)  ,choose your OS and than at "individual packages"
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: viktor on 2010-10-29 10:26:49
Probably you didnt install OpenCL driver, look at this page:  http://sites.amd.com/us/game/downloads/Pages/downloads.aspx (http://sites.amd.com/us/game/downloads/Pages/downloads.aspx)  ,choose your OS and than at "individual packages"


the APP version contains that.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2010-10-29 10:37:57
I'll try to find a HD4xxx GPU to test it on...
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: viktor on 2010-10-29 13:15:00
I'll try to find a HD4xxx GPU to test it on...


thanks gregory.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: hardboiled on 2010-11-03 14:32:25
Hi Gregory,

Any chance for a Fermi based FLACUDA in the near future?  I screwed myself by upgrading from my GTX260 to the GTX460 and didn't realize FLACUDA didn't support Fermi based cards.  Thanks!

Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2010-11-05 17:36:11
I'm currently testing next version on GTX460. Looks good so far. Will probably release it next week.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Metroid on 2010-11-06 03:35:41
I'm currently testing next version on GTX460. Looks good so far. Will probably release it next week.


Look forward to seeing it. I just got a GTX 460 today, now I can try it on.

My 8800GT has speeds up to 220 on cuetools flacuda
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: viktor on 2010-11-06 12:15:45
I'll try to find a HD4xxx GPU to test it on...


couldn't i help you with debugging?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2010-11-06 12:24:17
I think i can find one at work. I'll PM you if i can't.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: JapanAudio on 2010-11-06 18:40:02
I wouldn't kill nVidia just yet. AFAIK, as of now, it is the only card that supports GPU video transcoding [...]

I've transcoded a bunch of videos with ATI Avivo.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: IgorC on 2010-11-07 01:20:11
I wouldn't kill nVidia just yet. AFAIK, as of now, it is the only card that supports GPU video transcoding [...]

I've transcoded a bunch of videos with ATI Avivo.


Maybe it's not quite on topic but it might be informative.
GPU video transcoding is different. Mainly it is used for H.264 lossy coding. Untill now every GPU H.264 encoder was very inferior to good CPU H.264 encoder. Speed comes at cost of quality.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: JapanAudio on 2010-11-07 03:41:28
I wouldn't kill nVidia just yet. AFAIK, as of now, it is the only card that supports GPU video transcoding [...]

I've transcoded a bunch of videos with ATI Avivo.


Maybe it's not quite on topic but it might be informative.
GPU video transcoding is different. Mainly it is used for H.264 lossy coding. Untill now every GPU H.264 encoder was very inferior to good CPU H.264 encoder. Speed comes at cost of quality.

Yeah... I woudn't recommend it for general use. It's just fast. That thing is basically just a bunch of ALUs and hardwired processing units. No tweaking at all for x264.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: bb10 on 2010-11-07 22:25:03
Any plans for a CUDA/CL port of WavPack?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2010-11-07 23:18:44
I don't think it's possible. FLAC seems to be the only codec properly suitable for parallel encoding.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2010-11-09 21:50:27
FLACCL 0.2:[attachment=6172:flaccl02.rar]

Supported devices:
1) NVIDIA Geforce 4XX (Fermi)
Requires fresh drivers (e.g. http://www.nvidia.com/object/win7-winvista...hql-driver.html (http://www.nvidia.com/object/win7-winvista-64bit-260.99-whql-driver.html))
2) ATI Radeon HD 5XXX
Requires fresh drivers (e.g. http://sites.amd.com/us/game/downloads/Pag...on_win7-64.aspx (http://sites.amd.com/us/game/downloads/Pages/radeon_win7-64.aspx))
Be sure to download "AMD Catalyst™ Accelerated Parallel Processing (APP) Technology Edition", not "Catalyst Software Suite (64 bit) English Only". This contains both display drivers and opencl.
3) Multicore CPU
Requires "AMD Catalyst™ Accelerated Parallel Processing (APP) Technology Edition".
Option to use CPU encoding: --opencl-type cpu
Option to select opencl platform if you have both NVIDIA and AMD installed on single computer: --opencl-platform "ATI Stream"
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Qest on 2010-11-09 22:04:03
I see more benchmarks on the horizon.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: bb10 on 2010-11-09 22:44:55
I don't think it's possible. FLAC seems to be the only codec properly suitable for parallel encoding.

I thought it wouldn't harm to ask:
http://www.hydrogenaudio.org/forums/index....st&p=730471 (http://www.hydrogenaudio.org/forums/index.php?showtopic=84812&view=findpost&p=730471)
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2010-11-09 23:34:58
Thanks Gregory for your efforts!
I wanted to report my GTX260 does well with FLACCL 0.2 even if it is no Fermi card
Using the recent 260.99 driver it has similar speed as FlaCuda 0.91 here. The encoded files only differ slightly in size. The few files i threw in show the  FLACCL files are some kb bigger at -8 but that may be 0 when using a big enough test corpus.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Metroid on 2010-11-10 03:15:59
FLACCL 0.2:[attachment=6172:flaccl02.rar]


Hi Greg, thanks for all your efforts. Any chance of the next Cuetools release to include this feature?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Bad Monkey on 2010-11-10 04:18:26
Well I have my GTX 460 now, and am trying the new ver above, but still can't get it to run as quickly as others.

Encoding the 13 tracks from Pink Floyd's Final Cut, as before, from WAVS with the settings
Code: [Select]
-8 - -o %d

I get speeds of less than 160x

(That's with 4 threads, it is [much] slower if I set Foobar to just 1... what is the story there?)

This vs 122x with regular Flac -8 on my Q6600, which maxes out all four cores.

To try to minimize the HDD factor, I transcoded a single FLAC of Mike Oldfield's Amarok (60 mins long), but only got 86x... can the HDD be slowing it down this much? The Amarok FLAC is 330 MB... Windows will copy the file in mere seconds...
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2010-11-10 14:11:56
Well I have my GTX 460 now, and am trying the new ver above, but still can't get it to run as quickly as others.

Encoding the 13 tracks from Pink Floyd's Final Cut, as before, from WAVS with the settings
Code: [Select]
-8 - -o %d

I get speeds of less than 160x

(That's with 4 threads, it is [much] slower if I set Foobar to just 1... what is the story there?)

This vs 122x with regular Flac -8 on my Q6600, which maxes out all four cores.

To try to minimize the HDD factor, I transcoded a single FLAC of Mike Oldfield's Amarok (60 mins long), but only got 86x... can the HDD be slowing it down this much? The Amarok FLAC is 330 MB... Windows will copy the file in mere seconds...


try "--cpu-threads 2 -8 - -o %d" It isn´t wise to let 4 threads of these GPU encoders run. Just give one instance of Flaccl use 2 additional threads via  --cpu-threads. You may even try 3 threads.
On my HDD i also get more hiccups but encoding is above 200x all the time. My SSD is much faster even if i only have an old 965P, Q9550, GTX260.

Lets see if case finds some time, his graph is the only reference atm.

Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Bad Monkey on 2010-11-10 15:09:50
I hear you but 4 threads was the fastest result I could get. 1 thread, or 1 thread + CPU threads, give slower results. Go figure.

I don't buy the HDD bottleneck issue - the file sizes are tiny! as above, 330 MB file can be duplicated on the same HDD by Windows in mere seconds. And if it was the HDD, wouldn't all variations of settings hit the same capped speed factor?

Also, these results are faster than my old 8800 GT, and faster now than FLAC on the Q6600 CPU, again suggesting the slow results on both video cards are not being capped by some separate factor.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2010-11-10 15:53:12
Sorry, can´t help you with your PC then. Just tried with Amarok in one single file. On my SSD it comes out mostly between 350x-400x speed, encoded from HDD i get hiccups in encoding and end up mostly ~250x
This is done on the commandline, not in foobar. I think the speed result implementation from Gregory is right.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Case on 2010-11-10 17:53:55
Here's my benchmarks with Core i7 940 + GTX 285 for FlaCUDA and HD 5870 for FlacCL. I used --slow-gpu and --cpu-threads 2 parameters with CL compressor as that seemed to give the fastest speed.
[attachment=6177:flac_speed.png]
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Metroid on 2010-11-10 21:38:00
m:\flac>CUETools.FLACCL.cmd.exe --cpu-threads 2 -8 1.wav -o 1.flac
FLACCL#0.2, Copyright © 2010 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  : 1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:01:22.1470000
Results  : 496.35x; 377954376 bytes in 00:00:07.4184243 seconds;

C:\flac>CUETools.FLACCL.cmd.exe --cpu-threads 2 -8 1.wav -o 1.flac
FLACCL#0.2, Copyright © 2010 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  : 1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:01:22.1470000
Results  : 496.28x; 377954376 bytes in 00:00:07.4194243 seconds;

C: = System SSD
M: = Internal Storage HDD Samsung F3 1TB

No difference here. my 8800GT used to give me a maximum of 220. This thing is amazing. I look forward for the Cuetools version.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2010-11-10 21:48:52
No difference here. my 8800GT used to give me a maximum of 220. This thing is amazing. I look forward for the Cuetools version.


Interesting. Having that close numbers between SSD and HDD makes me wonder. Do you have Win7 and some kind of Readyboost kicking in?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Metroid on 2010-11-10 22:17:14
Interesting. Having that close numbers between SSD and HDD makes me wonder. Do you have Win7 and some kind of Readyboost kicking in?


I'm using the Windows 7 64 Professional but all HDD features are disabled, the IntelSSDToolbox did the trick and that is one way of disabling all, the other way is manual via registry but I bet you know all this. Well even the pagefile is disabled which makes me wonder if that was the case.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: SCOTU on 2010-11-11 17:04:32
377MB is easily within the realm of HDD speed for a 7 second time.  A good drive like an F3 should easily be able to get over 100MB/s  Obviously it's not limited by Hard Drive speed.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2010-11-11 17:45:13
Yes, most likely. At these speeds the whole i/o system has to do some work, so HD speed is only one factor. For example it reads and writes the file at once at the same HDD makes something completely different then just writing. Like mentioned earlier on my HDD, an older 500GB WD i get hiccups that worsen the whole encoding speed result.
Using compression -0 makes things much faster up to 800x, so my SSD isn´t limiting.

One other thing i noticed. Using Flaccl seems to stress my GPU more as FlaCuda. Evga Precission shows a GPU load of ~75% for Cuda and up to the 90% for Flaccl. Also it creates higher temperatures. Or is it that it doesn´t use 100% cause it already is faster as the data can be delivered?

Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2010-11-11 18:00:33
One of possible bottlenecks is the PCI express transfer speed.

For example, i've read many reports on AMD forums that AMD GPU drivers fail to provide decent DMA transfer speeds on certain (i.e. non-AMD) chipsets.

NVIDIA drivers usually don't have this problem, and recent motherboards with PCI express 2.0 X16 can do up to 6Gbit per second (which should be enough for up to ~1600x encoding speed), but older PCI Express 1.0 can be capped at ~800x encoding speed, and if you have some kind of Crossfire/SLI configuration, or some other adapter, like SATA 6Gbit/USB 3.0/SSD using a second PCI express slot, speeds can drop drastically.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: viktor on 2010-11-11 18:51:29
Interesting. Having that close numbers between SSD and HDD makes me wonder. Do you have Win7 and some kind of Readyboost kicking in?


I'm using the Windows 7 64 Professional but all HDD features are disabled, the IntelSSDToolbox did the trick and that is one way of disabling all, the other way is manual via registry but I bet you know all this. Well even the pagefile is disabled which makes me wonder if that was the case.


pagefile shouldn't be disabled on an ssd.

read:

http://blogs.msdn.com/b/e7/archive/2009/05...drives-and.aspx (http://blogs.msdn.com/b/e7/archive/2009/05/05/support-and-q-a-for-solid-state-drives-and.aspx)

(search for pagefile)
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Metroid on 2010-11-11 20:21:41
pagefile shouldn't be disabled on an ssd.

read:

http://blogs.msdn.com/b/e7/archive/2009/05...drives-and.aspx (http://blogs.msdn.com/b/e7/archive/2009/05/05/support-and-q-a-for-solid-state-drives-and.aspx)

(search for pagefile)


I read that year ago. It's dependent of how much ram you have anyway.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Kykc on 2010-11-12 12:10:15
FLACCL 0.2:[attachment=6172:flaccl02.rar]

Thanks! Works perfect on my gtx470. Any chance, that this encoder will support non 16bits per sample format?
Code: [Select]
Unhandled Exception: System.Exception: Bits per sample must be 16.
   at CUETools.Codecs.FLACCL.FLACCLWriter..ctor(String path, Stream IO, AudioPCM
Config pcm)
   at CUETools.FLACCL.cmd.Program.Main(String[] args)
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: alvaro84 on 2010-11-16 13:20:01
I'm back after replacing my vcard to a Radeon HD5670. I've tried your OpenCL encoder too, and... I can't tell you exact speeds (varies like crazy...), but it looks at least twice as fast as the stock CPU encoder on my Core 2 Duo (Conroe) at 3.1GHz and gets a bit smaller output.
At least it isn't worse than my 8600GT + CUDA encoder used to be. Which I unfortunately can't (don't want to do the hassle to) re-test
I'll do a search back in the topic as I haven't yet copied my last test results to my new drives yet (this is why it would have been better to store it on my pendrive as I do with many things).
Anyway, this time the result shouldn't be limited by I/O, it's been tested on my new SSD.

edit. it seems it's faster. Thank goodness, replacing an HDD to an SSD and a video card to a faster one actually led to some improvement  Back than I wrote it's faster than CPU encoding on 2 threads (and I mentioned speeds like ~70x at 3.33GHz). Now it's twice as fast.

Is this encoder compatible with an onboard HD3200, or it's something newer...?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Case on 2010-11-19 17:16:56
Just got GTX 580 and had to test encoding speeds. FlacCL 0.2 seems to lose to old GTX 285 with compression ratios >8 but wins with the others. Once again --cpu-threads 2 setting was fastest for me but this card got a bit slower with --slow-gpu setting.
[attachment=6202:flaccl.png]
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: viktor on 2010-11-19 17:26:22
reporting that i got further with the 10.11 driver, but still fails:

(http://img526.imageshack.us/img526/969/57335170.th.png) (http://img526.imageshack.us/img526/969/57335170.png)

maybe it'll get even further with 10.12...
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2010-11-19 18:10:59
Just got GTX 580 and had to test encoding speeds. FlacCL 0.2 seems to lose to old GTX 285 with compression ratios >8 but wins with the others. Once again --cpu-threads 2 setting was fastest for me but this card got a bit slower with --slow-gpu setting.
[attachment=6202:flaccl.png]


Funny to see 1400x speed, holy sh...

Btw. i found some files flaccl failes to encode, so if anyone else finds some, Gregory fixed it and will hopefully release another version soon.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2010-11-25 21:51:59
Thanks! Works perfect on my gtx470. Any chance, that this encoder will support non 16bits per sample format?

Maybe. If i figure out how to do 64-bit arithmetic effectively on GPU.

Is this encoder compatible with an onboard HD3200, or it's something newer...?

Unfortunately HD3xxx and HD4xxx do not seem to support OpenCL properly.

Just got GTX 580 and had to test encoding speeds.

Thanks a lot! Your graphs are very helpful as always.

reporting that i got further with the 10.11 driver, but still fails:

I'm afraid i give up on HD4XXX... It was bad enough it doesn't support atomics, but it doesn't seem to support barrier synchronization properly either, and i can't think of a way to do without them.

Funny to see 1400x speed, holy sh...

Let's hope it can do even better
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2010-11-25 22:01:35
[attachment=6219:flaccl03.rar]
Supported devices:

1) NVIDIA Geforce 4XX (Fermi) and older GF200 series GPUs
Requires fresh drivers (e.g. http://www.nvidia.com/object/win7-winvista...hql-driver.html (http://www.nvidia.com/object/win7-winvista-64bit-260.99-whql-driver.html))
2) ATI Radeon HD 5XXX
Requires fresh drivers (e.g. http://sites.amd.com/us/game/downloads/Pag...on_win7-64.aspx (http://sites.amd.com/us/game/downloads/Pages/radeon_win7-64.aspx))
Be sure to download "AMD Catalyst™ Accelerated Parallel Processing (APP) Technology Edition", not "Catalyst Software Suite (64 bit) English Only". This contains both display drivers and opencl.
Option to select opencl platform if you have both NVIDIA and AMD installed on single computer: --opencl-platform "ATI Stream"

3) Multicore CPU
Requires "AMD Catalyst™ Accelerated Parallel Processing (APP) Technology Edition" or "Intel OpenCL SDK" (alpha version, 32-bit systems only) http://software.intel.com/en-us/articles/intel-opencl-sdk/ (http://software.intel.com/en-us/articles/intel-opencl-sdk/)
Option to use CPU encoding: --opencl-type cpu --opencl-platform "Intel OpenCL" (or "ATI Stream")

New in this version: experimental option --fast-gpu forces encoder to do even more work on GPU, which can slow things up, but can be a bit faster if you are limited by PCIe transfer speeds in lower compression modes, or it can be effective if you don't want to give additional cpu threads to encoder with --cpu-threads, or if you use --verify. Which you should, if you use --fast-gpu, because it's experimental and it might corrupt your data.

This version processes 32 frames at a time (previous did 16), to better utilize high-end GPUs, but it can make slower GPU a bit unresponsive during encoding, in which case you can use option --task-size 16.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2010-11-26 00:37:23
I did encode a bunch of files. The ones that caused an error before encode without a problem now!

-8 with verify and 2 threads on 965P/GTX260/q9550 doesn´t run much faster with "--fast-gpu" enabled. Seems my GTX260 is more on the slow side meanwhile. Strangely this switch uses ~ the same amount of video memory as without. I expected a change here.

Thanks for the new version, good to know it works on Fermi now.

Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: viktor on 2010-11-26 07:32:08
i'll keep on testing this with each new catalyst release, maybe it's just a driver problem. or have you been told hd4xxx is unable to do this by hw?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2010-11-26 07:50:02
This version can work without atomics, which are not supported by hd4xxx hardware, and the rest of the problem might in theory be driver related, but i don't think AMD would fix it if it could. They are more interested in selling new cards then extending the life of old ones.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: viktor on 2010-11-26 09:51:53
This version can work without atomics, which are not supported by hd4xxx hardware, and the rest of the problem might in theory be driver related, but i don't think AMD would fix it if it could. They are more interested in selling new cards then extending the life of old ones.


ah, i see the point there
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Case on 2010-11-26 17:17:04
Seems to be somewhat faster than the previous version. On my system '--fast-gpu' switch is faster up to compression mode -7, -8 and higher are faster without it. Option '--fast-gpu' combined with any '--cpu-threads' setting slows things down regardless of compression mode. This time '--cpu-threads 4' was faster than the usual '--cpu-threads 2'. Also for some reason compression speed results varied from run to run a bit more than normally so I ran each test 3-6 times and picked the fastest results for the stats.
Highest compression modes start to be so close to each other in performance that the graph gets unclear there. CL finally beats old CUDA results in speed for me but filesize is a bit larger.
[attachment=6220:flaccl.png] [attachment=6224:flaccl2.png]

Edit: added benchmark results for Radeon HD 5870 with the new FLACCL v0.3 encoder.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2010-11-26 18:06:24
CL finally beats old CUDA results in speed for me but filesize is a bit larger.


I wonder if it is possible to squeeze out some more kbs, or at least the same compression as FlaCuda? At these speeds i´d trade some better compression for speed.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: alvaro84 on 2010-11-29 16:40:09
Ugh... it's almost scary. I've seen speeds above 200x during conversion when it was mid-files... decoding them from TAK itself wasn't much faster than 400x, it became a bottleneck when encoding FLAC

And it's a stock clocked radeon 5670 with passive cooling...
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Nowings69 on 2011-01-29 12:33:20
There is not an official logo yet(I dont have Fermi series GPU too)
so this is simple
FLACCL
  (http://img229.imagevenue.com/loc481/th_03934_d_122_481lo.jpg) (http://img229.imagevenue.com/img.php?image=th_03934_d_122_481lo.jpg)
FlaCuda
(http://img231.imagevenue.com/loc562/th_04250_01_122_562lo.jpg) (http://img231.imagevenue.com/img.php?image=th_04250_01_122_562lo.jpg)
   
   
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2011-02-23 00:39:21
Just curious. Did anyone get the Cuda version somehow running on a Fermi GPU?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2011-03-07 15:20:40
Just a tiny quirk for FLACCL#0.4 that came with CueTools 2.11. When using it with a groupsize fo 256 i get "Error: size reported incorrectly" and it crashes.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: motion_blur on 2011-03-08 22:18:30
It is not getting better with the bitrates.
My test sample: Opeth - For Absent Friends. The sample is very "basic", just two guitars.

FLAC 1.2.1 -8    472 kbps
libFlake#0.1 -11    457 kbps
FlaCuda#.91 -11    460 kbps
FLACCL#0.3 -11    461 kbps
FLACCL#0.4 -11    462 kbps
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2011-03-08 22:32:40
It is not getting better with the bitrates.
My test sample: Opeth - For Absent Friends. The sample is very "basic", just two guitars.

FLAC 1.2.1 -8    472 kbps
libFlake#0.1 -11    457 kbps
FlaCuda#.91 -11    460 kbps
FLACCL#0.3 -11    461 kbps
FLACCL#0.4 -11    462 kbps


What you want with that? Do encode some hundred files and report again.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2011-03-09 00:16:25
Here i did a quick and dirty comparison, 414 files of mixed music, -8

FlaCuda#0.91
9.25GB (9 934 589 919 bytes), 739kbps
FlacCL#0.3 Groupsize 256
9.25GB (9 936 741 894 bytes), 739kbps
FlacCL#0.4
9.25GB (9 936 310 351 bytes), 739kbps
Flake#0.1
9.25GB (9 941 925 617 bytes), 739kbps

So ~2MB difference with 9GB of music is not really a degeneration for the OpenCL port.
Seing the GPU encoder speeds against Flake#0.1 for encoding is a funny eye opener still

Edit: i never liked the idea flake and alike encoders can encode non-standard files, so -11 is a setting i´ll never touch. Better use a different codec then.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: _m²_ on 2011-03-09 13:14:08
Here i did a quick and dirty comparison, 414 files of mixed music, -8

FlaCuda#0.91
9.25GB (9 934 589 919 bytes), 739kbps
FlacCL#0.3 Groupsize 256
9.25GB (9 936 741 894 bytes), 739kbps
FlacCL#0.4
9.25GB (9 936 310 351 bytes), 739kbps
Flake#0.1
9.25GB (9 941 925 617 bytes), 739kbps

So ~2MB difference with 9GB of music is not really a degeneration for the OpenCL port.
Seing the GPU encoder speeds against Flake#0.1 for encoding is a funny eye opener still 

Edit: i never liked the idea flake and alike encoders can encode non-standard files, so -11 is a setting i´ll never touch. Better use a different codec then.


No, they generate files perfectly compliant with the FLAC standard. Just not with it's subset that was created for a very limited purpose.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: motion_blur on 2011-03-09 19:50:07
Here i did a quick and dirty comparison, 414 files of mixed music, -8

FlaCuda#0.91
9.25GB (9 934 589 919 bytes), 739kbps
FlacCL#0.3 Groupsize 256
9.25GB (9 936 741 894 bytes), 739kbps
FlacCL#0.4
9.25GB (9 936 310 351 bytes), 739kbps
Flake#0.1
9.25GB (9 941 925 617 bytes), 739kbps

So ~2MB difference with 9GB of music is not really a degeneration for the OpenCL port.
Seing the GPU encoder speeds against Flake#0.1 for encoding is a funny eye opener still

Edit: i never liked the idea flake and alike encoders can encode non-standard files, so -11 is a setting i´ll never touch. Better use a different codec then.


Wow, that are a lot of files 
OK, your test is without a doubt more consistent.
Did you do your test with Flake or libFlake? (both available in CUETools). I always got the lowest bitrates with LibFlake... but it always took a lot of encoding time. But files are usually only encoded once, but decoded a lot of times.

I am using FLAC -11 because I want good compression and love the features of the FLAC file format (e. g. error consistence) and the compatibility (e. g. oggdropxpd or lamedrop), in addition great decoding time (for fast replay gain processing).
I was experimenting with other formats, APE and TAK, but went back to FLAC because of better decoding speed and compatibility.
The non-standard FLAC files are no problem for me. I do not have a portable player and foobar works very good with non-std FLAC files, also do the different tagging-tools.

But I can understand your concerns because of the non-standard files. I hope you understand why it is not so relevant for me, if the files do not follow 100% the reference.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2011-03-09 20:04:12
Wow, that are a lot of files 
OK, your test is without a doubt more consistent.
Did you do your test with Flake or libFlake? (both available in CUETools). I always got the lowest bitrates with LibFlake... but it always took a lot of encoding time. But files are usually only encoded once, but decoded a lot of times.

I am using FLAC -11 because I want good compression and love the features of the FLAC file format (e. g. error consistence) and the compatibility (e. g. oggdropxpd or lamedrop), in addition great decoding time (for fast replay gain processing).
I was experimenting with other formats, APE and TAK, but went back to FLAC because of better decoding speed and compatibility.
The non-standard FLAC files are no problem for me. I do not have a portable player and foobar works very good with non-std FLAC files, also do the different tagging-tools.

But I can understand your concerns because of the non-standard files. I hope you understand why it is not so relevant for me, if the files do not follow 100% the reference.


I used libflake#0.1 from cuetools, there is no flake#0.1 version afaik. I tested it back a while already against the CL version. The GPU encoders always compressed better at -8 on average. You may do your own tests with -11
For better decoding speed i think even wavpack can compete with flake -11, i used wavpack before i switched to flac cause of my hardware-player a while back.

I dropped flac 1.21 in yesterday if anyone wants to know...
Flac 1.21 -8
9.27GB (9 955 977 141 bytes), 740kbps

Not much bigger you see but much to slow if you got used to handle your files with the GPU encoders.

Edit: You may want to check if the current GPU encoder uses variable blocksize at all. Afaik libflake does and since this kicks in at compression -9 and higher this may be the resaon for the size increase.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Maurits on 2011-03-09 21:40:13
Just curious. Did anyone get the Cuda version somehow running on a Fermi GPU?

Can't you just use the OpenCL version on a Fermi GPU?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: motion_blur on 2011-03-09 21:43:48
I used libflake#0.1 from cuetools, there is no flake#0.1 version afaik. I tested it back a while already against the CL version. The GPU encoders always compressed better at -8 on average. You may do your own tests with -11
For better decoding speed i think even wavpack can compete with flake -11, i used wavpack before i switched to flac cause of my hardware-player a while back.

I dropped flac 1.21 in yesterday if anyone wants to know...
Flac 1.21 -8
9.27GB (9 955 977 141 bytes), 740kbps

Not much bigger you see but much to slow if you got used to handle your files with the GPU encoders.

Edit: You may want to check if the current GPU encoder uses variable blocksize at all. Afaik libflake does and since this kicks in at compression -9 and higher this may be the resaon for the size increase.


I did not know that. Yes you are right.

FLAC Headers say:
FLACCL#0.3 -11 MinBlocksize 4096, MaxBlocksize 4096
FLACCL#0.4 -11 MinBlocksize 4096, MaxBlocksize 4096
libFlake#0.1 -11 MinBlocksize 0, MaxBlocksize 4096
libFlake#0.1 - 8  MinBlocksize 4608, MaxBlocksize 4608

I hope variable blocksize will be implemented in FLACCL somewhere in the future, would be great
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Maggi on 2011-04-06 13:03:28
Just curious. Did anyone get the Cuda version somehow running on a Fermi GPU?

Can't you just use the OpenCL version on a Fermi GPU?


yep, that works with my GTX460 (GF104) even on WinXP, but I also would like to be able to compare the CUDA version to the OpenCL version in terms of compression and speed
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: schauw on 2011-04-24 11:49:36
I'll try to find a HD4xxx GPU to test it on...


I have an 4850, if you want a benchmark done i'm willing to help
But i'm not sure how to do is, so if someone could point me to somewhere where this is explained..


CUETools.FLACCL.cmd.exe --group-size 64 --cpu-threads 3 -8 1.wav -o 1.flac

FLACCL#0.3, Copyright © 2010 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  : 1.wav
File Info : 44100kHz; 2 channel; 16 bit; 00:05:29.9730000
Results  : 27.88x; 32571641 bytes in 00:00:11.8366770 seconds;


CPU = Amd Phenom II X3 720
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: s_PLASH on 2011-06-25 16:33:16
win7 x64
Gigabyte 470 gtx + Gigybyte OC GURU
i7 920
6 GB RAM
-------------------

i get damaged FLAC files with CUETools/FLACCL converting from image-files to FLAC tracks,
wich does not happen with all other codecs (libFLAC, libFlake, flake) included in CUETools

the demaged music files are playable and i didn't notice anything wrong untill i listened to them..
there are "gaps" wich appear randomly and sound as if someone lower loudness to mute and turn up again immediately. i wished i could show you what "gaps" i mean. does anyone of you folks has an idea why CUETools/FLACCL does that unlike other with codecs? maybe you have the same problem or at least you wont use FLACCL till its fixed..


EDIT: gaps appear randomly
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2011-06-25 16:50:36
What player do you use? Some players do not support non-subset flac (compression levels 9-11).
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: s_PLASH on 2011-06-25 16:58:53
What player do you use? Some players do not support non-subset flac (compression levels 9-11).

foobar2000 and compression level for CUETools/FLACCL was 8

EDIT: with softwareupdates (CUETools_2.1.2a, foobar2000 v1.1.7) - same problem.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2011-06-25 17:04:26
Strange, this never happened before.
Please upload sample files (if possible, both source and converted) to the ftp server i mentioned in PM.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2011-06-25 17:07:31
I encode with FlacCL from day one and never had one single corrupt file. You may want to enable "-verify" under FlacCL options and try to split the files that don´t work atm, also let create logs if the files are accurately ripped. When there is any error we should be able to spot it that way. Did you overclock anything in your system, if so disable all overclocking for testing.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: s_PLASH on 2011-06-26 10:03:13
I encode with FlacCL from day one and never had one single corrupt file. You may want to enable "-verify" under FlacCL options and try to split the files that don´t work atm, also let create logs if the files are accurately ripped. When there is any error we should be able to spot it that way. Did you overclock anything in your system, if so disable all overclocking for testing.

i'll convert some albums without oc, verify enabled, listen them (i'll need two or three days for it..) and post here again
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Akdor 1154 on 2011-06-27 04:03:20
This speed is almost scary, instant reaction was "HAX!!1"

Crash on decoding a 24b/96KHz input from Foobar though

EDIT: Was using 0.3 from the wiki. Pulled 0.4 from cuetools and it works fine.

Jolly good sir, I salute you!

EDIT 2: I can't make my joy clear enough. It is a happy happy day when the 100mbps router between me and my NAS serves as more of a bottleneck than the flac encoder on max quality.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: s_PLASH on 2011-07-05 17:31:11
i tried to encode again and again without OC but it seems to be impossible to get good tracks on my system. worst case -all tracks  very demaged. when i enable "verify" in encoder settings, it sometimes doesn't work at all (see error picture). if it does, damaged tracks are produced also. with verified libFLAC, libFlake and flake -no errors, no damaged tracks.
http://imageshack.us/photo/my-images/687/capturegzh.jpg/ (http://imageshack.us/photo/my-images/687/capturegzh.jpg/)

@ Gregory S. Chudov
i'm sending the original wavpack audio + .cue + .log-files to you. hope it helps somehow.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2011-07-05 18:13:34
very weird, there must be a problem with your system. Does your system stand different stresstests? Is your nvidia GTX Gigabyte a "pre- overclocked" model? Since i read about different pre-overclocked cards fail in games you may try to underclock it for testing.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: eleria on 2011-07-12 10:11:46
Hello, I'm using currently the latest version of Flaccl and I'm having problems encoding a wave file :

When using the command-line encoder only :
Code: [Select]
Unhandled Exception: System.Exception: ChannelCount must be 2.
   at CUETools.Codecs.FLACCL.FLACCLWriter..ctor(String path, Stream IO, AudioPCM
Config pcm)
   at CUETools.FLACCL.cmd.Program.Main(String[] args)


Can't FLACCL process mono files ?

In hope of having a bug-free GPU FLAC encoder, here is the specific track.
http://bit.ly/qJOozq (http://bit.ly/qJOozq)
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: JuanPabloCuervo on 2011-07-13 23:56:22
flaccl does not work with 24-Bit files
but flac 1.2.1 does

anyway... here are my results-
W7 x64

my HD6950 its 236.41x faster than my i7 920 slbej @ 2.8ghz.
cd.wav 658MB
cd.rar 506MB (Best setting, similar speed as Flac1.2.1 cpu version)
cd.flac 433MB -8 (similar speed as WinRar cpu version)
cd.flac 413MB -11 (OpenCL version) default is -7
cd.ape 396MB insane 260seconds or 4.3minutes,
cd.wv 425MB -h -x 48seconds.
cd.wv 429MB -h 28sec.
cd.wv 435MB -x 35sec.

http://www.cuetools.net/wiki/FLACCL (http://www.cuetools.net/wiki/FLACCL)
http://www.wavpack.com/ (http://www.wavpack.com/)
http://www.monkeysaudio.com/ (http://www.monkeysaudio.com/)

c:\FLAC\flaccl03>flaccl -11 cd1.wav
FLACCL#0.3, Copyright © 2010 Gregory S. Chudov.
This is free software under the GNU GPLv3+ license; There is NO WARRANTY, to
the extent permitted by law. <Licenses - GNU Project - Free Software Foundation> for details.
Filename : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results : 236.41x; 433786700 bytes in 00:00:16.5565043 seconds;
------------------------------------------------------
c:\FLAC>flac -8 cd1.wav
flac 1.2.1, Copyright © 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.
cd1.wav: WARNING: skipping unknown sub-chunk 'fact' (use --keep-foreign-metadata
to keep)
cd1.wav: wrote 454187072 bytes, ratio=0.658
------------------------------------------------------
Gateway P-7811FX
Intel P8400 @ 2.26GHZ
4GB RAM
Nvidia 9800M GTS (G94M)

d:\FLAC\flaccl03>flaccl -11 cd1.wav
FLACCL#0.3, Copyright © 2010 Gregory S. Chudov.
This is free software under the GNU GPLv3+ license; There is NO WARRANTY, to
the extent permitted by law. <Licenses - GNU Project - Free Software Foundation> for details.
Filename : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results : 93.67x; 433869020 bytes in 00:00:41.7887280 seconds;

Result: 413MB.
********************************************

d:\FLAC\FlaCuda091>flacuda -11 cd1.wav
FlaCuda#.91, Copyright © 2009 Gregory S. Chudov.
This is free software under the GNU GPLv3+ license; There is NO WARRANTY, to
the extent permitted by law. <Licenses - GNU Project - Free Software Foundation> for details.
Filename : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results : 70.25x; 433236904 bytes in 00:00:55.7181090 seconds;
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: JuanPabloCuervo on 2011-07-14 16:53:40
[quote author=David Bryant link=msg=0 date=]Hello!

Thanks for the info...I did not realize that the OpenCL version of FLAC actually compressed that much better than FLAC itself, that's interesting! (I knew it was faster, obviously).

I would love to have time to try to get WavPack working on OpenCL, but I have too many other projects.
It would be great if someone else had a go at it (I would be happy to help).

Cheers!
David Bryant
<david @ wavpack.com>[/quote]
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: JuanPabloCuervo on 2011-07-15 19:11:34
with Ramdrive & gpu overclocking...

r:\flaccl03>flaccl -11 cd1.wav
FLACCL#0.3, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 250.91x; 433786700 bytes in 00:00:15.6000274 seconds
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2011-07-15 19:58:48
flaccl does not work with 24-Bit files

flaccl 0.4 (from CUETools 2.1.2) does. But it's a bit experimental, and there's at least one known (if rare) bug in it, so i would wait for the next release.

Results  : 250.91x; 433786700 bytes in 00:00:15.6000274 seconds

Thanks for the stats, i only have NVIDIA cards myself, so it was really useful.

[quote author=David Bryant link=msg=0 date=]I would love to have time to try to get WavPack working on OpenCL, but I have too many other projects.[/quote]
Unfortunately me too at the moment.
Also i doubt that WavPack can really benefit from GPU acceleration.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2011-07-15 20:21:50
flaccl does not work with 24-Bit files

flaccl 0.4 (from CUETools 2.1.2) does. But it's a bit experimental, and there's at least one known (if rare) bug in it, so i would wait for the next release.


I pretty much think Juan talks about 24bit files with higher sampling frequency like 96kHz. Afaik FlacCL can only do 44.1kHz like with deoded HDCD files.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: JuanPabloCuervo on 2011-07-31 02:05:32
switched to Linux!
installed Ubuntu x64... 

have downloaded the tar ball, cuetoolsnet-CUETools.Codecs.FLACCL.tar.gz
what to do next?

no .sh, .bin or .py

thanks.

P.S. Yes, i mean 192khz 24-Bit or 32-bit files.

Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: lvqcl on 2011-07-31 08:46:33
have downloaded the tar ball, cuetoolsnet-CUETools.Codecs.FLACCL.tar.gz
what to do next?


AFAIK: download the whole package, learn C#, learn OpenCL, port it to Linux, compile, use.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: JuanPabloCuervo on 2011-07-31 19:39:10
have downloaded the tar ball, cuetoolsnet-CUETools.Codecs.FLACCL.tar.gz
what to do next?


AFAIK: download the whole package, learn C#, learn OpenCL, port it to Linux, compile, use.


install fglrx
install sdk
$sudo tar xvfz amd-app-sdk-v2.4-lnx64.tgz -C /opt
$sudo tar xvfz icd-registration.tgz -C /
$sudo apt-get install <necessary software>
$sudo make all
$sudo make install

isn't enough?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2011-07-31 19:57:21
I never even tried to compile this on Linux. You might be compile it using Mono, but that will be quite difficult.
You don't need any opencl SDK to compile it. You will only need drivers installed to run it.
I suggest you try downloading binary version (same as for Windows) instead, and try to run it with Mono.
This worked for FlaCuda (only had to replace cuda.net.dll with mono version), it might work for FLACCL, but no guarantees...
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: JuanPabloCuervo on 2011-08-03 06:44:30
Results  : 250.91x; 433786700 bytes in 00:00:15.6000274 seconds

Thanks for the stats, i only have NVIDIA cards myself, so it was really useful.


HD6970 OC
R:\flaccl03>flaccl -11 cd1.wav
FLACCL#0.3, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 295.49x; 433786700 bytes in 00:00:13.2464534 seconds
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Steve Forte Rio on 2011-08-03 20:03:18
Hopefully this information will be helpful:


Code: [Select]
H:\>CUETools.FLACCL.cmd.exe [b]-11[/b] "Image.wav" -o "Image.flac"
FLACCL#0.4, Copyright © 2010 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  : Image.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:19:42.8930000
Results  : [b]215,59x[/b]; 586407769 bytes in 00:00:22.1852689 seconds;
Compression: [b]69.504%[/b]


H:\>CUETools.FLACCL.cmd.exe [b]-11 --fast-gpu[/b] "Image.wav" -o "Image.flac"
FLACCL#0.4, Copyright © 2010 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  : Image.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:19:42.8930000
Results  : [b]231,30x[/b]; 586407769 bytes in 00:00:20.6781828 seconds;
Compression: [b]69.504%[/b]


H:\>CUETools.FLACCL.cmd.exe [b]-11 --slow-gpu[/b] "Image.wav" -o "Image.flac"
FLACCL#0.4, Copyright © 2010 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  : Image.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:19:42.8930000
Results  : [b]201,58x[/b]; 586455206 bytes in 00:00:23.7273571 seconds;
Compression: [b]69.509%[/b]


H:\>CUETools.FLACCL.cmd.exe [b]-11 --slow-gpu --cpu-threads 4[/b] "Image.wav" -o "Image
.flac"
FLACCL#0.4, Copyright © 2010 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  : Image.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:19:42.8930000
Results  : [b]327,24x[/b]; 586455206 bytes in 00:00:14.6158360 seconds;
Compression: [b]69.509%[/b]

H:\>CUETools.FLACCL.cmd.exe [b]-11 --opencl-type cpu --opencl-platform "Intel® Op
enCL" --cpu-threads 4[/b] "Image.wav" -o "Image.flac"
FLACCL#0.4, Copyright © 2010 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  : Image.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:19:42.8930000
Results  : [b]48,18x[/b]; 586403416 bytes in 00:01:39.2666778 seconds;
Compression: [b]69.504%[/b]

Windows 7 x64 SP1, Intel Core i3 530 2.93GHz (2 Cores/4 Threads), Intel OCL SDK 1.1 x64, nVidia GTX460 1Gb MSI HAWK (780/1800 MHz), ForceWare 280.19 beta (OpenCL 1.1).
H:/ is a virtual HD in RAM.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: JuanPabloCuervo on 2011-08-04 01:20:08
I never even tried to compile this on Linux. You might be compile it using Mono, but that will be quite difficult.
You don't need any opencl SDK to compile it. You will only need drivers installed to run it.
I suggest you try downloading binary version (same as for Windows) instead, and try to run it with Mono.
This worked for FlaCuda (only had to replace cuda.net.dll with mono version), it might work for FLACCL, but no guarantees...

Run Twice...

Code: [Select]
R:\CUETools>cuetools.flaccl.cmd.exe -11 cd1.wav
[b]FLACCL#0.4[/b], Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : [b]242.19x[/b]; [!--sizeo:2--][span style=\"font-size:10pt;line-height:100%\"][!--/sizeo--]43[b]6[/b][/size]053979 bytes in 00:00:[b]16.1616284 seconds[/b];

R:\flaccl03>flaccl -11 cd1.wav
[b]FLACCL#0.3[/b], Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : [b]298.35x[/b]; [!--sizeo:2--][span style=\"font-size:10pt;line-height:100%\"][!--/sizeo--]43[b]3[/b][/size]786700 bytes in 00:00:[b]13.1196231 seconds[/b];

R:\CUETools>cuetools.flaccl.cmd.exe -11 [b]--fast-gpu [/b]cd1.wav
[b]FLACCL#0.4[/b], Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : [b]288.40x[/b]; 436053979 bytes in 00:00:[b]13.5720238 seconds[/b];

R:\CUETools>cuetools.flaccl.cmd.exe -11 [b]--slow-gpu[/b] cd1.wav
[b]FLACCL#0.4[/b], Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : [b]143.62x[/b]; 436095804 bytes in 00:00:[b]27.2532479 seconds[/b];

R:\CUETools>cuetools.flaccl.cmd.exe -11 [b]--slow-gpu --cpu-threads 4 [/b]cd1.wav
[b]FLACCL#0.4[/b], Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : [b]355.90x[/b]; 436095804 bytes in 00:00:[b]10.9980193 seconds[/b];

R:\CUETools>cuetools.flaccl.cmd.exe -11 [b]--slow-gpu --cpu-threads 5[/b] cd1.wav
[b]FLACCL#0.4[/b], Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : [b]358.95x[/b]; 436095804 bytes in 00:00:[b]10.9044192 seconds[/b];

R:\CUETools>cuetools.flaccl.cmd.exe -11[b] --slow-gpu --cpu-threads 6[/b] cd1.wav
[b]FLACCL#0.4[/b], Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : [b]359.47x[/b]; 436095804 bytes in 00:00:[b]10.8888191 seconds[/b];
--slow-gpu --cpu-theads 7 kills the PC.
--fast-gpu & --cpu-threads 4 kills the PC on Flaccl04.

Code: [Select]
R:\flaccl03>flaccl -11 [b]--fast-gpu [/b]cd1.wav
[b]FLACCL#0.3[/b], Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : [b]286.75x[/b]; 433779996 bytes in 00:00:[b]13.6500240 seconds[/b];

R:\flaccl03>flaccl -11 [b]--slow-gpu [/b]cd1.wav
[b]FLACCL#0.3[/b], Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : [b]217.05x[/b]; 433821294 bytes in 00:00:18.0336317 seconds;

R:\flaccl03>flaccl -11 [b]--slow-gpu --cpu-threads 4[/b] cd1.wav
[b]FLACCL#0.3[/b], Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : [b]318.01x[/b]; 433821294 bytes in 00:00:[b]12.3084216 seconds[/b];

R:\flaccl03>flaccl -11 [b]--fast-gpu --cpu-threads 4[/b] cd1.wav
FLACCL#0.3, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : [b]286.75x[/b]; 433779996 bytes in 00:00:[b]13.6500240 seconds[/b];

R:\flaccl03>flaccl -11 [b]--cpu-threads 4[/b] cd1.wav
[b]FLACCL#0.3[/b], Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : [b]293.80x[/b]; 433786700 bytes in 00:00:[b]13.3224234 seconds[/b];

R:\flaccl03>flaccl -11 [b]--cpu-threads 8[/b] cd1.wav
[b]FLACCL#0.3[/b], Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : [b]291.42x[/b]; 433786700 bytes in 00:00:[b]13.4316236 seconds[/b];

R:\CUETools>cuetools.flaccl.cmd.exe -11 [b]--cpu-threads 4[/b] cd1.wav
[b]FLACCL#0.4[/b], Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : [b]328.85x[/b]; 436053979 bytes in 00:00:[b]11.9028209 seconds[/b];

R:\CUETools>cuetools.flaccl.cmd.exe -11 [b]--cpu-threads 8[/b] cd1.wav
[b]FLACCL#0.4[/b], Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : [b]327.56x[/b]; 436053979 bytes in 00:00:[b]11.9496210 seconds[/b];

R:\CUETools>cuetools.flaccl.cmd.exe -11 [b]--cpu-threads 16[/b] cd1.wav
[b]FLACCL#0.4[/b], Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : [b]320.86x[/b]; 436053979 bytes in 00:00:[b]12.1992214 seconds[/b];
--slow-gpu --cpu-theads 16  kills the PC.

Code: [Select]
R:\flaccl03>flaccl.exe -11 --slow-gpu --cpu-threads 4 cd1.wav
FLACCL#0.3, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 312.46x; 433821294 bytes in 00:00:12.5268221 seconds;

R:\flaccl03>flaccl.exe -11 --slow-gpu --cpu-threads 8 cd1.wav
FLACCL#0.3, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 311.30x; 433821294 bytes in 00:00:12.5736221 seconds;

R:\flaccl03>flaccl.exe -11 --slow-gpu --cpu-threads 16 cd1.wav
FLACCL#0.3, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 305.99x; 433821294 bytes in 00:00:12.7920225 seconds;

R:\flaccl03>flaccl.exe -11 --fast-gpu --cpu-threads 1 cd1.wav
FLACCL#0.3, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 289.07x; 433779996 bytes in 00:00:13.5408237 seconds;

R:\flaccl03>flaccl.exe -11 --fast-gpu --cpu-threads 2 cd1.wav
FLACCL#0.3, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 288.73x; 433779996 bytes in 00:00:13.5564238 seconds;

R:\flaccl03>flaccl.exe -11 --fast-gpu --cpu-threads 3 cd1.wav
FLACCL#0.3, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 286.10x; 433779996 bytes in 00:00:13.6812240 seconds;

R:\flaccl03>flaccl.exe -11 --fast-gpu --cpu-threads 4 cd1.wav
FLACCL#0.3, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 286.10x; 433779996 bytes in 00:00:13.6812240 seconds;
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: JuanPabloCuervo on 2011-08-04 02:27:47
Code: [Select]
R:\CUETools>cuetools.flaccl.cmd.exe -11 --slow-gpu --cpu-threads 5 cd1.wav
FLACCL#0.4, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 142.72x; 436095804 bytes in 00:00:27.4248482 seconds;

R:\CUETools>cuetools.flaccl.cmd.exe -11 --slow-gpu --cpu-threads 5 cd1.wav
FLACCL#0.4, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 354.39x; 436095804 bytes in 00:00:11.0448194 seconds;

R:\CUETools>cuetools.flaccl.cmd.exe -11 --slow-gpu --cpu-threads 5 cd1.wav
FLACCL#0.4, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 358.95x; 436095804 bytes in 00:00:10.9044192 seconds;

R:\CUETools>cuetools.flaccl.cmd.exe -11 --slow-gpu --cpu-threads 6 cd1.wav
FLACCL#0.4, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 358.44x; 436095804 bytes in 00:00:10.9200192 seconds;

R:\CUETools>cuetools.flaccl.cmd.exe -11 --slow-gpu --cpu-threads 6 cd1.wav
FLACCL#0.4, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 359.47x; 436095804 bytes in 00:00:10.8888191 seconds;

R:\CUETools>cuetools.flaccl.cmd.exe -11 --slow-gpu --cpu-threads 7 cd1.wav
FLACCL#0.4, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 150.16x; 436095804 bytes in 00:00:26.0676458 seconds;

R:\CUETools>cuetools.flaccl.cmd.exe -11 --fast-gpu --cpu-threads 1 cd1.wav
FLACCL#0.4, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 331.45x; 436053979 bytes in 00:00:11.8092208 seconds;

R:\CUETools>cuetools.flaccl.cmd.exe -11 --fast-gpu --cpu-threads 1 cd1.wav
FLACCL#0.4, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 331.89x; 436053979 bytes in 00:00:11.7936207 seconds;

R:\CUETools>cuetools.flaccl.cmd.exe -11 --fast-gpu --cpu-threads 2 cd1.wav
FLACCL#0.4, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 329.71x; 436053979 bytes in 00:00:11.8716209 seconds;

R:\CUETools>cuetools.flaccl.cmd.exe -11 --fast-gpu --cpu-threads 3 cd1.wav
FLACCL#0.4, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 330.14x; 436053979 bytes in 00:00:11.8560208 seconds;

R:\CUETools>cuetools.flaccl.cmd.exe -11 --fast-gpu --cpu-threads 4 cd1.wav
FLACCL#0.4, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 328.85x; 436053979 bytes in 00:00:11.9028209 seconds;

R:\CUETools>cuetools.flaccl.cmd.exe -11 --fast-gpu --cpu-threads 5 cd1.wav
FLACCL#0.4, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 327.13x; 436053979 bytes in 00:00:11.9652210 seconds;

R:\CUETools>cuetools.flaccl.cmd.exe -11 --fast-gpu --cpu-threads 6 cd1.wav
FLACCL#0.4, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 326.70x; 436053979 bytes in 00:00:11.9808210 seconds;

R:\CUETools>cuetools.flaccl.cmd.exe -11 --fast-gpu --cpu-threads 7 cd1.wav
FLACCL#0.4, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 325.86x; 436053979 bytes in 00:00:12.0120211 seconds;

R:\CUETools>cuetools.flaccl.cmd.exe -11 --fast-gpu --cpu-threads 8 cd1.wav
FLACCL#0.4, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 323.34x; 436053979 bytes in 00:00:12.1056213 seconds;

R:\CUETools>cuetools.flaccl.cmd.exe -11 --fast-gpu --cpu-threads 9 cd1.wav
FLACCL#0.4, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 322.92x; 436053979 bytes in 00:00:12.1212213 seconds;

R:\CUETools>cuetools.flaccl.cmd.exe -11 --fast-gpu --cpu-threads 10 cd1.wav
FLACCL#0.4, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 322.51x; 436053979 bytes in 00:00:12.1368213 seconds;

R:\CUETools>cuetools.flaccl.cmd.exe -11 --fast-gpu --cpu-threads 11 cd1.wav
FLACCL#0.4, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 320.86x; 436053979 bytes in 00:00:12.1992215 seconds;

R:\CUETools>cuetools.flaccl.cmd.exe -11 --fast-gpu --cpu-threads 12 cd1.wav
FLACCL#0.4, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 317.20x; 436053979 bytes in 00:00:12.3396217 seconds;

R:\CUETools>cuetools.flaccl.cmd.exe -11 --fast-gpu --cpu-threads 13 cd1.wav
FLACCL#0.4, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 315.21x; 436053979 bytes in 00:00:12.4176218 seconds;

R:\CUETools>cuetools.flaccl.cmd.exe -11 --fast-gpu --cpu-threads 14 cd1.wav
FLACCL#0.4, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 314.42x; 436053979 bytes in 00:00:12.4488219 seconds;

R:\CUETools>cuetools.flaccl.cmd.exe -11 --fast-gpu --cpu-threads 15 cd1.wav
FLACCL#0.4, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 314.03x; 436053979 bytes in 00:00:12.4644219 seconds;

R:\CUETools>cuetools.flaccl.cmd.exe -11 --fast-gpu --cpu-threads 16 cd1.wav
FLACCL#0.4, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 312.85x; 436053979 bytes in 00:00:12.5112220 seconds;
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: no404error on 2011-08-04 23:34:52
AMD Athlon II X4 630 (C'n'Q OFF) OpenCL 1.1 AMD-APP-SDK-v2.5 (684.213) / GF GT240 512Mb GDDR5 (550/1340/1700) 275.33 / W7HB x64 / RAMDrive DDRII-800

CUETools.FLACCL.cmd.exe -11 -p 0 --opencl-type CPU --opencl-platform "AMD Accelerated Parallel Processing" --cpu-threads 4 --group-size 1024 -o nul test.wav

60,24x / 71.370%

CUETools.FLACCL.cmd.exe -11 -p 0 --opencl-type GPU --opencl-platform "NVIDIA CUDA" --cpu-threads 4 --group-size 512 --slow-gpu -o nul test.wav

130.51x / 71.376%
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Steve Forte Rio on 2011-08-05 07:34:53
Could someone check are the AMD HD4850/4870 supported? AMD says that this GPU's have OpenCL 1.0 support, but is the 1.1 support required for FLACCL?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2011-08-06 14:42:00
Could someone check are the AMD HD4850/4870 supported? AMD says that this GPU's have OpenCL 1.0 support, but is the 1.1 support required for FLACCL?

AMD HD4xxx series is not supported. There are some essential features missing, such as atomic instructions. I tried to make it work without them, but it proved to be too difficult.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Sandrine on 2011-08-13 18:16:39
Is there a chance that FlacCL might support hi-def/mc sources in the future? I've tried using 24bit/96khz FLAC sources but I just get "Error: Invalid Flac file". My goal is to use this in foobar2000 to encode from DSD to FLAC at some point (which right now is horribly slow).
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: no404error on 2011-08-13 19:48:54
AMD Athlon II X4 630 (C'n'Q On) OpenCL 1.1 AMD-APP-SDK-v2.5 (684.213) / GF GT240 512Mb GDDR5 (550/1340/1700) 275.33 / W7HB x64 / RAMDrive DDRII-800

Quote
CUETools.FLACCL.cmd.exe -11 --cpu-threads 4 --slow-gpu 24bit_96khz.wav
FLACCL#0.4, Copyright © 2010 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  : 24bit_96khz.wav
File Info : 96000kHz; 2 channel; 24 bit; 00:03:12.8270000
Results  : 59,86x; 70341057 bytes in 00:00:03.2210924 seconds;
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: lvqcl on 2011-08-13 19:56:08
flaccl does not work with 24-Bit files

flaccl 0.4 (from CUETools 2.1.2) does. But it's a bit experimental, and there's at least one known (if rare) bug in it, so i would wait for the next release.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: JuanPabloCuervo on 2011-08-31 06:54:33
Could someone check are the AMD HD4850/4870 supported? AMD says that this GPU's have OpenCL 1.0 support, but is the 1.1 support required for FLACCL?

AMD HD4xxx series is not supported. There are some essential features missing, such as atomic instructions. I tried to make it work without them, but it proved to be too difficult.


im trying to run OpenCL.exe in Linux...

Two methods:

$ mono FLACCL.exe -11 cd1.wav
&
$ wine flaccl -11 cd1.wav

but both give same error:
Code: [Select]
jpc@jpc-P-7811FX:/media/BCA4E750A4E70C28/FLAC/flaccl03$ wine FLACCL -11 cd1.wav
FLACCL#0.3, Copyright (C) 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Error     : no opencl platforms found

opengl apps work ok...
Unigine Tropics1.3 for example...
http://unigine.com/products/tropics/ (http://unigine.com/products/tropics/)

what could be the missing link?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: JuanPabloCuervo on 2011-08-31 19:51:43
what could be the missing link?
here is the missing link:
http://www.streamcomputing.eu/blog/2011-01...ncl-under-wine/ (http://www.streamcomputing.eu/blog/2011-01-21/opencl-under-wine/)

anyway...  also installed: Intel OpenCL SDK 1.1...
and it worked with GPU Caps Viewer 1.8.6.
http://software.intel.com/en-us/articles/d...tel-opencl-sdk/ (http://software.intel.com/en-us/articles/download-intel-opencl-sdk/)

very useful to test OpenGL & OpenCL under Wine:
http://www.ozone3d.net/gpu_caps_viewer/index.php#intro (http://www.ozone3d.net/gpu_caps_viewer/index.php#intro)
http://www.geeks3d.com/20100326/gpu-caps-v...tx-470-support/ (http://www.geeks3d.com/20100326/gpu-caps-viewer-1-8-6-with-geforce-gtx-480-and-gtx-470-support/)

CPU T8200 from Gateway Laptop test#1:
Code: [Select]
jpc@jpc-P-7811FX:/media/BCA4E750A4E70C28/FLAC/flaccl03$ wine flaccl -11 --opencl-type CPU cd1.wav
fixme:advapi:RegisterTraceGuidsW (0x100778a, 0x100a060, {485e7de8-0a80-11d8-ad15-505054503030}, 1, 0x33fe00, (null), (null), 0x100a068,)
fixme:advapi:RegisterTraceGuidsW (0x100778a, 0x100a080, {485e7de9-0a80-11d8-ad15-505054503030}, 1, 0x33fe00, (null), (null), 0x100a088,)
fixme:advapi:RegisterTraceGuidsW (0x100778a, 0x100a0a0, {485e7dea-0a80-11d8-ad15-505054503030}, 1, 0x33fe00, (null), (null), 0x100a0a8,)
fixme:advapi:RegisterTraceGuidsW (0x100778a, 0x100a0c0, {485e7deb-0a80-11d8-ad15-505054503030}, 1, 0x33fe00, (null), (null), 0x100a0c8,)
fixme:advapi:RegisterTraceGuidsW (0x100778a, 0x100a0e0, {485e7dec-0a80-11d8-ad15-505054503030}, 1, 0x33fe00, (null), (null), 0x100a0e8,)
fixme:advapi:RegisterTraceGuidsW (0x100778a, 0x100a100, {485e7ded-0a80-11d8-ad15-505054503030}, 1, 0x33fe00, (null), (null), 0x100a108,)
fixme:win:RegisterDeviceNotificationW (hwnd=0x12d7f0, filter=0x54e93c,flags=0x00000001) returns a fake device notification handle!
fixme:advapi:RegisterTraceGuidsW (0x79fd471e, 0x12b150, {e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}, 9, 0x7a390368, (null), (null), 0x7a38d250,)
fixme:sync:CreateMemoryResourceNotification (0) stub
fixme:shell:URL_ParseUrl failed to parse L"CUETools.Codecs.FLACCL"
fixme:shell:URL_ParseUrl failed to parse L"CUETools.Codecs"
fixme:shell:URL_ParseUrl failed to parse L"OpenCLNet"
fixme:shell:URL_ParseUrl failed to parse L"CUETools.Codecs.FLAKE"
FLACCL#0.3, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
fixme:shell:URL_ParseUrl failed to parse L"System"
fixme:shell:URL_ParseUrl failed to parse L"System.Xml"
fixme:shell:URL_ParseUrl failed to parse L"System.Configuration"
fixme:shell:URL_ParseUrl failed to parse L"OpenCLNet.XmlSerializers"
fixme:shell:URL_ParseUrl failed to parse L"OpenCLNet.XmlSerializers"
fixme:ole:Context_CC_ContextCallback (0x172aa0/0x172aa4)->(0x79f277a5, 0x29de4c8, {d7174f82-36b8-4aa8-800a-e963ab2dfab9}, 2, (nil))
fixme:ole:Context_CC_ContextCallback (0x172aa0/0x172aa4)->(0x79f277a5, 0x29de45c, {d7174f82-36b8-4aa8-800a-e963ab2dfab9}, 2, (nil))
fixme:ole:Context_CC_ContextCallback (0x172aa0/0x172aa4)->(0x79f277a5, 0x29de45c, {d7174f82-36b8-4aa8-800a-e963ab2dfab9}, 2, (nil))
Progress  : 00%; 26,04x; 00:00:00.2282690/00:02:30.3100000wine: Unhandled stack overflow at address 0x7bc482a5 (thread 000d), starting debugger...
err:seh:setup_exception_record stack overflow 1252 bytes in thread 000d eip 7bc58d71 esp 00240e4c stack 0x240000-0x241000-0x340000
Progress  : 01%; 22,74x; 00:00:01.6994360/00:02:52.1600000fixme:service:QueryServiceConfig2W Level 6 not implemented
fixme:service:QueryServiceConfig2W Level 6 not implemented
Results  : 23,13x; 484371084 bytes in 00:02:49.2215070 seconds;
Test#2:
Code: [Select]
jpc@jpc-P-7811FX:/media/BCA4E750A4E70C28/FLAC/flaccl03$ wine flaccl -11 --opencl-type CPU cd1.wav
fixme:advapi:RegisterTraceGuidsW (0x100778a, 0x100a060, {485e7de8-0a80-11d8-ad15-505054503030}, 1, 0x33fe00, (null), (null), 0x100a068,)
fixme:advapi:RegisterTraceGuidsW (0x100778a, 0x100a080, {485e7de9-0a80-11d8-ad15-505054503030}, 1, 0x33fe00, (null), (null), 0x100a088,)
fixme:advapi:RegisterTraceGuidsW (0x100778a, 0x100a0a0, {485e7dea-0a80-11d8-ad15-505054503030}, 1, 0x33fe00, (null), (null), 0x100a0a8,)
fixme:advapi:RegisterTraceGuidsW (0x100778a, 0x100a0c0, {485e7deb-0a80-11d8-ad15-505054503030}, 1, 0x33fe00, (null), (null), 0x100a0c8,)
fixme:advapi:RegisterTraceGuidsW (0x100778a, 0x100a0e0, {485e7dec-0a80-11d8-ad15-505054503030}, 1, 0x33fe00, (null), (null), 0x100a0e8,)
fixme:advapi:RegisterTraceGuidsW (0x100778a, 0x100a100, {485e7ded-0a80-11d8-ad15-505054503030}, 1, 0x33fe00, (null), (null), 0x100a108,)
fixme:win:RegisterDeviceNotificationW (hwnd=0x12d7f0, filter=0x54e93c,flags=0x00000001) returns a fake device notification handle!
fixme:advapi:RegisterTraceGuidsW (0x79fd471e, 0x12b150, {e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}, 9, 0x7a390368, (null), (null), 0x7a38d250,)
fixme:sync:CreateMemoryResourceNotification (0) stub
fixme:shell:URL_ParseUrl failed to parse L"CUETools.Codecs.FLACCL"
fixme:shell:URL_ParseUrl failed to parse L"CUETools.Codecs"
fixme:shell:URL_ParseUrl failed to parse L"OpenCLNet"
fixme:shell:URL_ParseUrl failed to parse L"CUETools.Codecs.FLAKE"
FLACCL#0.3, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
fixme:shell:URL_ParseUrl failed to parse L"System"
fixme:shell:URL_ParseUrl failed to parse L"System.Xml"
fixme:shell:URL_ParseUrl failed to parse L"System.Configuration"
fixme:shell:URL_ParseUrl failed to parse L"OpenCLNet.XmlSerializers"
fixme:shell:URL_ParseUrl failed to parse L"OpenCLNet.XmlSerializers"
fixme:ole:Context_CC_ContextCallback (0x172718/0x17271c)->(0x79f277a5, 0x29de4c8, {d7174f82-36b8-4aa8-800a-e963ab2dfab9}, 2, (nil))
fixme:ole:Context_CC_ContextCallback (0x172718/0x17271c)->(0x79f277a5, 0x29de45c, {d7174f82-36b8-4aa8-800a-e963ab2dfab9}, 2, (nil))
fixme:ole:Context_CC_ContextCallback (0x172718/0x17271c)->(0x79f277a5, 0x29de45c, {d7174f82-36b8-4aa8-800a-e963ab2dfab9}, 2, (nil))
Progress  : 00%; 13,78x; 00:00:01.2936670/00:04:43.9500000wine: Unhandled stack overflow at address 0x7bc482a5 (thread 000d), starting debugger...
err:seh:setup_exception_record stack overflow 1252 bytes in thread 000d eip 7bc58d71 esp 00240e4c stack 0x240000-0x241000-0x340000
Progress  : 01%; 17,19x; 00:00:02.5933880/00:03:47.6910000fixme:service:QueryServiceConfig2W Level 6 not implemented
Progress  : 01%; 17,26x; 00:00:02.7559320/00:03:46.8400000fixme:service:QueryServiceConfig2W Level 6 not implemented
Results  : 22,42x; 484371084 bytes in 00:02:54.5694210 seconds;
cd1.flac seems OK.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2011-08-31 20:19:55
Thanks for the info.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2011-10-31 18:37:45
I think this is the right place to ask.
Now that ALAC became open source me as noob wonders if this brings any advantage regarding speed, compression or better efficiency?
ALAC as i know it is worse then flac in every regard, especialy as non-i user.
With the source available is there any chance it can compress better with optimized code? Can it make use of GPU encoding and may it become better handling wasted bits and 24bit compression?
I also ask because some users of my favorite Hardware-player already ask for newly added code.
Since you did some with ALAC and lossless codecs you may tell us in short, Gregory?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: saratoga on 2011-10-31 19:51:03
I think this is the right place to ask.
Now that ALAC became open source me as noob wonders if this brings any advantage regarding speed, compression or better efficiency?


ALAC has been open source for years.  Apple releasing another open source decoder doesn't mean the previous one retroactively stops existing.  It just means you now have more choice of which one you want to use. 

Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2011-10-31 20:06:30
Unfortunately, ALAC is not suitable for GPU encoding, because it uses adaptive LPC coefficients, so you can't process each sample in it's own thread. And it doesn't seem to improve the compression ratio. I have no explanation for why have they done this, other than to try to make it different from FLAC.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2011-10-31 20:08:25
Unfortunately, ALAC is not suitable for GPU encoding, because it uses adaptive LPC coefficients, so you can't process each sample in it's own thread. And it doesn't seem to improve the compression ratio. I have no explanation for why have they done this, other than to try to make it different from FLAC.


ALAC case closed, thanks.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2011-11-04 18:49:58
Just want to thank you for organizing and cleaning the SVN repository!
Now even me braindead was able to compile the recent flaccl binaries with the free Visual C# 2010 Express.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2011-11-04 18:55:01
Actually it was not me, it was ivailo91
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: wildsnake on 2011-12-04 10:31:45
(http://s017.radikal.ru/i401/1112/e0/1460265840b8.jpg)
this problem appeared some ago, before that everything was good.

OpenCL - AMD APP. CPU - Phenon 9550
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Garf on 2012-01-06 19:43:20
With FLACCL 0.3 and 0.4, I keep getting

Error    : Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

AMD 6850, Catalyst 11.12 drivers.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Ran Sagy on 2012-01-06 21:43:57
Same as Garf here, Also AMD - Mobile AMD Radeon 6970M, 11.12 MOBILITY drivers, with APP SDK 2.6 installed as well for good measure.
Geeks3D GPU CAPS viewer can run his OpenCL demos with no problem, but GPUZ doesn't show OpenCL as enabled for my card, so its a hit or miss.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Ran Sagy on 2012-01-07 13:45:45
To add on the previous post, GPUZ devs found an issue with their OpenCL detection for AMD cards, Their fixed test build detects it properly - So OpenCL is more or less verified to be working on my setup.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Miguk on 2012-01-07 16:50:21
Quote
FLACCL#0.4, Copyright © 2010 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  : 02. Burning Spear.wav
File Info : 44100kHz; 2 channel; 16 bit; 00:02:19.8400000
Error    : unsupported subframe coding (ch == 1)


AudioTester:
Quote
1 file scanned in 0.05 seconds
---
1 file failed
C:\_Music\Joe Pass - Better Days\new\02. Burning Spear.flac   (LOST_SYNC @ 0m 09s)
---
0 files passed


AMD 5870, Catalyst 11.12 and 12.1 Preview.

On my netbook with Nvidia ION FLACCL also stopped working after updating to latest Nvidia driver.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Miguk on 2012-01-22 09:40:13
Quote
c:\Downloads\FLACCL_0.4\FLACCL>CUETools.FLACCL.cmd.exe --verify test.wav
FLACCL#0.4, Copyright © 2010 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  : test.wav
File Info : 44100kHz; 2 channel; 16 bit; 00:09:40.1600000
Error    : unsupported residual coding


Catalyst 12.1 Preview.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: agressiv on 2012-03-18 15:17:52
Hey guys, I've been having MD5 signature mismatches with FlacCL on one of my computers with a nVidia GTX 570 card.  A second computer, with a slower GT 430 card, works fine.  Even with the signature mismatches, files (appear) to be fine, but I'm guessing something will be wrong, somewhere.

I wanted to do some troubleshooting on my own so that it doesn't sound like I'm just punting this out there.

Hardware = Core i7 950, nVidia GTX 570, 12GB RAM

Troubleshooting steps:
FlacCL Level 11 - MD5 signature mismatch (4+ attempts, works ~10% of the time) (Speed = 235x)
FlacCL Level 10 - MD5 signature mismatch (Speed = 254x)
FlacCL Level 9 - No problems (try #1) / MD5 signature mismatch (try #2) (Speed = 281x)
FlacCL Level 8 - MD5 signature mismatch (Speed = 325x)
libFlake Level 11 - No problems (2 attempts) (Speed = 31x)
flake Level 12 - No problems (Speed = 13x)

FlacCL Level 11 - separate computer w/older nVidia card - no problems (Speed = 60x)

File sizes don't even match for a full CD, but they are fairly close. (within a few kilobytes)

Next step - Turned Verify on for FlacCL Level 11 (Speed = 136x)
Got an "Exception: validation failed: iFrame=24603, ch=0"  - it will be in a different spot each time.  Sometimes it works.

Next step - Tried Changing DoRice, GroupSize, and TaskSize.  No consistent results.  Worked a few times, failed most of the time.

Next step - Change GPUOnly to False, and changed threads to 4, left Verify On (Speed = 308x)
Haven't gotten this to fail.  I've done 10 encodes of the same CD now.  flac -t works every time.

Next step - GPUOnly back to True, but leave threads at 4. Fails sometimes.  GPUOnly=False seems to be required for it to work for me.

So, how much should I worry about this?  GPU Bad?  Bug in CUETools with this card?  Why would it work when I split the load with the GPU and the CPU?  I've tried multiple nVidia drivers, including the latest.

I have no problems leaving this the way it is, certainly if it works - it's faster than GPU only.  If there is any other debugging information you want me to collect, I'd be happy to do that.

agressiv


Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2012-03-18 19:17:04
I use FlacCl more or less from day 1 on, first with a GTX260 and now a GTX560Ti. I tried to provoke encoding errors with insane overclocking on the GPU and its RAM but couldn´t create a single one with reaching clockspeeds no game would run.
So my guess is you may have another stability problem with your CPU/Mainboard/GPU combination. You may try some stability test overclockers use.
There only were 2 songs i found since Gregory created these GPU encoders that made problems but i don´t remember the exact errorcode back then. These were outright fixed by Gregory a while back.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Miguk on 2012-03-31 10:41:43
c:\CUETools>CUETools.FLACCL.cmd.exe --verify test.wav
FLACCL#0.4, Copyright © 2010 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  : test.wav
File Info : 44100kHz; 2 channel; 16 bit; 00:09:40.1600000
Error    : unsupported residual coding

AMD Catalyst 12.3.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2012-03-31 10:52:49
Does this happen on some specific input file, or does it happen on lots of files?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Miguk on 2012-04-12 20:33:04
Quote
c:\CUETools>CUETools.FLACCL.cmd.exe --verify "c:\_Music\Stefano Di Battista - Vo
lare\new\01. Prima Di Partire.wav"
FLACCL#0.4, Copyright © 2010 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  : c:\_Music\Stefano Di Battista - Volare\new\01. Prima Di Partire.wav
File Info : 44100kHz; 2 channel; 16 bit; 00:05:32.5330000
Error    : unsupported residual coding

c:\CUETools>CUETools.FLACCL.cmd.exe --verify "c:\_Music\Stefano Di Battista - Vo
lare\new\02. Blues For Michel.wav"
FLACCL#0.4, Copyright © 2010 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  : c:\_Music\Stefano Di Battista - Volare\new\02. Blues For Michel.wav
File Info : 44100kHz; 2 channel; 16 bit; 00:03:55.8400000
Error    : unsupported residual coding

c:\CUETools>CUETools.FLACCL.cmd.exe --verify "c:\_Music\Stefano Di Battista - Vo
lare\new\03. Widows Walk.wav"
FLACCL#0.4, Copyright © 2010 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  : c:\_Music\Stefano Di Battista - Volare\new\03. Widows Walk.wav
File Info : 44100kHz; 2 channel; 16 bit; 00:09:22.0270000
Error    : unsupported residual coding


Quote
c:\CUETools>flac -t "c:\_Music\Stefano Di Battista - Volare\new\02. Blues For Mi
chel.flac"

flac 1.2.1, Copyright © 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.

02. Blues For Michel.flac: *** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATU
S_LOST_SYNC
02. Blues For Michel.flac: *** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATU
S_LOST_SYNC
02. Blues For Michel.flac: *** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATU
S_LOST_SYNC
02. Blues For Michel.flac: *** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATU
S_LOST_SYNC
02. Blues For Michel.flac: *** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATU
S_LOST_SYNC
02. Blues For Michel.flac: *** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATU
S_LOST_SYNC
02. Blues For Michel.flac: *** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATU
S_LOST_SYNC
02. Blues For Michel.flac: *** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATU
S_LOST_SYNC
02. Blues For Michel.flac: *** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATU
S_LOST_SYNC
02. Blues For Michel.flac: *** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATU
S_LOST_SYNC
02. Blues For Michel.flac: *** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATU
S_LOST_SYNC
02. Blues For Michel.flac: *** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATU
S_LOST_SYNC


02. Blues For Michel.flac: ERROR while decoding data
                          state = FLAC__STREAM_DECODER_READ_FRAME


AudioTester:
Quote
3 files scanned in 0.12 seconds
---
3 files failed
C:\_Music\Stefano Di Battista - Volare\new\01. Prima Di Partire.flac   (LOST_SYNC @ 0m 00s)
C:\_Music\Stefano Di Battista - Volare\new\02. Blues For Michel.flac   (LOST_SYNC @ 0m 00s)
C:\_Music\Stefano Di Battista - Volare\new\03. Widows Walk.flac   (LOST_SYNC @ 0m 00s)
---
0 files passed
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: aasoft on 2012-04-27 19:46:47
I'm also getting the same error. It happens on pretty much every file I throw at it (although some worked fine, I think), ever since I switched from an NVidia GPU to an ATI one (although I used FlaCuda with the NVidia one, so that's probably not of much help). Oh, and it works just fine if I tell it to encode on the CPU only, instead of the GPU, though, of course, much slower.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2012-04-27 19:52:06
Please tell which exactly GPU do you use. And if possible, driver version as well.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: aasoft on 2012-04-27 22:46:02
Right, I meant to include that, but must've forgotten.
It's a PowerColor Radeon HD 6850. The current driver is the latest one, 8.961.0.0, the one that came with the latest release just a few days back. Catalyst 12.4, to be exact.
But it wasn't working with at least 3 previous releases of the drivers as well, if it helps you. Don't know if it worked with earlier releases, as I never tried the earlier ones.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2012-04-27 22:46:59
Thanks
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Miguk on 2012-04-28 18:28:48
I am using Radeon HD 5870.

As I mentioned earlier, on my Nvidia ION with the latest Nvidia driver FLACCL doesn't work, too.
But it works with 267.54 driver.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: NoMoon on 2012-05-24 06:05:31
Having the same "Error : unsupported residual coding" in CueTools. Running an ATI 6950 with Catalyst 12.4 and the latest OpenCL SDK
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Garf on 2012-05-29 09:00:21
Benchmark of some modern cards:

http://ht4u.net/reviews/2012/gigabyte_gefo...est/index37.php (http://ht4u.net/reviews/2012/gigabyte_geforce_gtx_670_oc_windforce_3_im_test/index37.php)
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2012-05-29 14:13:53
Very interesting. Thanks a lot!

I'm not entirely surprised that SLI configurations and dual chip cards are often slower than single chip, not all algorithms benefit from this, especially without special fine-tuning.

But it's surprising how Kepler seems slower than Fermi. In theory it should have outperformed AMD. I will have to investigate what's going on here.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Case on 2012-05-29 14:25:48
On my PCIe 3.0 configuration SLI with two GTX 680 cards was only 2% slower than encoding with one card inside. The difference between SLI on and off when two cards were in the machine was about 0.1%.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Miguk on 2012-05-29 14:35:21
I will have to investigate what's going on here.

I hope your investigation brings us working FLACCL back :-)
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: IgorC on 2012-05-29 14:52:47
Benchmark of some modern cards:

http://ht4u.net/reviews/2012/gigabyte_gefo...est/index37.php (http://ht4u.net/reviews/2012/gigabyte_geforce_gtx_670_oc_windforce_3_im_test/index37.php)


Interesting.

I wonder what performance is per Watt for CPU vs GPU (especially for mobile AMD APU).
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: no404error on 2012-06-15 13:32:06
Intel® Core™ i7-3770, 8Gb DDRIII-1333, Win7 HP x64

CUETools.FLACCL.cmd.exe -o nul --cpu-threads 8 --opencl-type CPU --opencl-platform "Intel® OpenCL" test.wav

-0 = 1552.67
-1 = 1402.22
-2 = 1308.66
-3 = 808.33
-4 = 645.38
-5 = 460.92
-6 = 654.20
-7 = 482.51
-8 = 278.95
-9 = 322.66
-10 = 186.75
-11 = 132.91
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Miguk on 2012-06-19 14:43:23
I updated today my ION (notebook) video drivers to the latest NVIDIA version (301.42 x64).
FLACCL test failed again but due to other reasons:
- test 1: only 6 of 9 tracks encoded
- test 2: only 8 of 9 tracks encoded
- audiotester showed 0 errors in encoded tracks in both cases
- cuetools showed every time following error:
(http://i39.fastpic.ru/big/2012/0619/04/06b88c1ef18e6b8902653a3d9ec25b04.jpg)

flaclib encoded all tracks without any problem.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Miguk on 2012-06-20 15:33:08
flaclib = libflac :-)
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: IgorC on 2012-06-23 19:02:56
Intel® Core™ i7-3770, 8Gb DDRIII-1333, Win7 HP x64

CUETools.FLACCL.cmd.exe -o nul --cpu-threads 8 --opencl-type CPU --opencl-platform "Intel® OpenCL" test.wav

-0 = 1552.67
-1 = 1402.22
-2 = 1308.66
-3 = 808.33
-4 = 645.38
-5 = 460.92
-6 = 654.20
-7 = 482.51
-8 = 278.95
-9 = 322.66
-10 = 186.75
-11 = 132.91

The speed is so high for real use 

Can You run the same configuration but with  --cpu-threads 1 or gpu only? It will give a rough idea what to expect from mobile CPUs.

Thank You.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2012-06-23 19:16:38
Can You run the same configuration but with  --cpu-threads 1 or gpu only? It will give a rough idea what to expect from mobile CPUs.

Actually, it won't. --cpu-threads option's name is probably a bit confusing in case of --opencl-type CPU.
There are two types of threads - actual opencl threads, which run on GPU(s) in case of --opencl-type GPU, and run on CPU(s) in cases of --opencl-type CPU.
Number of those threads is not controlled by --cpu-threads option, which controls the number of threads of second type - control threads, that schedule opencl work.
So i should probably rename --cpu-threads to --control-threads and maybe introduce a new option --cpu-cores, to control number of CPU cores used by opencl tasks in case of --opencl-type CPU.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: no404error on 2012-06-23 20:13:14
Intel® Core™ i7-3770, 8Gb DDRIII-1333, Win7 HP x64

CUETools.FLACCL.cmd.exe -o nul --opencl-type GPU test.wav

-0 = 375.28
-1 = 764.13
-2 = 1038.91
-3 = 314.01
-4 = 345.24
-5 = 303.78
-6 = 346.60
-7 = 304.84
-8 = 177.76
-9 = 120.67
-10 = 85.10
-11 = 66.12
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: acmodeu on 2012-06-27 18:59:20
Got gass.cuda.cudaexception on i7-2600k/GTX570 with 304.48 drivers. GTX280 worked fine.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: aasoft on 2012-07-31 01:19:20
Any update on the "Error : unsupported residual coding" error? Perhaps there are some test builds you'd like us (those who experience the error) to run?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Garf on 2012-08-13 08:47:22
There are some bugs when encoding very large files (>2G):
http://www.hydrogenaudio.org/forums/index....st&p=805071 (http://www.hydrogenaudio.org/forums/index.php?showtopic=96458&view=findpost&p=805071)

Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: no404error on 2012-08-18 19:32:07
Intel® Core™ i7-3770, 8Gb DDRIII-1333, MSI R7770-PMD1GD5, Win7 HP x64

CUETools.FLACCL.cmd.exe -X -o nul --opencl-type GPU --opencl-platform "AMD Accelerated Parallel Processing" --fast-gpu test.wav

-0 = 750.56
-1 = 640.93
-2 = 608.70
-3 = 1164.92
-4 = 1108.60
-5 = 1006.79
-6 = 1067.87
-7 = 960.46
-8 = 761.45
-9 = 515.59
-10 = 395.81
-11 = 347.45
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: JuanPabloCuervo on 2012-08-26 02:19:36
Hi, ..

recently installed Win7x64
and purchased 2x HD7970

but... Flaccl v0.4
does not work...

AMD drivers 12.6

Flaccl v0.3 works... but... no GCN, no Crossfire.
very small performance increase...?

cuetools.flaccl.cmd.exe --11 --task-size 64 --group-size 64 cd1.wav
Code: [Select]
C:\Users\jpc\Desktop\FLACCL\flaccl03>flaccl03.exe -8 --task-size 64 --cpu-thread
s 3 --group-size 64 cd1.wav
FLACCL#0.3, Copyright (C) 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results   : 350.02x; 448997159 bytes in 00:00:11.1826396 seconds;

C:\Users\jpc\Desktop\FLACCL\flaccl03>flaccl03.exe -11 --task-size 64 --cpu-threa
ds 3 --group-size 64 cd1.wav
FLACCL#0.3, Copyright (C) 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results   : 379.22x; 433963131 bytes in 00:00:10.3215904 seconds;

C:\Users\jpc\Desktop\FLACCL\flaccl03>


crark v3.41 also does not work...
http://www.crark.net/ (http://www.crark.net/)

any ideas?

http://www.golubev.com/blog/ (http://www.golubev.com/blog/)
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2012-08-26 02:36:13
FLACCL is very hardware-dependant, because architectures were rapidly changing at the time it was written. First thing it does is tries to determine which hardware it runs on, and selects parts of code appropriate for that hardware.
I need to debug the general case for unknown hardware to increase the chances of it working on any new GPUs.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: JuanPabloCuervo on 2012-08-26 02:40:15
FLACCL is very hardware-dependant, because architectures were rapidly changing at the time it was written. First thing it does is tries to determine which hardware it runs on, and selects parts of code appropriate for that hardware.
I need to debug the general case for unknown hardware to increase the chances of it working on any new GPUs.


i thought it was a Windows problem...
because cRARk for Linux has incredible performance increase HD7970 vs. HD6970
but cRARk for Windows does not even work. strange.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: wdekler on 2012-09-10 12:25:44
It seems that the --ignore-chunk-sizes option is missing which makes it impossible to use with foobar's default flac profile.

Is this just some missing functionality or is not needed with this version?

By the way, I read that the Nvidia 600 series aren't the fastest with flac-cuda I'm still very happy to see encoding speeds of 200-350 with my GTX670. Thanks!
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Garf on 2012-09-10 16:46:41
By the way, I read that the Nvidia 600 series aren't the fastest with flac-cuda I'm still very happy to see encoding speeds of 200-350 with my GTX670. Thanks!


Only 300x? Depends on the source format of course, but a GTX670 should reach 800x speeds even at -8. Try this:

-q -8 --verify --slow-gpu --task-size 32 --cpu-threads 2 - -o %d
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: wdekler on 2012-09-10 21:57:37
By the way, I read that the Nvidia 600 series aren't the fastest with flac-cuda I'm still very happy to see encoding speeds of 200-350 with my GTX670. Thanks!


Only 300x? Depends on the source format of course, but a GTX670 should reach 800x speeds even at -8. Try this:

-q -8 --verify --slow-gpu --task-size 32 --cpu-threads 2 - -o %d


Thanks! I'll certainly try them later this week.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Kvanto on 2012-09-13 23:48:29
Somehow after updating nvidia drivers to 306.23, flaccl 0.4 stopped working on GTX 570... this is just me?

EDIT: it says
Error: GetDeviceIDs failed: INVALID_VALUE
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2012-09-14 01:04:47
Somehow after updating nvidia drivers to 306.23, flaccl 0.4 stopped working on GTX 570... this is just me?

EDIT: it says
Error: GetDeviceIDs failed: INVALID_VALUE

Works nicely with a GTX560Ti on Win7/32
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Kvanto on 2012-09-14 18:07:48
So, can I hope that this will be worked around somehow, or should I stick to old drivers forever?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Kvanto on 2012-09-27 08:01:02
OK I see this project is dead. Then does anyone know what libraries and/or other files that are part of nvidia windows7 driver FLACCL make use of? So I'll be able to copy them, install new driver and then put old files in sandbox environment or overwrite new files. Or what files in driver package are opencl-related? Maybe someone have some info about GetDeviceIDs failed issue? From its name it looks like some general issue that can happen not only in flaccl.

Edit: I also did some googling and it looks like this problem indicates bug in opencl application
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: itisljar on 2012-09-27 11:06:38
c:\Program Files (x86)\Utilities\CUETools_2.1.4>CUETools.FLACCL.cmd.exe Mustapha
.wav -o Mustapha.flac
FLACCL#0.4, Copyright © 2010 Grigory 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  : Mustapha.wav
File Info : 44100kHz; 2 channel; 16 bit; 00:03:26.3470000
Error    : GetDeviceIDs failed: INVALID_VALUE

Windows 7 SP1 64 bit, Sapphire Radeon 5770 1 GB, Catalyst 12.8.

What can I do to make it work?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Kvanto on 2012-09-27 11:12:49
hlloyge
Hi. try this:
CUETools.FLACCL.cmd.exe --opencl-type CPU somefile.wav -o somefile.flac

Edit: of course this doesn't solves the issue but at least it works.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: itisljar on 2012-09-27 12:41:33
Yeah, it works, confirmed. Thank you.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Miguk on 2012-12-05 11:25:18
My netbook has Nvidia ION graphic. The whole time I had to use 267.54 driver as flaccl refused to work with later versions always showing "Out of resource" error after encoding several files.

Today I tried the latest 306.97 version - with the same result. 

Then I tried flaccl 0.3 from the command line - it worked!

I tried flaccl 0.4 from the command line - it worked, too! Though a little bit slower than 0.3.

I replaced 0.4 in Cuetools folder with 0.3 files - the same out-of-resource error but after 12 encoded files (before it were 4).

So I decided to say farewell to flaccl as dll and tried to use it as command-line encoder in Cuetools.

With these settings it works now!



BTW, my home computer has an ATI Radeon 5870 graphic card. After upgrading the processor to i5 3570K I don't use ATI opencl anymore - Intel 4000 graphic is faster :-)
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Miguk on 2012-12-08 13:50:53
I don't know why but FLACCL works again with the latest ATI Catalyst driver (12.10).
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: 06_taro on 2012-12-09 18:19:49
I don't know why but FLACCL works again with the latest ATI Catalyst driver (12.10).

Because 12.9 fixed an issue from 12.4 that OpenCL runtime was broken, resulting in crash or incorrect results on some programs.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: sefr-g on 2012-12-17 19:44:02
I've been using and testing FLACCL for some days now, and I ran into some questions:

- will there be tagging support in a future update?

- I've tested up to 24 bits / 96khz / 7.1 channels successfully. will the samples rates 88.2/174.4/192khz be supported at some point (not that I'm a fan of those...)?

- when using flaccl as a command line encoder in foobar, is there a way to force fb2k to use the source wav and not create a temp wav thus slowing the operation down?

- at the moment I'm using batchenc as a gui/frontend and while it skips the foobar delay it lacks tagging. is there a better alternative or a way to include metaflac for the task?

thanks!

btw, here are some benchmarks on a low-end system (with cuetools):
Code: [Select]
Celeron E1200 @ 1.6 Ghz, FLAC 1.2.1b -8 -V: 22x, +0%
Celeron E1200 @ 3.0 Ghz, FLAC 1.2.1b -8 -V: 42x, +91%
Celeron E1200 @ 1.6 Ghz, Geforce 210 @ default, FLACCL 0.4 -8 --verify --slow-gpu: 53x, +141%
Celeron E1200 @ 3.0 Ghz, Geforce 210 @ default, FLACCL 0.4 -8 --verify --slow-gpu: 73x, +232%
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Kvanto on 2012-12-17 19:50:00
[quote author=sefr-g link=msg=817435 date=1355773442]I've been using and testing FLACCL for some days now, and I ran into some questions:

- will there be tagging support in a future update?

- I've tested up to 24 bits / 96khz / 7.1 channels successfully. will the samples rates 88.2/174.4/192khz be supported at some point (not that I'm a fan of those...)?

- when using flaccl as a command line encoder in foobar, is there a way to force fb2k to use the source wav and not create a temp wav thus slowing the operation down?

- at the moment I'm using batchenc as a gui/frontend and while it skips the foobar delay it lacks tagging. is there a better alternative or a way to include metaflac for the task?[/quote]
If it uses temp wav in foobar, I believe you set up it that way. It should do encoding from any source without temp file. Not sure what you say about tags, but if they was in source file, they'll be in final encoded file too.
Btw be careful with anything that is more than 16bits 5.1. It often produces broken files. Verify them after encoding. They may be not completely broken, but some part of it.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: sefr-g on 2012-12-17 20:07:41
if I skip the %s in foobar's commandline I get an error: The encoder has terminated prematurely with code 1 (0x00000001)

as for tags, if the source wav has tags (shown in foobar) the resulting flac will have none, at least with the "regular" CUETools.FLACCL.exe [options] <input.wav> commandline.

with verifying you mean listening or just using --verify?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Kvanto on 2012-12-17 20:17:42
[quote author=sefr-g link=msg=817440 date=1355774861]if I skip the %s in foobar's commandline I get an error: The encoder has terminated prematurely with code 1 (0x00000001)

as for tags, if the source wav has tags (shown in foobar) the resulting flac will have none, at least with the "regular" CUETools.FLACCL.exe [options] <input.wav> commandline.

with verifying you mean listening or just using --verify?[/quote]
Simply skipping it is not a proper way. check fb2k documentation for correct way, I don't really remember without checking myself.
Thing with tags is a feature of the front end. it will work with foobar, not with FLACCL.exe alone
By verify I mean verify md5 using anything that works for you. personally I use fb2k plugin. maybe FLACCL.exe can do that, I never tried. Original flac package should have ways to do it. If you'll try to mux it in mkv using mkvmerge for example, it will give an errors too. Listening may or may not work as it not always completely broken. It's hard to spot anything that way. BTW while it happens only with more than 16bits audio, it looks like it depends on the _content_ of the audio. For some 24bit audio it never happens, for some other it always happens with any compression level and whatever.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: sefr-g on 2012-12-17 20:40:20
alright thanks.
I've noticed the missing - in foobar's commandline although I could swear I've used it initially. now it works, though a bit slower than with plain cmd.exe.
I'll look into md5, thanks again.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: JuanPabloCuervo on 2012-12-27 01:53:45
Hi, Happy New Year....

i installed drivers 12.10 and was a BIG improvement over 12.6.
but i read somewhere that 12.11 are even better...

uninstalled the 12.10, reboot & installed the 12.11beta11 NET4

it does improove a bit... over 12.10,
but something strange happens...

with Hitachi 2TB HDD goes faster, than using RamDrive...? crazy right? 

sadly HDTach 3.0.4 software was discontinued, to test Ramdrive speed.
very strange....

also the latest 12.11beta11 NET4 does not support --group-size 64
gives a Error    : internal error: invalid stereo mode.
but with --group-size 32 works ok.

also does not auto-detect the OpenCL name, i guess because i have installled the "Intel SDK OpenCL 2012"

anyway... here are some results:

Quote
--opencl-type cpu
164.32x
i7 970 3.2GHz
///////////////////////////////////
AMD Drivers 12.10...

C:\Users\jpc\Desktop\FLACCL\flaccl03>flaccl03 -11 --opencl-type gpu --opencl-platform "AMD Accelerated Parallel Processing" --task-size 64 --group-size 64 cd1.wav
FLACCL#0.3, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 670.88x; 433963131 bytes in 00:00:05.8344102 seconds;

...

C:\Users\jpc\Desktop\FLACCL\flaccl03>flaccl03 -11 --opencl-type gpu --opencl-platform "AMD Accelerated Parallel Processing" --task-size 128 --group-size 32 cd1.wav
FLACCL#0.3, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 804.20x; 662069752 bytes in 00:00:04.8672085 seconds;

a few more tests with same setting:
791.51x
789.02x
801.63x
806.78x
804.20x
781.65x
806.78x
806.78x

///////////////////////////
with DataRAM RAMDisk now called AMD RamDrive...


R:\>flaccl03 -11 --opencl-type gpu --opencl-platform "AMD Accelerated Parallel Processing" --task-size 128 --group-size 32 cd1.wav
FLACCL#0.3, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 789.02x; 662069752 bytes in 00:00:04.9608088 seconds;

a few more tests with same setting:
784.09x
784.55x
786.55x
786.55x
789.02x
789.02x
791.51x
789.02x

////////////////////////////////////////////////////////////////////////////////////////////////
AMD Drivers 12.11beta11 NET4

C:\Users\jpc\Desktop\FLACCL\flaccl03>flaccl03 -11 --opencl-type gpu --opencl-platform "AMD Accelerated Parallel Processing" --task-size 64 --group-size 64 cd1.wav
FLACCL#0.3, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Error    : internal error: invalid stereo mode

C:\Users\jpc\Desktop\FLACCL\flaccl03>flaccl03 -11 --opencl-type gpu --opencl-platform "AMD Accelerated Parallel Processing" --task-size 64 --group-size 32 cd1.wav
FLACCL#0.3, Copyright © 2010 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  : cd1.wav
File Info : 44100kHz; 2 channel; 16 bit; 01:05:14.1880000
Results  : 332.33x; 672222043 bytes in 00:00:11.7780207 seconds;

--task-size 128 --group-size 32
791.51x
806.78x
799.07x
806.78x
806.78x
806.78x
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: JuanPabloCuervo on 2012-12-27 02:22:32
[quote author=sefr-g link=msg=817435 date=1355773442]will the samples rates 88.2/174.4/192khz be supported at some point (not that I'm a fan of those...)?[/quote]
WTF...not a fan? you really need to change your loudspeakers.
http://www.youtube.com/watch?v=3lXnAGIwicE (http://www.youtube.com/watch?v=3lXnAGIwicE)
http://www.youtube.com/watch?v=Ys7lABBrpYw (http://www.youtube.com/watch?v=Ys7lABBrpYw)
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: moosehunter on 2013-02-13 03:42:49
Will there be support for tags in any upcoming versions similar to the way flac copies any tags or images in files that it encodes from flac to flac?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Case on 2013-03-04 15:21:02
I just installed Nvidia's GTX Titan graphics card and wanted to benchmark FlacCL speeds on it. Unfortunately display driver keeps dying with error message "Display driver nvlddmkm stopped responding and has successfully recovered." I tried both WHQL 314.09 and beta 314.14 drivers with the same sad result. Does anyone know if the card is supposed to behave better with this program?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2013-03-04 15:23:34
Ouch. That's very unfortunate.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2013-03-04 15:36:00
I can´t help you but the 314.09 drivers work fine here with a 660Ti and flacCL.
Did you try toggle the Titan only setting in the Nvidia Control Panel for “CUDA – Double Precision” ? maybe this changes something.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: bennetng on 2013-03-04 16:36:44
HD5750 512MB@stock speed, i3-540@3.8Ghz, 8GB RAM
win7x64, Catalyst 13.1
Default setting without any switch

-8: 371.25x; 546284393 bytes in 00:00:12.0086868 seconds;
-7: 656.94x; 546611605 bytes in 00:00:06.7863882 seconds;
-6: 886.29x; 546635330 bytes in 00:00:05.0302878 seconds;
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Case on 2013-03-05 02:27:20
After I enabled the double precision option I no longer had display driver resetting. Not even after I disabled the option again.
Attached is a fresh comparison between CPU, GTX 680 and GTX Titan. Option --cpu-threads 4 seemed to produce highest speeds on all compression levels. GTX 680 was faster with --slow-gpu option starting from compression level 4.
[attachment=7398:flac_speeds.png]
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2013-03-05 07:00:42
2000x compression speed - that's more like it

Thanks again!
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: It's me Selur on 2013-05-11 09:34:56
Hi, I'm trying to use flac 0.4 from (http://audiophilesoft.ru/load/coders_utils/flaccl/7-1-0-68 ; also tried latest CueTools version) with ffmpeg&sox, when I call:
Code: [Select]
"G:\Hybrid\ffmpeg.exe" -y -analyzeduration 500000000 -threads 8 -v -10 -i "H:\Temp\iId_2_aid_1_01_19_56_0910_05.mp3" -ac 2 -acodec pcm_s16le -f wav - |  "G:\Hybrid\CUETools.FLACCL.cmd.exe" -5 -o "H:\Output\iId_2_aid_1_01_19_56_091005.flac" -

the output is properly produced, but if I add sox to the mix:
Code: [Select]
"G:\Hybrid\ffmpeg.exe" -y -analyzeduration 500000000 -threads 8 -v -10 -i "H:\Temp\iId_1_aid_1_01_11_20_6710_01.mp3" -ac 2 -f sox - | "G:\Hybrid\sox.exe" --multi-threaded --temp "H:\Temp" --buffer 524288 -t sox - -b 16 -t wavpcm - | "G:\Hybrid\CUETools.FLACCL.cmd.exe" -5 -o "H:\Output\iId_1_aid_1_01_11_20_671001.flac" -

it aborts with
Quote
Error    : Incomplete file read.


I suspect this might be due to a warning sox throws:
"WARN wav: Length in output .wav header will be wrong since can't seek to fix it"
(if I create a temporal file and reencode it, it works without a problem)

Does anyone know what really is the problem and how to fix it?
I don't want to:
a. skip sox, since I'd like to do some additional filtering through sox
or
b. create a temporal wav file

Is there some sort of '--ignore-length' like NeroAacEnc and other encoders have, which I'm missing?

Cu Selur
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: It's me Selur on 2013-05-11 14:29:32
added a feature request over at https://sourceforge.net/p/cuetoolsnet/bugs/17/ (https://sourceforge.net/p/cuetoolsnet/bugs/17/)
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: IgorC on 2013-05-11 16:31:41
The compression level -6 is very attractive imo.  The difference between -6 and -11 is quite small (0.1-0.15%) but -6 preset has a bit higher decoding speed, the same as FLAC -8.

Here getting ~630x    encoding speed with FLACCL 0.4 -6 on 3770k (with its iGPU HD4000) and still a bit better compression (0.1-0.15%) than very slow FLAC -8 -A tukey(0.5) -A flattop.





Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: GeorgiusT on 2013-05-17 15:11:25
Hello,

when I try to encode a 24/96 FLAC in foobar2000 I get following error message:

1 out of 1 tracks converted with major problems.

Source: "E:\Musik\Metallica [vinyl 24 bit]\09-Garage Inc\13.flac"
  An error occurred while writing to file (The encoder has terminated prematurely with code 1 (0x00000001); please re-check parameters) : "E:\Musik\Metallica [vinyl 24 bit]\09-Garage Inc\The Small Hours_test.flac"
  Additional information:
  Encoder stream format: 96000Hz / 2ch / 24bps
  Command line: "C:\Program Files (x86)\foobar2000\converters\CUETools.FLACCL.cmd.exe" -q -8 --fast-gpu --cpu-threads 4 -o "The Small Hours_test.flac"
  Working folder: E:\Musik\Metallica [vinyl 24 bit]\09-Garage Inc\
 
  Conversion failed: The encoder has terminated prematurely with code 1 (0x00000001); please re-check parameters

Does somebody know whats the problem? I also tried different command line options with no success.

My GPU is GeForce 660, driver version 320.14, OS Win 7 x64.

Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: lvqcl on 2013-05-17 15:48:12
Add "- " in front of your command line
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: db1989 on 2013-05-17 15:52:30
To elaborate: your line currently does not tell FLAC where to get the input from. Quite a major omission! The hyphen tells it to take the audio piped from standard input, which is how foobar2000 sends it.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2013-05-17 15:59:40
Only the later flacCL versions do support higher samplerates but this is still buggy and 88.2kHz for example even doesn´t work at all yet. I guess using flacCL at this point with anything different as 44.1kHz material is not safe. I reported problems with 96kHz files that encode and verify fine but can´t be decoded with flac.exe
Grigory is at it and we just have to wait.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: GeorgiusT on 2013-05-24 16:03:23
I have FLACCL v 0.4.7. Added %s to command line and an resampler to 96000 Hz, seems to work now.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: mzso on 2013-06-13 17:17:12
I the simplest form in foobar with CUETools.FLACCL.cmd.exe:
Code: [Select]
-8 -o %d %s


I get a windows app crash message and mini dump files for CUETools.FLACCL.cmd.exe:.

So something clearly is wrong. But I have no clue what.

The same seems to be working manually from CLI.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2013-06-13 17:23:37
First of all, try more recent version: http://www.cuetools.net/install/CUETools_2.1.5.zip (http://www.cuetools.net/install/CUETools_2.1.5.zip)

The simplest form would be
Code: [Select]
--lax -9 -o %d -
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: mzso on 2013-06-13 17:26:36
First of all, try more recent version: http://www.cuetools.net/install/CUETools_2.1.5.zip (http://www.cuetools.net/install/CUETools_2.1.5.zip)

The simplest form would be
Code: [Select]
--lax -9 -o %d -

Yeah I corrected it to -8 but copied the wrong thing here.
Anyway it seems the problem was that it's not a static build and I didn't copy the dll-s. Do I need all of them?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2013-06-13 17:34:56
I have FLACCL v 0.4.7. Added %s to command line and an resampler to 96000 Hz, seems to work now.

There never was a version 0.4.7

In  the latest version from 11.06.2013 flacCL is running fine with samplerates up to 96kHz, others i didn´t try.

And again a BIG thanks to Grigory! The speed it crunches these big files is simply stunning!
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: mzso on 2013-06-13 17:42:54
First of all, try more recent version: http://www.cuetools.net/install/CUETools_2.1.5.zip (http://www.cuetools.net/install/CUETools_2.1.5.zip)

The simplest form would be
Code: [Select]
--lax -9 -o %d -

Forgot to mention that I already used that version. Is it based upon libflac (If yes is it on the nevest one?) or is it a totally separate encoder btw?

Is there any point in specifying opencl-platform? (for my Nvidia card) The encoder doesn't tell what it uses during the encode.


It seems to use 100% cpu but very little gpu. Is that normal? Also I can't set --opencl-platform to 'NVIDIA CUDA', because it doesn't work.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2013-06-13 18:47:04
Anyway it seems the problem was that it's not a static build and I didn't copy the dll-s. Do I need all of them?

These files in the same folder should work: CUETools.Codecs.FLACCL.dll, CUETools.FLACCL.cmd.exe, CUETools.Codecs.FLAKE.dll, CUETools.Codecs.dll, OpenCLNet.dll

Is there any point in specifying opencl-platform? (for my Nvidia card) The encoder doesn't tell what it uses during the encode.

My Nvidia Card was always detected correctly without any further settings for me to do. You may check with GPU-Z if your GPU is installed correctly and supports OpenCL.

It seems to use 100% cpu but very little gpu. Is that normal? Also I can't set --opencl-platform to 'NVIDIA CUDA', because it doesn't work.

On modern GPUs the bottlenek is most likely elsewhere, seldom the graphics card itself. So it depends on the system what is taxed most.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2013-06-13 19:16:52
Also I can't set --opencl-platform to 'NVIDIA CUDA', because it doesn't work.

You are probably using single quotes, that only works on UNIX. In windows shell you have to use double quotes: "NVIDIA CUDA"
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2013-06-14 04:08:04
These files in the same folder should work: CUETools.Codecs.FLACCL.dll, CUETools.FLACCL.cmd.exe, CUETools.Codecs.FLAKE.dll, CUETools.Codecs.dll, OpenCLNet.dll

I´m really sorry to have forgotten the file flac.cl you also need.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: mzso on 2013-06-14 12:33:02
These files in the same folder should work: CUETools.Codecs.FLACCL.dll, CUETools.FLACCL.cmd.exe, CUETools.Codecs.FLAKE.dll, CUETools.Codecs.dll, OpenCLNet.dll

I´m really sorry to have forgotten the file flac.cl you also need.

That's a lot of files. I'll just keep it separate from the foobar folder. Would cause too much clutter.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Atak_Snajpera on 2013-06-15 20:05:30
Feature request
1) support for wave64. It was recently added in plain FLAC encoder.
2) support for multiple input files  chunk1.w64 chunk2.w64 chunk3.w64. Encoder should join them on fly.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: yesgrey on 2013-06-23 22:23:07
In  the latest version from 11.06.2013 flacCL is running fine with samplerates up to 96kHz, others i didn´t try.

And again a BIG thanks to Grigory! The speed it crunches these big files is simply stunning!

Unfortunately, I am getting the following message:
File Info : 48000kHz; 6 channel; 24 bit; 00:00:00
Error    : Build failed with error code BUILD_PROGRAM_FAILURE
:34:2: error: #error OpenCL 1.1+ required!
#error OpenCL 1.1+ required!

I never got this with the previous versions, so can I assume Gregory is now using a higher version of OpenCL?

If it is so, it seems that what started as an only NVidia tool is now a non-Nvidia (I have a GT240) working tool...

Any chance of going back to the previous OpenCL version?...
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2013-06-23 22:26:04
I was under impression that OpenCL 1.1 is supported for GT240. Did you try updating the driver?

According to http://www.khronos.org/conformance/adopter...ormant-products (http://www.khronos.org/conformance/adopters/conformant-products), OpenCL 1.1 is supported on:

Code: [Select]
NVIDIA   2010-07-14   OpenCL_1_1
Microsoft Windows Vista or Microsoft Windows 7 with NVIDIA OpenCL Driver on the following devices
Tesla C870
Tesla D870
Tesla S870
GeForce GTS 250
GeForce GTS 150
GeForce GT 130
GeForce GT 120
GeForce G100
GeForce 9800 GX2
GeForce 9800 GTX+
GeForce 9800 GTX
GeForce 9800 GT
GeForce 9600 GSO
GeForce 9600 GT
GeForce 9500 GT
GeForce 9400GT
GeForce 8800 Ultra
GeForce 8800 GTX
GeForce 8800 GTS
GeForce 8800 GT
GeForce 8800 GS
GeForce 8600 GTS
GeForce 8600 GT
GeForce 8500 GT
GeForce 8400 GS
GeForce 9400 mGPU
GeForce 9300 mGPU
GeForce 8300 mGPU
GeForce 8200 mGPU
GeForce 8100 mGPU
GeForce GTS 160M
GeForce GTS 150M
GeForce GT 130M
GeForce G110M
GeForce G105M
GeForce G102M
GeForce 9800M GTX
GeForce 9800M GT
GeForce 9800M GTS
GeForce 9800M GS
GeForce 9700M GTS
GeForce 9700M GT
GeForce 9650M GS
GeForce 9600M GT
GeForce 9600M GS
GeForce 9500M GS
GeForce 9500M G
GeForce 9300M GS
GeForce 9300M G
GeForce 9200M GS
GeForce 9100M G
GeForce 8800M GTS
GeForce 8700M GT
GeForce 8600M GT
GeForce 8600M GS
GeForce 8400M GT
GeForce 8400M GS
..

I don't see GT240 in this list, but i'd be surprised if it's not supported - even more ancient NVIDIA GPUs are.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: bilbo on 2013-06-24 00:43:46
Any chance of going back to the previous OpenCL version?...


You can run a program called GLView that will tell you all the versions of OpenGL that your card will support.

http://www.realtech-vr.com/glview/download.php (http://www.realtech-vr.com/glview/download.php)

Also, the latest drivers can make all the difference. Sometimes the card will support it but the drivers don't.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: yesgrey on 2013-06-24 08:57:17
I was under impression that OpenCL 1.1 is supported for GT240. Did you try updating the driver?

I did, to the latest WHQL ones, and maybe that was the problem...

I was so disappointed with the new build of flaccl not being working that I thought that you would have changed OpenCL to 1.2 to fix any problems, but now I realize that 1.1+ means 1.1 and higher.

One more question. Have you introduced 1.1 with this latest build, or were you already using it before this one? I'm asking this because with the previous builds flaccl always worked, only now it's not working... Thinking more about it, I think I have not tried the previous version since I updated to the latest drivers, so maybe something got broken in the latest ones... I will test with the previous version, and, if it still does not work, I will roll back to the previous drivers...

I don't see GT240 in this list, but i'd be surprised if it's not supported - even more ancient NVIDIA GPUs are.

Yes, I think so too.

You can run a program called GLView that will tell you all the versions of OpenGL that your card will support.

My problems are with OpenCL, but thanks anyway...

Testing with GPU-Z tells that my card only supports OpenCL 1.0, so I think I will try with the previous drivers...
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: yesgrey on 2013-06-24 17:46:20
I will test with the previous version, and, if it still does not work, I will roll back to the previous drivers...

OK, I have tested with previous 2.1.5 release (CUETools.FLACCL.cmd.exe file date 2013-05-09) and it worked fine, so it seems the drivers are not the problem...
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: yesgrey on 2013-06-27 15:15:13
According to http://www.khronos.org/conformance/adopter...ormant-products (http://www.khronos.org/conformance/adopters/conformant-products), OpenCL 1.1 is supported on...

I did a little research about this and it seems that GT240 and all the older models do not support OpenCL 1.1, and even some newer ones.

Read the 2nd post here (https://devtalk.nvidia.com/default/topic/500124/cuda-programming-and-performance/gtx-285-39-s-cl_device_version-is-opencl-1-0-or-opencl-1-1-/).

So, it seems the drivers are labeled as supporting 1.1 but the device only supports 1.0.

However, despite all this, I was so frustrated that your latest version did not work when it seemed that it was finally working right with multiple channels files that I decided to take a look and compare the flac.cl files from the previous and the latest versions. It seemed that no new functions were being used, and I found the if testing the supported OpenCL version. I decided to comment the test of the OpenCL version and... it started working. I then checked the created files and yes, it's correct, the problem with encoding multiple channels files of 48kHz was fixed on this latest version.

I don't know if it would be safe for you to disable the OpenCL 1.1 test at the beginning, but for me it worked fine.

Thanks for this wonderful tool. 
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2013-06-27 16:00:50
Good to know. I was going to suggest the same thing
It looks like the features of OpenCL 1.1 that FLACCL is using are actually present in GT240, but it has been classified as supporting only OpenCL 1.0 due to the lack of some other features that FLACCL doesn't need. I guess i can safely disable this check for the list of known NVIDIA devices of that generation.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: yesgrey on 2013-06-27 22:01:22
I guess i can safely disable this check for the list of known NVIDIA devices of that generation.

Yes, it would be good for other people in a situation like mine... Thanks
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Eli on 2013-07-15 16:52:19
Will FLACCL be updated to 1.3 soon?

Also, I see support has been added for Intel HD. Curious, can you use the GPU part of the CPU even if you have a separate graphics card?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2013-07-15 17:25:23
Yes, i should update or remove the separate FLACCL download to avoid confusion - right now it's out of date compared to the one that comes with CUETools 2.1.5.

Yes, you can use the integrated GPU for OpenCL while using discrete GPU for games, but it's tricky.

I had to do 3 things to make it work on my machine, probably not all of them are required.

1) Enabled integrated graphics in the BIOS
2) Installed Virtu MVP that came with the motherboard
3) Connected both GPUs with my receiver using HDMI

So now i use integrated GPU most of the time, Virtu MVP activates discrete GPU for some games. Some games are not supported by Virtu MVP and don't run well in this setup, but i don't play much.

http://download.gigabyte.asia/FileList/Man...virtu-mvp_e.pdf (http://download.gigabyte.asia/FileList/Manual/mb_manual_virtu-mvp_e.pdf)
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Maurits on 2013-07-15 23:02:03
Isn't it time this thread is renamed?

First of all it doesn't use CUDA anymore so should rather be called "OpenCL enabled FLAC encoder". Should do wonders for people searching for FLAC and OpenCL.
Secondly, it has probably been called FLACCL longer than FlaCuda now so the "prev. FlaCuda" could go...
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: lamedude on 2013-07-16 11:08:10
Win8 allows you to use QuickSync and presumably OpenCL with a discrete card without MVP.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: ktf on 2013-08-02 20:10:22
Hi guys,

Because of this post (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=98665&view=findpost&p=821302) I am planning to incorporate a few other FLAC encoders (including FLACCL) into the next revision of my lossless audio codec comparison (http://icer.nl/losslesstest/). However, the first results are disappointing and confusing. I think I'm doing something wrong. Please see this PDF of the first results in CPU-time (http://www.icer.nl/misc_stuff/30%20Seconds%20to%20Mars%20-%20This%20Is%20War-onlyflac-cpu.pdf) and realtime (http://www.icer.nl/misc_stuff/30%20Seconds%20to%20Mars%20-%20This%20Is%20War-onlyflac-realtime.pdf).

These tests were done with a AMD A4-3400 APU, AFAIK with OpenCL 1.2. I ran it with --slow-gpu because I suspect this GPU is fairly slow and it seemed to be (based on very limited testing) a bit faster. The decoding results for FLACCL were obtained by letting stock FLAC 1.3.0 decode the FLACCL-encoded output.

Why these results? Is it a problem with AMD/ATI? Is the GPU not fast enough? Am I doing something wrong?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2013-08-02 20:13:59
FLACCL was never as good on AMD as it was on NVIDIA - mostly because i don't even have an AMD GPU myself.

Also don't expect any miracles from the integrated graphics. Descrete GPU should do beter.

And, as you can see, FLACCL also aims for higher compression, so it's higher presets are more competitive than lower presets.

Edit: i couldn't see the pdfs at first, but now i can
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: ktf on 2013-08-02 20:16:10
Edit: i couldn't see the pdfs at first, but now i can

You're fast  I made a mistake in the URLs, now fixed.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2013-08-02 20:19:42
One more thing: the first run for each compression level and set of settings takes longer than subsequent ones, because the FLACCL kernels are compiled for your GPU. Later runs use cached binary. So a fair test should 'warm up' the encoder.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2013-08-02 20:20:40
And also, try adding --cpu-threads 1
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: ChronoSphere on 2013-08-02 21:40:25
While we're on this topic... what could be a reason (adding) --cpu-threads 1 is faster than any other count of CPU threads with a 260GTX and an AMD quadcore?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: jensend on 2013-08-02 21:47:01
The A4-3400's GPU is really quite anemic. I wouldn't expect a lot of help from it. I have an A6-5400K, which has a GPU that's at least 50% faster than that one, and I only get a 1/6 speedup doing FLACCL with the GPU rather than CPU only. I bet the A4-3400 is slow enough that it actually slows FLACCL down to try to use the GPU.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: ktf on 2013-08-03 08:04:04
Also don't expect any miracles from the integrated graphics. Descrete GPU should do beter.

The A4-3400's GPU is really quite anemic.

It's not that bad. I have run OpenCL applications on it running BOINC, and when I compare it's results with for example a Geforce GTX 560, it's only about 5 times as slow. If I compare that to the results here (http://www.cuetools.net/wiki/FLACCL), that would mean I would still have to see speeds of about 300x, not the ~100x I'm seeing now. (for that specific application, the GPU outperforms the CPU by a factor of 30... it's really not a bad GPU)

One more thing: the first run for each compression level and set of settings takes longer than subsequent ones, because the FLACCL kernels are compiled for your GPU. Later runs use cached binary. So a fair test should 'warm up' the encoder.

How does that work exactly? I've noticed it takes about 1 second for the progress bar to start showing up, regardless of whether I have just run FLACCL with the same settings or not. Could it be caching is not working properly?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: jensend on 2013-08-03 16:01:28
It's not that bad. I have run OpenCL applications on it running BOINC, and when I compare it's results with for example a Geforce GTX 560, it's only about 5 times as slow. If I compare that to the results here (http://www.cuetools.net/wiki/FLACCL), that would mean I would still have to see speeds of about 300x, not the ~100x I'm seeing now. (for that specific application, the GPU outperforms the CPU by a factor of 30... it's really not a bad GPU)
First, your 1/5 is for a 560 while the graph only shows results for the 580 which is twice as fast at compute. Also, being 1/5 as fast in some particular BOINC app does not translate to being 1/5 as fast in all OpenCL apps, especially because many apps either can't (because of parallel programming problems or because they rely heavily on the special function unit) or don't (because they were written with nV or AMD's newer 7xxx GCN architecture in mind) take advantage of AMD's old VLIW architecture. To an app that can't take advantage of VLIW well, Llano's VLIW5 units could be no faster than a scalar unit. So between these factors- 560 is 1/2 as fast as 580, A4 is 1/5 as fast as 560 for stuff that can saturate VLIW5, stuff that doesn't work well with VLIW can be 1/5 as fast- you're looking at a potential of up to 50x difference between your GPU and the GTX 580.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: ktf on 2013-08-03 17:15:13
Hmm.. okay. I was just wondering whether I could have done something wrong with my setup, but it seems I haven't. In that case, I won't include FLACCL in the comparison, because it is at least very confusing to add to the results and it really doesn't live up to "[the] FLAC format is capable of so much more". At least, not with my gear.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Mangix on 2013-08-03 20:47:49
for me, --slow-gpu provides higher compression than --fast-gpu.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Propheticus on 2013-08-03 23:31:38
When running from a normal HDD as source and output to another HDD it doesn't improve speed over the normal Flac for me. I think the spinning disks read/write might be the bottleneck. Only when I use an SSD as the source disk the speed does increase with FlacCl over regular Flac.
Using --slow-gpu yields better results here too. Even though my GPU is actually a fairly fast AMD HD 6870. In my case using all the cores on my quadcore Intel Q6600 CPU (--cpu-threads 4) works best.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2013-08-04 01:30:47
For --slow-gpu with a i5 anf GTX660ti some albums come out smaller and some bigger here. The difference is not significant. I should run a bigger test corpus when bored some day.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: bilbo on 2013-08-04 14:58:12
It might be helpful to disclose which version of FLACCL is being used in the testing. As Gregory stated earlier: " i should update or remove the separate FLACCL download to avoid confusion - right now it's out of date compared to the one that comes with CUETools 2.1.5."
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: ktf on 2013-08-04 18:21:58
It might be helpful to disclose which version of FLACCL is being used in the testing. As Gregory stated earlier: " i should update or remove the separate FLACCL download to avoid confusion - right now it's out of date compared to the one that comes with CUETools 2.1.5."

If you take a good look at the graphs you can see it's 2.1.5.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Propheticus on 2013-08-05 00:24:06
I downloaded the latest version I could find of the standalone Flaccl (0.3) since I didn't need/want cuetools. Why this would be a less recent version than what is bundled with the cuetools eludes me. I expected these to be the same.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2013-08-05 00:30:57
If you follow the thread you'll see i always test the latest versions bundled with CUEtools. I reported several issues over time to Grigory. Unfortunately the flacCL page at the CUEtools Wiki isn't exactly well documented. This means i sometimes find out it suddenly behaves different without a notice anywhere. I always copy out the needed files to use it with a frontend for my usage.
You need CUETools.Codecs.FLACCL.dll, CUETools.FLACCL.cmd.exe, CUETools.Codecs.FLAKE.dll, CUETools.Codecs.dll, OpenCLNet.dll and flac.cl
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: JuanPabloCuervo on 2013-09-16 18:57:24
Hi,

i just found out about the "new technology", FPGA PCIe OpenCL compatible cards.

have found 3 brands with Altera chips, i like more Xilinx, don´t know why.
http://www.nallatech.com/opencl-fpga-accelerator-cards.html (http://www.nallatech.com/opencl-fpga-accelerator-cards.html)
http://www.bittware.com/opencl-for-altera-fpgas (http://www.bittware.com/opencl-for-altera-fpgas)
http://www.plda.com/products/boards/low-pr...5-lp-he?pid=205 (http://www.plda.com/products/boards/low-profile/altera/xpressgx5-lp-he?pid=205)

http://www.altera.com/products/software/pa...paign=quartus13 (http://www.altera.com/products/software/partners/opencl/opencl-board-partner-index.html?utm_source=press+release&utm_medium=press+release&utm_campaign=quartus13)
http://www.khronos.org/opencl/ (http://www.khronos.org/opencl/)
arround $1000usd.

Im eager to get one of those cards....

look the video at 18:20
FPGA vs. HD7970 vs. Xeon, "15x times faster than GPU."
http://www.youtube.com/watch?v=OAkHjyhJgWk (http://www.youtube.com/watch?v=OAkHjyhJgWk)
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2013-09-17 19:56:34
That's very interesting, but i'm afraid not very practical for FLACCL for a number of reasons - prohibitive cost, tiny potential audience, and finally - unlikely to live up to this 15x promise.
FLACCL on any average discrete GPU already runs faster than disc IO. Any significant improvement would be limited by SSD speed.
And the saddest part - it's just not likely to be that fast on actual tasks such as FLAC compression.
A quick look at the specs of some of those shows significant hardware limitations as compared to GPUs - for example, one of them sports a 72-bit data bus. That's 2-3 times less that your average GPU. And that is what will likely determine the speed on compression tasks.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: JuanPabloCuervo on 2013-09-18 03:34:14
That's very interesting, but i'm afraid not very practical for FLACCL for a number of reasons - prohibitive cost, tiny potential audience, and finally - unlikely to live up to this 15x promise.
FLACCL on any average discrete GPU already runs faster than disc IO. Any significant improvement would be limited by SSD speed.
And the saddest part - it's just not likely to be that fast on actual tasks such as FLAC compression.
A quick look at the specs of some of those shows significant hardware limitations as compared to GPUs - for example, one of them sports a 72-bit data bus. That's 2-3 times less that your average GPU. And that is what will likely determine the speed on compression tasks.


The SSD limitation can be solved....with RAID 0,
but, i thought what makes AMD faster than NVIDIA doing BruteForce stuff *Not Games, it´s because the parallel processing.
FPGA is King, ASIC God.

LuxMark benchmark, crark, Flaccl, hashcat, Bitcoin, etc...
http://www.extremetech.com/computing/15346...-bitcoin-mining (http://www.extremetech.com/computing/153467-amd-destroys-nvidia-bitcoin-mining)

I had AMD, Personally i like more Nvidia, but this new FPGA could be
http://www.luxrender.net/wiki/LuxMark#Download (http://www.luxrender.net/wiki/LuxMark#Download)
http://www.luxrender.net/luxmark/ (http://www.luxrender.net/luxmark/)
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: SigHunter on 2013-10-06 00:35:47
did some testing for myself,

encoding an album of 59 minutes 23 seconds to flac

using the FLACCL from CUETools 2.1.5 (-11 and --fast-gpu)
on a radeon 7970
Results  : 1002,26x; 462606149 bytes in 00:00:03.5547364 seconds;

using flac 1.3.0 64bit build r(-8)
on a xeon E3-1230 v3
Results  : ~77x; 463919480 bytes in ~46 seconds;
(measured with powershell "Measure-Command")

this is impressive, though the CPU-test was just single threaded and i could spawn more parallel encodings during that time

i don't see why there could be a limitation in disk IO, 460 mb in ~4 seconds (~120 mb/s) should be no problem for a normal disc (for me my raidcontroller cache eats most of it)


edit:
what makes it even more impressive is when you add --cpu-threads 4 to the commandline it does cpu+gpu
Results  : 1252,36x; 462606149 bytes in 00:00:02.8448465 seconds;
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: SigHunter on 2013-10-06 01:58:04
edit:
what makes it even more impressive is when you add --cpu-threads 4 to the commandline it does cpu+gpu
Results  : 1252,36x; 462606149 bytes in 00:00:02.8448465 seconds;


can't edit my post, but i read this http://www.hydrogenaudio.org/forums/index....st&p=799962 (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=64628&view=findpost&p=799962) and i know i described it wrong. it still gives better performance tho
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2013-10-06 18:34:37
i don't see why there could be a limitation in disk IO, 460 mb in ~4 seconds (~120 mb/s) should be no problem for a normal disc

If it is a sequential read, and near the start of the disk - this will be about the limit. Which makes speeds higher than 1000x available only with SSD or fast raids.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Mangix on 2013-12-24 19:36:09
Zombie revive!

A new version of FLACCL was released to the Hg repository a while back: http://sourceforge.net/p/cuetoolsnet/code/....FLACCL/flac.cl (http://sourceforge.net/p/cuetoolsnet/code/ci/15f611ba0685d5917a8b778efc3ccbb20d915b3e/tree/CUETools.Codecs.FLACCL/flac.cl)

If you want to try it, just replace the flac.cl from CUETools 2.1.5 in the plugins folder.

That being said, this new version creates bigger files because of this change at line 799:
Code: [Select]
cbits = min(cbits, clz(order + 1) + 1 - shared.task.obits);
. It used to be just "order" instead of "order + 1" and as a result it creates bigger files. Changing it back fixes the issue and still creates non-broken FLAC files(I had issues with Error : unsupported residual coding and a few other errors that created FLAC files which did not decode properly).
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Mangix on 2013-12-27 00:37:30
Can't edit on this forum.

It seems that my previous assertion was incorrect. "order + 1" sometimes creates smaller files and other times just "other" does. It seems to be very content dependent. For example, the files which previously failed to verify usually become smaller with "order" whereas the files which were fine prior to the update tend to be smaller with "order + 1".

Needs more testing.

edit: Looks like the files which gave "Error    : unsupported subframe coding (ch == 1)" are smaller with just order while the "Error    : frame crc mismatch" files become smaller with order + 1.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: moosehunter on 2014-06-24 10:54:58
This is a great encoder, but there are a few issues I have with it.
1. It doesn't copy the vorbis comment block when it encoded. Is there an option to enable this?
2. The initialization, which I assume includes compiling the kernels, takes a while. Because of this, encoding a folder of FLAC tracks can take longer with the GPU than with the CPU (Based off my 4770K and r9 290x). Is there any way to tell one process to encode all the flacs in a folder, replacing each one?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: ChronoSphere on 2014-07-26 18:28:55
Is there any reason I can't reliably use foobar's multiple thread encoding?
It basically spawns 4 instances of flaccl. Memory isn't an issue according to gpu-z (400-500MB out of 896MB used), but about half of the tracks fail to encode with "encoder exited prematurely with code 4"
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2014-07-26 18:41:34
Using 4 instances on a quadcore is for shure great but 4 instances on 1 GPU via OpenCL may not be the best idea.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: ChronoSphere on 2014-07-26 18:53:15
The thing is, it works fine for say, 10 albums. Then I have to restart the PC to make it work again, so something goes wrong.
Running 4 openCL instances gives me a boost of about 50%, so it's not bottlenecking anything. It's more like there is some sort of memory leak except it doesn't show on gpu-z's memory usage.

Also, for some reason, using "--lax -11 --verify - -o %d" (or %s instead of piping) via foobar exits the encoder with code 1, doing the same via command line encodes fine... that's probably a foobar issue.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2014-07-27 00:34:41
I tried with 4 threads in foobar with 24 albums and had no crash. Also "--lax -11 --verify - -o %d" works fine. I use the flacCL files from the 2.15beta, Win7 x64, GTX670.

CUETools.FLACCL.cmd.exe   11.05.2014 20:09
CUETools.Codecs.FLACCL.dll 11.05.2014 20:08
CUETools.Codecs.FLAKE.dll 11.05.2014 20:08
CUETools.Codecs.dll 11.05.2014 20:08
flac.cl 31.12.2013 23:18
OpenCLNet.dll 30.05.2013 22:03
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: saratoga on 2014-07-27 01:18:12
I have seen various driver issues trying to run general purpose computation on a GPU.  Maybe try updating your drivers (or even downgrading them).
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: ChronoSphere on 2014-07-27 13:03:32
Disregard the --lax not working, I somehow had two flaccl encoder presets and the one that was saved as a converter preset was the standalone flaccl.exe. That version didn't have a --lax option yet, hence the error code 1 termination.

I'm not getting crashes with 4 threads at the moment (with either flacuda, old or new flaccl), so I don't know what caused it. Might be a driver issue, my GPU is pretty picky when it comes to that (old 260GTX). Should I get any, I'll try messing around with driver versions, but I doubt it's worth it, considering encoding in 4 threads with the upcoming libflac 1.3.1 is faster than flacCL on my GPU...
Code: [Select]
5:54:53 of music to flac:
2:15 libflac1.2.1  157,7x
1:18 flacCL        272,9x
1:10 flac64_d      304,18x
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Mangix on 2014-07-28 02:43:49
The thing is, it works fine for say, 10 albums. Then I have to restart the PC to make it work again, so something goes wrong.
Running 4 openCL instances gives me a boost of about 50%, so it's not bottlenecking anything. It's more like there is some sort of memory leak except it doesn't show on gpu-z's memory usage.

Also, for some reason, using "--lax -11 --verify - -o %d" (or %s instead of piping) via foobar exits the encoder with code 1, doing the same via command line encodes fine... that's probably a foobar issue.

you could try updating the opencl kernel. There was a bugfix for it: http://sourceforge.net/p/cuetoolsnet/code/commit_browser (http://sourceforge.net/p/cuetoolsnet/code/commit_browser)

Basically, it was producing broken files at -11 --fast-gpu.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: ChronoSphere on 2014-07-28 11:10:26
If you look at the commit date, that change is from 2013-10-15, while the flac.cl file in the latest cuetools beta is from 2013-12-31, so the change is already included. It wasn't the issue anyway just me using an old exe.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Mangix on 2014-07-28 19:35:35
despite the date, cuetools 2.1.5 still includes the old version. you can verify this by running a diff between them.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: ChronoSphere on 2014-07-28 20:39:25
You're right; I even re-downloaded the archive from the site and the flac.cl file is not up to date... the dangers of using a developer version, eh?

edit: typos
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2014-07-29 00:30:29
I lately compiled the needed flacCL files at 30.06 if anyone is interested.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Sparktank on 2014-07-29 03:18:52
I lately compiled the needed flacCL files at 30.06 if anyone is interested.


I would be interested.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2014-07-29 03:37:37
There you go: http://www.hydrogenaud.io/forums/index.php?showtopic=106446 (http://www.hydrogenaud.io/forums/index.php?showtopic=106446)
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Sparktank on 2014-07-29 18:11:09
There you go: http://www.hydrogenaud.io/forums/index.php?showtopic=106446 (http://www.hydrogenaud.io/forums/index.php?showtopic=106446)


Thanks a lot!

I had been wondering about this one a lot. I was worried all the official sites were too outdated.
Though, it shouldn't stop me from learning to compile it myself.

NVidia just updated it's WQHL drivers today, too.
So I think I'll set some times aside to have fun with this.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: moosehunter on 2014-07-30 06:46:44
I just tried some benchmarks with an overclocked r9 290, and the CPU is the bottleneck. With -11 I'm getting over 2300x realtime encoding speed. It took less than 16 seconds to encode 10 hours of audio. -0 and -8 both get about 2500x. The CPU (4770K @ 4.4 GHz) actually appears to be the bottleneck. The encoder won't use more than 2 or 3 cores depending on if --fast-gpu is enabled or not. Enabling --no-md5 and --no-seektable gets the speed of -11 up to 2550x, -8 to 5000x, and -0 to 6200x. That means it took less than 5.9 seconds to encode a 10 hour audio file. Not bad for a GPU that cost $200. Anybody know anything else to reduce the work done by the CPU threads?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: ChronoSphere on 2014-07-30 11:33:36
*looks at his puny 270x encoding speed*
Those numbers are insane. A question though, were the files you tested CD images or single tracks?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: moosehunter on 2014-07-30 20:26:24
*looks at his puny 270x encoding speed*
Those numbers are insane. A question though, were the files you tested CD images or single tracks?

I was using a 10 hour long audio file for testing. Anything shorter would have encoded too quickly.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: ChronoSphere on 2014-07-30 21:45:42
It's just that my tests showed encoding 6h of separate tracks is slower than encoding one 6h long file.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: moosehunter on 2014-07-31 00:40:27
It's just that my tests showed encoding 6h of separate tracks is slower than encoding one 6h long file.

Compiling the kernels does take some time.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: tubetubby on 2015-04-06 10:54:05
Hello everybody.
1st of all many thanks to Gregory for CUETOOLS.FLACCL, its awesome.

I am getting impressive encoding results with version 2.1.6 and using a nVIDIA GTX 980 (MSI 4G Gaming).

Source file: audio.wav, 16bit 310 MByte.

CUETools.FLACCL.cmd.exe -8 --opencl-type GPU --opencl-platform "NVIDIA CUDA" audio.wav -o audio-FLACCL-GPU-8.flac
Results : 784,59x; 107929761 bytes in 00:00:02.2464040 seconds;

CUETools.FLACCL.cmd.exe -11 --lax --opencl-type GPU --opencl-platform "NVIDIA CUDA" audio.wav -o audio-FLACCL-GPU-11.flac
Results : 610,71x; 107240029 bytes in 00:00:02.8860051 seconds;

Generated output files:
107.240.029 audio-FLACCL-GPU-11.flac
107.929.761 audio-FLACCL-GPU-8.flac

Comparison to normal FLAC program:
flac-eac.exe -f audio.wav -o audio-FLAC-5.flac (~8 Sec)
flac 1.2.1, Copyright © 2000,2001,2002,2003,2004,2005,2006,2007  Josh Coalson
audio.wav: wrote 109444345 bytes, ratio=0,352

flac-eac.exe -8 -f audio.wav -o audio-FLAC-8.flac (~23 Sec)
audio.wav: wrote 108639615 bytes, ratio=0,349

So if I compare now old FLAC encoder with FLACCL, then these are the differencies in time and file size.
FLAC -8:          23,0 Sekunden, 108.639.615 Bytes
FLACCL -11:      2,8 Sekunden,  107.240.029 Bytes (with GPU Support, GTX980)

The only remaining major problem that I have is, that I can't get FLACCL to work as format converter in MusicBee, my favorite Music manager.

All that it tells me in the status column: "Fehlgeschlagen: No output file was produced: check the encodeing command line parameters which may be incorrectly configured in the File Converter preferences"

I use currently these setting which are tested on Commandline (DOS Box):
-q -8 --opencl-type GPU --opencl-platform "NVIDIA CUDA" - -o [outputfile]

I copied the executeable and all DLLs from the 7z archive to MusicBees codec directory, where all converter reside.
I even copied all DLLs to the Windows system directory and restarted as I thought maybe it has to do with DLL issues.
If I didn't make a nasty mistake, which I do not believe, then I am clueless how to make it to work.

Gregory, would it perhaps be possible to produce a statically linked executeable, where everything is in one exe file ?

Another suspicion is, that the commandline gets stored in XML format, it looks in the MusicBee ini file like this:
<EncodingParameters>-q -8 --opencl-type GPU --opencl-platform &quot;NVIDIA CUDA&quot; - -o [outputfile]</EncodingParameters>

Could it be the case that this "&quot" is somehow disturbing ?
Would it be possible, that you change the commandline option to something without a space in the option, so that it could look like this:
<EncodingParameters>-q -8 --opencl-type GPU --opencl-platform nvCUDA - -o [outputfile]</EncodingParameters>
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: lvqcl on 2015-04-06 16:37:00
You need the following files:

flac.cl
CUETools.Codecs.dll
CUETools.Codecs.FLACCL.dll
CUETools.Codecs.FLAKE.dll
OpenCLNet.dll
CUETools.FLACCL.cmd.exe

You can also add --ignore-chunk-sizes  option.

Also, I'm not sure that --opencl-type and --opencl-platform are necessary in your case.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: tubetubby on 2015-04-06 17:54:48
You need the following files:

flac.cl
CUETools.Codecs.dll
CUETools.Codecs.FLACCL.dll
CUETools.Codecs.FLAKE.dll
OpenCLNet.dll
CUETools.FLACCL.cmd.exe

You can also add --ignore-chunk-sizes  option.

Also, I'm not sure that --opencl-type and --opencl-platform are necessary in your case.


Hurray it works now, many thanks. I didn't know that flac.cl is also required.
I only need to identify now which the proper location for the DLLs / flac.cl file is ...
I copied it now to these 4 locations in the hope something will work...

C:\Program Files (x86)\MusicBee\Codec
C:\Program Files (x86)\MusicBee
C:\Windows\System32
C:\Windows\SysWOW64

Many thanks !
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: tubetubby on 2015-04-06 18:16:09
Other question, how "error proof" is this converter ?

Do you use it for your "production use" ? Does it have the maturity of the normal flac converter ?

Somebody in another forum "claimed" this software would be relatively old ... am not sure about this.

Is FLACCL 2.6.1 based on the most up to date FLAC sources ?

Would you convert 6000+ files from .ape to .flac with FLACCL 2.6.1 ?

What is the exact purpose of --verify ? Does it validate 100% that the FLAC file results in the same .wav file ?
Would it change the exit status of the converter so that an Application like MusicBee would get knowledge
that something went wrong during conversion ?
I intend to make a full run under MusicBee and enable the option to overwrite the .ape "sources".
Afterwards it will be impossible for me to validate, whether conversion of all 6000+ files are really ok.

So .. based on this information, is FLACCL mature and stable enough like flac v1.2.1 from Josh Coalson ?

Many thanks for giving me an advice for this.


Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2015-04-06 19:27:19
Short answer: of course it is not as mature as reference libFLAC. There have been at least three instances of bugs that caused invalid compression. All known bugs are fixed at this point, but there's always a chance there's still an unknown bug lurking somewhere. Almost all of the bugs had to do with high-res audio and/or compression levels 9-11 though, the standard cd audio with compression levels 0-8 is much more mature.

I would recommend using --verify at all times, if for nothing else then just for the fact that there can always be errors caused by overclocked, overheated or defective GPU - those are on average somewhat less reliable that CPUs.

--verify guarantees that each encoded frame can be decoded using the same software (cuetools.flake).

Personally, i use for "production use" with  --verify;

You have to make sure the calling software correctly detects the non-zero return code from encoder though.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: tubetubby on 2015-04-06 20:01:20
Thanks a lot for your kind response. I posted a summary in the MusicBee forum, how you can bring it to work.
http://getmusicbee.com/forum/index.php?top...g92043#msg92043 (http://getmusicbee.com/forum/index.php?topic=15469.msg92043#msg92043)

I played around with different # of encoder settings, with 6-9 you can convert fastest. 6 appears to be for me the best setting not to load the system too much, as the delta of converted files decreases with each converter more.

I found out that the normal flac converter needs 65% more time to convert 314 ape files to flac using MusicBee.
The space consumption is about the same.

I am running out of time today, so tests with -verify are not possible for my anymore.

Many thanks for this nice converter, I like OpenCL and to offload some work to the GPU which is mostly idle.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: acmodeu on 2015-04-25 11:03:52
I upgraded to FLACCL 2.1.6 on GTX 970 (Forceware 350.12). When I try to encode test file i get the following error:
Quote
CUETools.FLACCL.cmd.exe -11 --lax test.wav
Error: no opencl platforms found.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Elbart on 2015-04-26 17:30:29
Was it working with a previous cuetools-version or driver-version with that card?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: acmodeu on 2015-04-27 17:28:30
Yes, it is working with the same gpu+drivers and flaccl 2.1.5 just fine.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Isabelxxx on 2015-05-13 15:58:18
Hi Gregory, have been following yours and the fpflac implementation (http://www.hydrogenaud.io/forums/index.php?showtopic=76193&st=100) and noted there is one important missing feature (at least for me): the --test option.

Checking an existing flac file like you do with  -v option but without the wav requirement and no output, just verifying if the calculated MD5 matches the stored signature.
I suppose in your implementation the idea would be a bit different than the work you have been done up to now since the point is not checking if the output matches the input with your new gpu encoding but making use of the GPU to calculate faster the MD5 hash, independent of the flac "enconding".

Just with that and a batch file you would make an entire 3TB audio database verification a matter of minutes instead of hours.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2015-05-13 16:00:39
GPU is not very good at decoding flac or calculating MD5 hash.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Isabelxxx on 2015-05-13 16:54:42
Have seen GPU being used for hash calcs (https://hashcat.net/oclhashcat/), but wasn't sure for the decoding part... so that would fit better in fpflac, don't you?

On the other hand, your implementation also uses multiple CPUs with the right options, could something along those lines work?
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Mangix on 2015-06-16 02:18:59
Have seen GPU being used for hash calcs (https://hashcat.net/oclhashcat/), but wasn't sure for the decoding part... so that would fit better in fpflac, don't you?

On the other hand, your implementation also uses multiple CPUs with the right options, could something along those lines work?

hashcat calculates multiple hashes separately. with flac you hash all the data serially. hence it is slow.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Rollin on 2015-06-16 02:55:19
Checking an existing flac file like you do with  -v option but without the wav requirement and no output, just verifying if the calculated MD5 matches the stored signature.
I suppose in your implementation the idea would be a bit different than the work you have been done up to now since the point is not checking if the output matches the input with your new gpu encoding but making use of the GPU to calculate faster the MD5 hash, independent of the flac "enconding".

Did you try Audiotester (http://vuplayer.com/other.php)? It can use multiple cores of CPU.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: xtemp09 on 2015-07-27 20:52:49
I finally found the support page.  =)

Might I ask for a feature - ReplayGain calculation? Typically, people, who create lossless audio, don't have the opportunity of tuning sensitivity; consequently lossless audio is quiet/loud. Normalization will increase noise and distortion, therefore ReplayGain is the lesser evil here.

P.S.
Downloaded flacCL from here (http://www.hydrogenaud.io/forums/index.php?showtopic=106446&view=findpost&p=903939) (), found:

CUETools FLACCL 2.1.6, Copyright © 2010-2013 Grigory Chudov.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: xtemp09 on 2015-07-31 16:22:14
FlacCL refuse to convert WAV with 8-bit/22.05 kHz.

flacCL from here (http://www.hydrogenaud.io/forums/index.php?showtopic=106446&view=findpost&p=903939).
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: xtemp09 on 2015-11-17 15:09:02
CUETools doesn't support 24-bit/192 kHz (even 2.1.6).
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2015-11-17 19:24:00
This critic came up more than once but CUEtools is doing fine since it is created to handle cds. You may use the flac encoders standalone for other samplerates.
Title: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: DVS on 2015-11-22 23:15:17
I would recommend using --verify at all times...

Why is the default setting, this option is off?
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: cdltbz on 2016-01-17 20:33:16
Hello everyone,

I've been playing with flaccl (2.1.6) on my laptop (Windows 7 Pro 64, I5 4200M, Nvidia GTX 760M, 8 GB RAM, 3 SSD drives) but can't seem to be able to obtain proper encoding time improvement over the regular FLAC encoder.

My NVIDIA drivers are up-to-date.

I'm doing this in Foobar and my test file is a 700 MB wav file (classical music).


Command line: "C:\Program Files (x86)\FLACCL_2.1.6\FLACCL\CUETools.FLACCL.cmd.exe" -8 - -o "Image.flac" --verify --opencl-type GPU --opencl-platform "NVIDIA CUDA" --ignore-chunk-sizes
Track converted successfully.
Total encoding time: 0:22.449, 185.39x realtime

Command line: "C:\Program Files\Flac\flac.exe" -s --ignore-chunk-sizes -8 - -o "Image.flac"
Track converted successfully.
Total encoding time: 0:22.885, 181.86x realtime


I noticed that GPU usage only goes up to ~44% using flaccl. So I'm thinking there's a bottleneck somewhere.
Also, if instead of one long file I use separate tracks, both encoders go faster thanks to using all CPU threads, but max GPU usage stays the same. And in that situation flaccl is about 25% slower than the regular encoder.

I've read almost the whole thread, tried most options (which never led to any significant difference), tried loading the file in ram-disk, tried having the original file on one SSD and writing the resulting file on another, etc. I still can't seem to make it work any faster.

BTW, the laptop is plugged to the mains and the energy setting is set to max performance of course.

Do you guys have any idea about this ?

Thanks.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2016-01-18 00:51:54
can't seem to be able to obtain proper encoding time improvement over the regular FLAC encoder.
Are you expecting improvement when comparing them at the same compression level (-8) or at the same compression ratio/output size? Because compression ratio for flac -8 is probably close to compression ratio of flaccl -5 or something like that. I purposely made -8 quite slow - it's purpose is to achieve better compression, not necessarily to be faster.

I noticed that GPU usage only goes up to ~44% using flaccl. So I'm thinking there's a bottleneck somewhere.
That is quite possible and it's probably in the way flaccl utilizes GPU resources. The sad part about hardware accelerated algorithms, is they have to be precisely tuned for a particular hardware architecture to be effective (or sometimes to even work at all). I don't believe i ever got the chance to tune it for NVIDIA 7XX lineup.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: cdltbz on 2016-01-18 12:22:49
Are you expecting improvement when comparing them at the same compression level (-8) or at the same compression ratio/output size? Because compression ratio for flac -8 is probably close to compression ratio of flaccl -5 or something like that. I purposely made -8 quite slow - it's purpose is to achieve better compression, not necessarily to be faster.

Well, I was expecting improvement at the same -8 setting. But I just tried encoding the same file with flaccl at -5 and :

Total encoding time: 0:19.204, 216.72x realtime

Faster, but we're far from the x700 + I was expecting  ;)

I also tried with setting -0 for both encoders :

FLAC
Total encoding time: 0:07.067, 588.93x realtime

FLACL
Total encoding time: 0:15.787, 263.63x realtime

Weird isn't it ?

The sad part about hardware accelerated algorithms, is they have to be precisely tuned for a particular hardware architecture to be effective (or sometimes to even work at all). I don't believe i ever got the chance to tune it for NVIDIA 7XX lineup.

I didn't realize it would be that dependent on hardware. I guess that explains it.

Even though it is therefore of no use to me, I thank you for putting in the time and effort to develop such a piece of software. Such a great idea.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Atak_Snajpera on 2016-03-16 16:55:07
Why --device-id switch is not present in FlacCL?
What device will FlacCL use if user has AMD APU+AMD dedicated GPU?
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Ferongr on 2016-03-23 03:27:27
I got myself a snazzy new AMD R9 390 and decided to play with FLACCL. CPU is a quad-core i5-3570 (non-K, stock speeds) and the filesystem resides in an SSD drive. The --cpu-threads switch provides a huge speedup (more than doubles encoding speed) set for 2 threads. 3 and 4 threads actually seem to slow down encoding slightly compared to using 2 threads. GPU drivers are latest Crimson non-WHQL.

Code: [Select]
C:\output>CUETools.FLACCL.cmd.exe Image.wav
CUETools FLACCL 2.1.6, Copyright (C) 2010-2013 Grigory 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  : Image.wav
File Info : 44100kHz; 2 channel; 16 bit; 02:29:57.3500000
Device    : Hawaii, Platform: "AMD Accelerated Parallel Processing", Version: Op
enCL 2.0 AMD-APP (2004.6), Driver: 2004.6 (VM)

Run 1 Results   : 833.97x; 1118786860 bytes in 00:00:10.7886170 seconds;
Run 2 Results   : 834.12x; 1118786860 bytes in 00:00:10.7866170 seconds;
Run 3 Results   : 833.66x; 1118786860 bytes in 00:00:10.7926173 seconds;

Code: [Select]
C:\output>CUETools.FLACCL.cmd.exe --cpu-threads 2 Image.wav

Run 1 Results   : 1737.85x; 1118786860 bytes in 00:00:05.1772961 seconds;
Run 2 Results   : 1734.16x; 1118786860 bytes in 00:00:05.1882968 seconds;
Run 3 Results   : 1730.83x; 1118786860 bytes in 00:00:05.1982973 seconds;

Code: [Select]
C:\output>CUETools.FLACCL.cmd.exe --cpu-threads 3 Image.wav

Run 1 Results   : 1725.18x; 1118786860 bytes in 00:00:05.2152983 seconds;
Run 2 Results   : 1726.51x; 1118786860 bytes in 00:00:05.2112981 seconds;
Run 3 Results   : 1724.52x; 1118786860 bytes in 00:00:05.2172984 seconds;

Code: [Select]
C:\output>CUETools.FLACCL.cmd.exe --cpu-threads 4 Image.wav

Run 1 Results   : 1724.85x; 1118786860 bytes in 00:00:05.2162984 seconds;
Run 2 Results   : 1721.55x; 1118786860 bytes in 00:00:05.2262990 seconds;
Run 3 Results   : 1723.86x; 1118786860 bytes in 00:00:05.2192985 seconds;

Compared to Flake

Code: [Select]
C:\output>CUETools.Flake.exe Image.wav
CUETools.Flake, Copyright (C) 2009-2014 Grigory Chudov.
Initially based on Flake encoder by Justin Ruggles.
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  : Image.wav
File Info : 44100kHz; 2 channel; 16 bit; 02:29:57.3500000

Run 1 Results   : 231.13x; 1118353797 bytes in 00:00:38.9282265 seconds;
Run 2 Results   : 229.93x; 1118353797 bytes in 00:00:39.1302381 seconds;
Run 3 Results   : 230.75x; 1118353797 bytes in 00:00:38.9912302 seconds;
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Isabelxxx on 2016-03-29 20:07:32
Hi gregory

Would like to report a strange behaviour sometimes I got with Flaccl, something like this:

Quote
1 out of 2 tracks converted with major problems.

Source: "H:\Musica_vinilo\Samsara Blues Experiment\SBE12COTSMB96\Samsara Blues Experiment-2012-Center Of The Sun-Midnight Boogie (EP, WIS-3512, World In Sound)\Samsara Blues Experiment - Center Of The Sun-Midnight Boogie (EP, WIS-3512).cue" / index: 1
  An error occurred while writing to file (The encoder has terminated prematurely with code 3 (0x00000003); please re-check parameters) : "H:\Musica_vinilo\Samsara Blues Experiment\SBE12COTSMB96\Samsara Blues Experiment-2012-Center Of The Sun-Midnight Boogie (EP, WIS-3512, World In Sound)\01 - Center Of The Sun.flac"
  Additional information:
  Encoder stream format: 96000Hz / 2ch / 24bps
  Command line: "c:\Program Files (x86)\foobar2000\encoders\CUETools.FLACCL.cmd.exe" -q -8 --ignore-chunk-sizes  --cpu-threads 1 --opencl-type GPU --opencl-platform "NVIDIA CUDA" --verify - -o "01 - Center Of The Sun.flac"
  Working folder: H:\Musica_vinilo\Samsara Blues Experiment\SBE12COTSMB96\Samsara Blues Experiment-2012-Center Of The Sun-Midnight Boogie (EP, WIS-3512, World In Sound)\
 
  Conversion failed: The encoder has terminated prematurely with code 3 (0x00000003); please re-check parameters
Source: "H:\Musica_vinilo\Samsara Blues Experiment\SBE12COTSMB96\Samsara Blues Experiment-2012-Center Of The Sun-Midnight Boogie (EP, WIS-3512, World In Sound)\Samsara Blues Experiment - Center Of The Sun-Midnight Boogie (EP, WIS-3512).cue" / index: 2
  Track converted successfully.

Quote
Source: "H:\Musica_vinilo\Samsara Blues Experiment\SBE10LDT96\Samsara Blues Experiment-2010-Long Distance Trip (LP, WIS-3505, World In Sound)\Samsara Blues Experiment - Long Distance Trip (LP, WIS-3505).cue" / index: 4
  An error occurred while writing to file (The encoder has terminated prematurely with code 3 (0x00000003); please re-check parameters) : "H:\Musica_vinilo\Samsara Blues Experiment\SBE10LDT96\Samsara Blues Experiment-2010-Long Distance Trip (LP, WIS-3505, World In Sound)\04 - Wheel Of Time.flac"
  Additional information:
  Encoder stream format: 96000Hz / 2ch / 24bps
  Command line: "c:\Program Files (x86)\foobar2000\encoders\CUETools.FLACCL.cmd.exe" -q -8 --ignore-chunk-sizes  --cpu-threads 1 --opencl-type GPU --opencl-platform "NVIDIA CUDA" --verify - -o "04 - Wheel Of Time.flac"
  Working folder: H:\Musica_vinilo\Samsara Blues Experiment\SBE10LDT96\Samsara Blues Experiment-2010-Long Distance Trip (LP, WIS-3505, World In Sound)\
 
  Conversion failed: The encoder has terminated prematurely with code 3 (0x00000003); please re-check parameters

It's not related to any specific input and happens randomly; If I try to convert again the problematic files it works.
Have to add I only convert hires files in foobar (since Cuetools can not handle them..); so maybe it's a problem with hires.

EDIT:
I use multiple threads (up to 6) via foobar options. So 6 encoding processes are supposed to be working at the same time.

Operating System:   Windows 7 Ultimate, 64-bit (Service Pack 1)
DirectX version:   11.0
GPU processor:      GeForce GTX 960
Driver version:      361.43
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2016-03-29 21:20:53
All HiBitrate files up to 192kHz i encoded the last years with the recent flacCL did not cause any error. I don't use foobar.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2016-03-29 21:27:33
Strage. Code 3 means encoder aborted even before it started compression, while parsing arguments and setting up things. Maybe it was lacking some kind of resources, such as memory on the GPU - make sure you don't run many encoders in parallel (which is what fb2k tries to do by default)
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Isabelxxx on 2016-03-30 00:16:40
The strange thing is it happens randomly as I say. I can not relate the problem to anything specific. And for sure it never happened to me with any other encoder using parallel encoding ( 6 or even more).

The gpu is not used for anything more and I have plenty of free RAM. I'm currently trying to reproduce the same problems with only 1 encoder as you suggest.

Will try different scenarios forcing the number of encoders in parallel and the amount of free ram. Hires support in Cuetools would help though.
Meanwhile I will try using the encoder directly via batch files.

Btw if there is a problem with parallel encoding then foobar itself has a flaw since the program is not supposed to force encoding at any cost. i.e. if some encoder provides wrong output due to memory/processor limitations then it should automatically adjust the encoding to the real workload.
The "expected usage" is to wait until the resources can be used by the current encoding task, not just a crash and continue with more encoding tasks.
If that's what is happening here, then nothing to do with you. But it would be helpful to have some further evidence backed by someone else, not just me.

EDIT: rereading the post, I wonder how the GPU memory is being managed at all by foobar (?).
I mean, I never had any problem with RAM with "common" encoders but then maybe the foobar core was thought to work with system RAM not GPU memory.
If there's where the problem lies ,at some point it's needed some check to wait before encoding; but... should it be done by foobar or the encoder itself in this particular case?

All this is speculation, will perform those test and I'm open to suggestion. I have been noticing this problem since the first day Hires was "well" implemented.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2016-03-30 00:23:28
When dealing with command line encoders, there's no way for fb2k to negotiate with the encoder how many instances should run. So it just has a global "Thread count" setting. Would be nice of course if it was per-encoder.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Isabelxxx on 2016-04-11 13:07:40
Have a workaround and it's using temp files instead of pipes but then all the performance improvements are gone.

And using bat files to use multiple instances is the same since the encoder can not read flac as input so... nothing gained there. I wonder if I can use sox or something like that for pipes and do the same than foobar is doing.

The only other possibility was using FLACCL via cuetools but then hi res files are not supported. (and I don't think you can use multiple threads there too)

Finally using multiple flac CPU encoders is faster than 1 GPU encoder for multiple files. So while FLACCL is clearly an improvement the implementation is limited and the performance improvements are lost in many common scenarios.

Don't take as a negative comment but an honest critic (not specifically to you), since it's a pity seeing no more coordination between developers to have this implemented in a better way. This should have gained much more attention and repercussion. And I would consider encoders to be more important in foobar development than another eyecandy WHS script.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2016-04-11 19:20:07
I'm not trying to replace all flac encoders in the world with GPU accelerated ones. There are use cases where it makes sense, and cases where not so much. Honestly, i was more interested in just providing a proof-of-concept and i'm still hoping that it will get noticed and integrated in solutions where it does make sense.

I was also curious to see how much i can improve the compression ratio having so much computational power at my disposal. Results looked good at first (it does sufficiently better than reference FLAC), but eventually CPU based encoder (CUETools.Flake) has caught up by being smarter instead of using brute force.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Isabelxxx on 2016-04-11 20:32:07
While I agree with your concerns I don't have the optimism you seem to have about things being developed by others just because they are clearly better if you show a proof-of-concept.

2016. Flac is capable of working with 32 bit files but no encoder can made those files. ALL DAWs work at 32 bit float. You would think with the computational power we have we would store files always in a compressed way to save space... but no, use wav for that. Just because.... well people has no argument. If I ask for 32 bit flac the thread gets locked. People in this forum can not differentiate between listening convenience and other uses audio and file formats have.
https://hydrogenaud.io/index.php/topic,83520.0.html

2016. No official or supported multithreaded encoder yet. (many attempts now forgotten)

No 64 bits encoders yet. It's a proved fact 64 bits software is faster in 64 bits environments. There are threads in this forum showing it.

Traders little helpers was one of those great softwares which are now abandonware. 2016 and you are stuck to create ffp ASCI files even when Unicode is the standard now.

While everybody have plenty of RAM, Ram Disk is still not being used in ABX in foobar for ex. And the reason is simple... with mechanical Hard disks sometimes there is a delay while changing tracks when using wav and big files, rendering the ABX useless since you can now something changed according to that. That simple solution would solve it... you can imagine the answer gave to my suggestion too.

etc.

I'm really pessimistic about the idea that improvements will eventually be used when developers don't care about its real implementation.
Anyone can say you have reached your goals, and provided excellent results. But I can assure you this will not be used unless you make that effort to implement it and reach other developers IMO.

It has been 7 years since you started this project for ex... you can analyze the impact it had outside this forum. Or how foobar has been adapted for it or other frontends. Except Cuetools, but that's yours.

I was also curious to see how much i can improve the compression ratio having so much computational power at my disposal. Results looked good at first (it does sufficiently better than reference FLAC), but eventually CPU based encoder (CUETools.Flake) has caught up by being smarter instead of using brute force.
Would be interesting to see a mixture of both and don't focus only in specific hardware. GPU could be used as an additional thread to CPU if the encoder manages the multi-threading; thus effectively using both. You already have the code for that in fact, only needed to call this routine or the one you use in flake for files according to the CPU/GPU usage.

Anyway I don't want to tire you with my POV. You already did what you aimed as you said. Thank you!
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: saratoga on 2016-04-11 20:51:24
Flac is capable of working with 32 bit files but no encoder can made those files. ALL DAWs work at 32 bit float.

FLAC doesn't support 32 bit float, so no surprise you can't use it.  IMO if you need to save intermediate files used for audio work, FLAC is an ok choice, but there are probably better options.  FLAC is most useful for distribution because of its widespread compatibility and low computational complexity. 

If I ask for 32 bit flac the thread gets locked. People in this forum can not differentiate between listening convenience and other uses audio and file formats have.
https://hydrogenaud.io/index.php/topic,83520.0.html

I think that thread was locked because you bumped an old thread to quote a 2.5 year old post in order to complain about an unrelated problem.  You're welcome to start a new thread though if you still have questions, but it will annoy people if you stick things at the end of existing threads inappropriately.

2016. No official or supported multithreaded encoder yet. (many attempts now forgotten)

I don't think there is much interest in a multithreaded FLAC encoder, since the primary use of FLAC (distribution) typically uses multiple tracks, whereas a multithreaded encoder would make more sense for encoding/editing single tracks. 

No 64 bits encoders yet. It's a proved fact 64 bits software is faster in 64 bits environments. There are threads in this forum showing it.

You can download 64 bit flac encoders from the flac project page. 

I'm really pessimistic about the idea that improvements will eventually be used when developers don't care about its real implementation.

I think people don't care about many of the things you are suggesting because they are unusual or in some cases not the preferred way for most people to do things.  If you want to do unusual things, you may find that not many other people are interested.  That is just how it works.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Case on 2016-04-12 07:56:12
When dealing with command line encoders, there's no way for fb2k to negotiate with the encoder how many instances should run. So it just has a global "Thread count" setting. Would be nice of course if it was per-encoder.
The converter has an option to limit specific encoders to run in a single thread, which should be appropriate option for most if not all cases where multiple instances are problematic. It's a perfect setting for FLACCL at least.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Case on 2016-04-12 08:26:18
You would think with the computational power we have we would store files always in a compressed way to save space... but no, use wav for that.
WavPack supports lossless compression of 32-bit floating point. Use the right tool for the job at hand.

2016. No official or supported multithreaded encoder yet. (many attempts now forgotten)
FLACCL is multithreaded and can utilize all your CPU cores while encoding a single file.

No 64 bits encoders yet. It's a proved fact 64 bits software is faster in 64 bits environments. There are threads in this forum showing it.
There are 64-bit encoders but they aren't necessarily faster. 32-bit versions often contain hand-written assembly optimizations that allow them to be faster.

Traders little helpers was one of those great softwares which are now abandonware. 2016 and you are stuck to create ffp ASCI files even when Unicode is the standard now.
I don't see the point in creating ffp files at all. That if anything seems like an artifact from some dark ages.

While everybody have plenty of RAM, Ram Disk is still not being used in ABX in foobar for ex. And the reason is simple... with mechanical Hard disks sometimes there is a delay while changing tracks when using wav and big files, rendering the ABX useless since you can now something changed according to that. That simple solution would solve it... you can imagine the answer gave to my suggestion too.
If you have enough memory the files are cached and there's absolutely no difference in behavior. If you don't have enough memory trying to store stuff in memory would just result in swapping.

It has been 7 years since you started this project for ex... you can analyze the impact it had outside this forum. Or how foobar has been adapted for it or other frontends. Except Cuetools, but that's yours.
foobar2000 implemented required changes in Converter to easily run FLACCL in a single instance only.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Atak_Snajpera on 2016-12-04 18:56:58
I do not know why but every time when I use FlacCL sound in encoded FLAC is extremely distorted! I checked both versions 2.1.5 and 2.1.6.

Command
FLACCL.cmd.exe -o "audio.flac" -b 512  --opencl-platform "Intel(R) OpenCL" --opencl-type CPU --cpu-threads 1 "audio.wav"

Source WAV and encoded FLAC if you want to check on your PC
http://www.mediafire.com/file/dzuvokkj64zcnn6/audio_files.7z

Also FlacCL crashes with --verify command
(http://i.cubeupload.com/JM0wzl.png)
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: bennetng on 2016-12-05 13:44:42
I did not try to use it with iGPU but the settings below work for me in foobar's commandline converter.

Radeon HD5750, i3-540:
Code: [Select]
-q -9 --verify --slow-gpu --task-size 256 --cpu-threads 2 - -o %d

GeForce GTX950, i3-4160:
Code: [Select]
--verify --task-size 256 --cpu-threads 2 - -o %d
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2016-12-05 14:48:42
The first hit in google:
"Xeon E5-2690 v3 doesn't report correct OpenCL Max Compute Units"
In relation to Visual Studio. It might be a bug around that.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Atak_Snajpera on 2016-12-05 16:21:03
The first hit in google:
"Xeon E5-2690 v3 doesn't report correct OpenCL Max Compute Units"
In relation to Visual Studio. It might be a bug around that.

OpenCL reports 16 CU. The same distorted audio creates AMD platform.

Code: [Select]
Platform 0. 
    Name             : AMD Accelerated Parallel Processing
    Vendor           : Advanced Micro Devices, Inc.
    Version          : OpenCL 1.2 AMD-APP (937.2)
    Profile          : FULL_PROFILE
    Extensions       : cl_khr_icd cl_amd_event_callback cl_amd_offline_devices cl_khr_d3d10_sharing

Platform 1.
    Name             : Intel(R) OpenCL
    Vendor           : Intel(R) Corporation
    Version          : OpenCL 1.2 
    Profile          : FULL_PROFILE
    Extensions       : cl_khr_icd cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_depth_images cl_khr_3d_image_writes cl_intel_exec_by_local_thread cl_khr_spir cl_khr_fp64

0.0 Device name      : ATI RV770
    Hardware version : OpenCL 1.0 AMD-APP (937.2)
    Software version : CAL 1.4.1734
    OpenCL C version : OpenCL C 1.0 
    Compute units    : 10

0.1 Device name      :        Intel(R) Xeon(R) CPU E5-2690 0 @ 2.90GHz
    Hardware version : OpenCL 1.2 AMD-APP (937.2)
    Software version : 2.0 (sse2,avx)
    OpenCL C version : OpenCL C 1.2 
    Compute units    : 16

1.0 Device name      :        Intel(R) Xeon(R) CPU E5-2690 0 @ 2.90GHz
    Hardware version : OpenCL 1.2 (Build 57)
    Software version : 5.0.0.57
    OpenCL C version : OpenCL C 1.2 
    Compute units    : 16
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Atak_Snajpera on 2016-12-05 16:23:41
I did not try to use it with iGPU but the settings below work for me in foobar's commandline converter.

Radeon HD5750, i3-540:
Code: [Select]
-q -9 --verify --slow-gpu --task-size 256 --cpu-threads 2 - -o %d

GeForce GTX950, i3-4160:
Code: [Select]
--verify --task-size 256 --cpu-threads 2 - -o %d

Thank you! At least I know that something is wrong on my side :)
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2016-12-07 16:42:13
I want to remind that the official flac 1.3.1 had huge speed improvements and even compresses slightly better at -8 as the last flacCL, 1.3.2 has a pre-release today.
The last compression improvements with CUEtools flake are not part of flacCL.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Krusty The Clown on 2016-12-08 01:29:26
Here is my hardware and drivers:

AMD Phenom II X4 955 (quad core CPU)
RAM: 12 GB (in single mode) DDR3
MB: ASUSTeK Computer INC. M4A77T (AM3) (SATA II with 3.0Gb/s (375 MB/s) & PCIe 2.0 (5 GT/s))
Gfx/Device: GeForce GTX 1060 6GB RAM, Platform: "NVIDIA CUDA", Version: OpenCL 1.2 CUDA 8.0.0, Driver: 376.19 (supports PCIe 3.0 (8 GT/s) (CUDA cores=1280. My older gtx 260 had 196 CUDA cores)  :))
232GB Samsung SSD 840 EVO 250GB (SSD) (SATA III with 6Gb/s)
Win.10 64bit, DX12
-------------------------------------------------------------------------
Here are my test results:

Enya - 2008 - And Winter Came.wav

File Info : 44100kHz; 2 channel; 16 bit; 00:45:05.2000000

477.197.324 bytes (dir commando in dos) 455 MB (477.197.324 bytes) (properties in windows)

Encoding with CUETools.FLACCL.cmd.exe v. 2.1.5 in command line, With no options (-8 as default compression level), version from Sourceforge,

Results   : 341,85x; 264757720 bytes in 00:00:07.9134911 seconds; seconds

Enya - 2008 - And Winter Came.flac

264.757.720 bytes (dir commando in dos), 252 MB (264.757.720 bytes) (properties in windows)

Foobar2000 1.3.13 using the FLAC encoder/decoder version 1.3.1 took about 30 sec. Sorry about the last number is not very precise. But not sure where to find the log file, or info about CPU time in Foobar2000. Maybe somebody can help me with that.
But to boil it all down: CUETools.FLACCL.cmd.exe using CUDA took 7.45 sec, and flac.exe in Foobar using CPU took about 30 sec., for a whole album on 45 min. length.  ;)
BTW: the flac made in Foobar2000 with flac v.1.3.1 have the size 265.036.381 bytes (in dos) and 252 MB (265.036.381 bytes) (in properties) so that's 265036381-264757720 =278.661 bytes (262 kb in difference with Flaccl version the smallest size)
BTW2: If there's any math wiz kid/computer wiz kid out there, maybe he or she can calculate what the Flac time convertion would be instead, if I go out and buy a better MB with SATA III and PCIe 3.0 support ;-) Maybe even faster than the 7.45 sec.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2016-12-08 02:40:15
For size comparisons you should use a corpus of several GB consisting of different genres. Today you can use the default flac with many threads so the speed differences won't be dramatic.
Didn't you ask before editing how to use it in EAC? I once had flaCuda running in EAC. The syntax should be similar: https://hydrogenaud.io/index.php/topic,76193.msg670975.html#msg670975
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Krusty The Clown on 2016-12-08 03:08:16
Ah okay. So I just make a big folder on many GB's, with many wav's in different genres to do the test? Or should I use something official from a special test list, other testers also use?

Yes. My AMD Phenom II X4 955 CPU is not that good with threads I think. But I should have an Intel I7 with lots of cores and threads, and virtual threads (and a lot of stuff I don't know much about, when it comes to the architechture of CPU's ;) ). Then the difference between I7 CPU and the GTX 1060 GPU would be smaller as you point out.

Sounds good with FlaCuda in EAC. Then the new version Flaccl, just with different name should not be that different. Thanks mate.
ps: Thanks, and sorry if my english is a bit broken/bad....
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2016-12-08 03:16:45
For size comparisons just encode as much as it is comfortable for you. I mainly wanted to point out that one or 3 albums are not enough to conclude to much because different flac implementations slightly behave different.
Your english is good enough, no need to excuse. I often write confusing sentenses that make less sense.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Krusty The Clown on 2016-12-08 03:57:58
Ah okay.
Just testing now in Foobar. Trying later with EAC.

I took your old Flacuda parameters

"Wombats parameter about FLACUDA":
/c ""C:\path\CUETools.FlaCuda.exe" -8 --verify %s -o %d && "C:\path\metaflac.exe" --set-tag="Album=%g" --set-tag="Artist=%a" --set-tag="Title=%t" --set-tag="Tracknumber=%n" --set-tag="Date=%y" --set-tag="Genre=%m" --set-tag="Comment=FlaCuda 0.6 -8" %d"

And changed them into->

My new parameter:
/c ""C:\Program Files (x86)\foobar2000\encoders\CUETools.FLACCL.cmd.exe" -8 --verify %s -o %d && "C:\Program Files (x86)\foobar2000\encoders\metaflac.exe" --set-tag="Album=%g" --set-tag="Artist=%a" --set-tag="Title=%t" --set-tag="Tracknumber=%n" --set-tag="Date=%y" --set-tag="Genre=%m" --set-tag="Comment=FLACCL 2.1.5 -8" %d"

Foobar2000 looked like it was about to leave a finished flac on the desktop, but came up with those errors, and removed the temporary flac file from desktop:

1 out of 1 tracks converted with major problems.

Source: "C:\Users\Krusty\Desktop\Test\Enya - 2008 - And Winter Came.wav"
  An error occurred while finalizing the encoding process (Object not found) : "C:\Users\Krusty\Desktop\Enya - 2008 - And Winter Came.flac"
  Conversion failed: Object not found


Maybe its because Foobar2000 wants Output format and Destination parameters, to be separated?
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Krusty The Clown on 2016-12-08 05:09:34
@Wombat:
BTW: The parameters I was using before in EAC was:
-8 -V -T "ARTIST=%artist%" -T "TITLE=%title%" -T "ALBUM=%albumtitle%" -T "DATE=%year%" -T "TRACKNUMBER=%tracknr%" -T "GENRE=%genre%" -T "PERFORMER=%albuminterpret%" -T "COMPOSER=%composer%" %haslyrics%--tag-from-file=LYRICS="%lyricsfile%"%haslyrics% -T "ALBUMARTIST=%albumartist%" -T "DISCNUMBER=%cdnumber%" -T "TOTALDISCS=%totalcds%" -T "TOTALTRACKS=%numtracks%" -T "COMMENT=%comment%" %source% -o %dest%

If you are able to fit it to Flaccl (and maybe flacmeta. Not quite sure what that is, as I never used it before.)
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: lvqcl on 2016-12-08 12:00:32
My new parameter:
/c ""C:\Program Files (x86)\foobar2000\encoders\CUETools.FLACCL.cmd.exe" -8 --verify %s -o %d && "C:\Program Files (x86)\foobar2000\encoders\metaflac.exe" --set-tag="Album=%g" --set-tag="Artist=%a" --set-tag="Title=%t" --set-tag="Tracknumber=%n" --set-tag="Date=%y" --set-tag="Genre=%m" --set-tag="Comment=FLACCL 2.1.5 -8" %d"
And what's your new "Encoder file" setting?
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Krusty The Clown on 2016-12-08 22:02:41
I tried to change Wombats old settings he was using for EAC when using FLACUDA. But I can't seem to make it work. So the parameters I'm using right now does not work.

The old parameters I was using for the normal FLAC encoder/decoder version 1.3.1 was this:
-8 -V -T "ARTIST=%artist%" -T "TITLE=%title%" -T "ALBUM=%albumtitle%" -T "DATE=%year%" -T "TRACKNUMBER=%tracknr%" -T "GENRE=%genre%" -T "PERFORMER=%albuminterpret%" -T "COMPOSER=%composer%" %haslyrics%--tag-from-file=LYRICS="%lyricsfile%"%haslyrics% -T "ALBUMARTIST=%albumartist%" -T "DISCNUMBER=%cdnumber%" -T "TOTALDISCS=%totalcds%" -T "TOTALTRACKS=%numtracks%" -T "COMMENT=%comment%" %source% -o %dest%

I can make it work by using the very simple parameters, with CUETools.FLACCL.cmd.exe v. 2.1.5:
-8 %source%

But then I don't get all the ID3 tags I had before, when converting or ripping.

Any ideas? Seems like I'm close to make everything work. Not very good at this kind of technical stuff.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2016-12-09 01:48:17
I tried again and here is how it works, EAC 1.3. Use the setting from the pic and make sure to use the correct paths and flags from EAC to feed metaflac http://www.exactaudiocopy.de/en/index.php/support/faq/

/c ""R:\CUETools_2.1.6_encoders\CUETools.FLACCL.cmd.exe" -8 --verify %source% -o %dest% && "R:\flac\metaflac.exe" --set-tag="ARTIST=%artist%" --set-tag="ALBUM=%albumtitle%" --set-tag="TOTALTRACKS=%numtracks%" --set-tag="TRACKNUMBER=%tracknr2%" --set-tag="TITLE=%title%" --set-tag="DATE=%year%" --set-tag="GENRE=%genre%" %dest%"
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Krusty The Clown on 2016-12-13 18:47:01
Perfect. It works now. I have never guessed to put path to command prompt. Is the reason to use cmd, and metaflac because of the flaccl doesn't have options for include ID3 tags unlike the normal flac encoder that, and need to be "helped" with cmd and metaflac?

Thanks anyway for the help in EAC. Now I just need to make sure flaccl is configured correct in Foobar2000. What is your settings there? Thanks
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2016-12-14 01:40:10
I don't use foobar with flacCL but it should be simple like any other codec. You may add -b 4096 if you plan to encode different samplerates. Original flac uses a blocksize of 4096 while the CUEtools encoders may use bigger values. My network player couldn't play these.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Krusty The Clown on 2016-12-14 07:16:46
Ah okay. Don't know much about blocksize, but I never change samplerate when converting. Only change samplerate if I fiddle with music samples in a music editor like Sound Forge or Audacity to make it go faster or slower for fun. But thanks for the tip and help thou.

Anyway, I overclocked my GPU a bit with MSI afterburner with Core on 110, and Mem on 550. So the 45.05 min wav I did before, now took 00:00:05.6375715 seconds; instead of 00:00:07.9134911 seconds when using CMD/Dos/Command Promt. :-)

(http://C:\Users\Krusty\Desktop\FLACCL on wav 45 min took 5.63 sec on gtx 1060 6GB overclocked to 110 Core, and 550 Mem (Mhz))
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Krusty The Clown on 2016-12-14 07:20:03
Wasn't able to attach photo from desktop before. I try again...  ::)

(http://C:\path\FLACCL.jpg)

Hm...don't know how to attach photos here.

Anyway. I guess people with newer cards like Titan X cards can convert a 45 min wav in 1 or 2 secs.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: rutra80 on 2017-01-07 21:33:08
Is it just me or is FLACCL slower in real use than FLAC? On a single big file FLACCL is much faster, sure, but when I encode a real CD with many several minutes long songs, every instance of FLACCL initializes for long enough to extenuate encoding speed gains, even when multithreading. Here on Celeron G1820 & Radeon R7 260X it took ~40 seconds to encode an album with FLACCL, and ~30 with FLAC.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: kode54 on 2017-01-07 22:10:55
You can't multi-thread FLACCL. Each individual instance is designed to use the full resources of your GPU. Running more than one at a time, they fight over the GPU. It's like multi-instancing an already multi-threaded encoder.

Yeah, and I'm not going to expect it to perform miracles when you toss it at budget hardware. Either way, I'd expect the real bottleneck to any CD ripping operation to be the actual CD ripping, not the encoding. It should be done encoding each track before it even finishes ripping the next one.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: IgorC on 2017-01-07 23:21:53
Is it just me or is FLACCL slower in real use than FLAC?
As far as i remember FLACCL has different level scale in comparison with FLAC.

FLACCL -6  is comparable to FLAC -8 in terms of compression ratio.
FLACCL -8  is equivalent to something like FLAC -8 -p -e
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: rutra80 on 2017-01-08 00:48:36
I tried both single and multi-instance, the latter turns out to be actually faster. I wouldn't call Radeon R7 260X to be explicitly "budget", unless you mean that initialisation time is a fault of budget Celeron. But then, on a faster CPU initialisation would be faster, but so would be FLAC. As for encoding speed while ripping, it's irrelevant these days - encoding a single song takes a couple of seconds while ripping takes a dozen.
IgorC, I'll try comparing the settings you mention.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2017-01-08 01:14:24
As far as i remember FLACCL has different level scale in comparison with FLAC.

FLACCL -6  is comparable to FLAC -8 in terms of compression ratio.
FLACCL -8  is equivalent to something like FLAC -8 -p -e
The recent official flac versions compress similar to flacCL at -8. CUEtools flake -8 is similar to flac -8 -ep at a usable speed. The last flake compression optimization didn't make it into flacCL.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: kode54 on 2017-01-08 01:20:50
It sells for under $150, so I'd call it a "budget" card. An RX 480, by comparison, sells for between $250 and $300, so it's more of a mid-range card. It also benchmarks Passmark's GPU compute performance at about 3-4x as fast as that R7 260X.

Maybe it does benefit from multi-threading. Maybe it's fast enough so that your hard drive is the bottleneck. In which case, it doesn't really matter which encoder you use, until you start using greater than FLAC -8 compression settings, in which case some decoders may not even be able to keep up due to memory constraints, such as on embedded devices.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: rutra80 on 2017-01-08 02:48:02
I admit I made a mistake - I didn't notice that FLACCL was using integrated Intel OpenCL which is roughly as fast as FLAC... :-*

BUT

It doesn't make a difference! :D
Here go times for encoding 29 songs in fb2k (FLACCL uses -7 so it produces files bigger than FLAC -8):
It's not encoding speed that's an issue (encoding itself is 5x faster than FLAC: ~600x vs ~120x), it's initialization time. And it surely isn't drive's bottleneck (Samsung 850 EVO).
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: kode54 on 2017-01-08 03:18:37
Clearly it should be caching the encode kernels on disk somewhere to speed up initialization. Or at least optionally providing a path to store encode kernels, with filenames keyed to FLACCL version and any encode options which would be compiled into it.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: IgorC on 2017-01-08 03:53:14
The recent official flac versions compress similar to flacCL at -8. CUEtools flake -8 is similar to flac -8 -ep at a usable speed. The last flake compression optimization didn't make it into flacCL.
Ah, great. I saw that a devs have squeezed  ~0.2% for FLAC  1.3.1&1.3.2. Just didn't know how it compared to FLACCL.

It's not encoding speed that's an issue (encoding itself is 5x faster than FLAC: ~600x vs ~120x), it's initialization time.
I had a same experience with FLACCL. That's why I've moved to FLAC 1.3.1 (the version when it has become very fast).
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: kode54 on 2017-01-08 04:58:43
It should be saving compiled OpenCL binary blobs to:

%localappdata%\CUE Tools\OpenCL

Make sure the process has write permission to that path, and that there's nothing there conflicting with it.

E: I just checked. It does take almost a full second to initialize on an RX 480, even with the .cl file pre-compiled. Which nullifies the advantage of encoding a 2 minute track in 200ms if the software encoder can produce the same results in less time than the 200ms plus the combined startup time of the FLACCL encoder.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Wombat on 2017-01-08 14:56:13
The recent official flac versions compress similar to flacCL at -8. CUEtools flake -8 is similar to flac -8 -ep at a usable speed. The last flake compression optimization didn't make it into flacCL.
I was wrong, sorry. I didn't use flacCL in a while but on average it still compresses better as the oficial -8 flac but now more varying over different albums. flac came close but CUEtools flake at -8 really is similar or better as -ep -8. I tested this with a bunch of recent albums, no sience.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Isabelxxx on 2017-02-03 00:33:54
It should be saving compiled OpenCL binary blobs to:

%localappdata%\CUE Tools\OpenCL

Make sure the process has write permission to that path, and that there's nothing there conflicting with it.

E: I just checked. It does take almost a full second to initialize on an RX 480, even with the .cl file pre-compiled. Which nullifies the advantage of encoding a 2 minute track in 200ms if the software encoder can produce the same results in less time than the 200ms plus the combined startup time of the FLACCL encoder.

Reproducible behavior on my side too.

One of the reasons the standard Flac encoder becomes more useful for multiple files; I also pointed in previous posts how foobar can not manage properly multiple FLACCL encoder threads throwing errors from time to time. Maybe it's related to this delay (?).
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: JuanPabloCuervo on 2017-08-12 00:28:11
same test using the same file...
cd1.wav
7700K
GTX 1050 Ti
-8
tested all combinations possible...
from 32 to 2048
https://youtu.be/HSQR0SONYZk?list=PLFLW4YcfJg9E8c0mk1KJJtANx2pzJA4u3
Title: Is FLACCL on some development hiatus?
Post by: planet on 2018-02-10 17:36:59
Hi, are the latest flacCL binaries (CUETools_2.1.6_encoders_060215.zip ??? ) still based on FLAC 1.3.1 (25-Nov-2014) ?

Quick comparison between pureFLAC and flacCL:

Spoiler (click to show/hide)
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2018-02-10 17:53:14
FlacCL isn't based on libFLAC - it's too different from it to benefit from any recent changes to libFLAC.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: planet on 2018-02-10 18:49:35
Good evening and thanks for pointing that out.

How feasible would a WavPackCL be? I mainly use wavpack to compress High-Rez PCM and DSD files.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: Gregory S. Chudov on 2018-02-10 19:09:24
From what i remember, WavPack (and most other lossless formats) can't benefit from the kind of parallel processing that FlacCL does. Most formats can benefit from parallel encoding of multiple frames or at least files on different CPU cores, but for GPU parallelism you need to parallelize differently - parallel processing of samples or small sample blocks or multiple similar compression methods on the same frame, but algorithms such as WavPack and ALAC have "memory", i.e. encoding of previous samples affects the encoding of the rest of the frame, so i don't see how they can be paralellized for GPU.
Title: Re: FLACCL: CUDA-enabled FLAC encoder by Gregory S. Chudov (prev. FlaCuda)
Post by: planet on 2018-02-10 19:33:48
If a transmutation to the video world and gross simplification (for the sake of better understanding) is acceptable, then basically formats using I-frames only are suited for GPU encoding acceleration whereas those relying on P and B-frames are not.

On a different matter - what command line argument (--opencl-platform) do Intel people use?
SimplePortal 1.0.0 RC1 © 2008-2018