Merge sort on GPU

50 views
Skip to first unread message

Karol Bieniaszewski

unread,
Sep 9, 2023, 2:30:22 PM9/9/23
to firebir...@googlegroups.com

Hi

 

Maybe interesting for someone, merge sort on GPU

https://moderngpu.github.io/mergesort.html

 

on github

 

https://github.com/moderngpu

 

Regards,

Karol Bieniaszewski

 

Mark Rotteveel

unread,
Sep 10, 2023, 4:32:38 AM9/10/23
to firebir...@googlegroups.com
On 09-09-2023 20:30, Karol Bieniaszewski wrote:
> Maybe interesting for someone, merge sort on GPU
>
> https://moderngpu.github.io/mergesort.html
>
> on github
>
> https://github.com/moderngpu

I'm not sure that is very useful. Servers generally don't have powerful
GPUs, and with use of VMs, sharing GPUs is a whole other issue.

Mark
--
Mark Rotteveel

Karol Bieniaszewski

unread,
Sep 10, 2023, 5:22:39 AM9/10/23
to firebir...@googlegroups.com

You buy hardware to software you use. If it can utilize  GPU, you install also GPU.

And servers can contain GPU, all depend on box.

We have e.g. one server with A100. But even cheap GPU like RTX 3060 can speed up things a loot.

 

Regards,

Karol Bieniaszewski

--

You received this message because you are subscribed to the Google Groups "firebird-devel" group.

To unsubscribe from this group and stop receiving emails from it, send an email to firebird-deve...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/firebird-devel/aa1645c8-115d-4d50-a177-9eff4d7cf19e%40lawinegevaar.nl.

 

Dimitry Sibiryakov

unread,
Sep 10, 2023, 5:28:49 AM9/10/23
to firebir...@googlegroups.com
Karol Bieniaszewski wrote 10.09.2023 11:22:
> You buy hardware to software you use. If it can utilize  GPU, you install also GPU.
>
> And servers can contain GPU, all depend on box.
>
> We have e.g. one server with A100. But even cheap GPU like RTX 3060 can speed up
> things a loot.

I don't see there what happen when the sort runs out of GPU memory. In
Firebird internal sort is not slow, external is. Besides, Firebird doesn't sort
arrays of random integers.

--
WBR, SD.

Karol Bieniaszewski

unread,
Sep 10, 2023, 6:13:04 AM9/10/23
to firebir...@googlegroups.com

Sort on GPU have benefits on large list of items. So server should choose when to use it.

There are many cases when sort on CPU is faster and easier. Transfer to GPU memory have cost, and handle comparision method for strings is also problematic.

So only comparision on real data can show when to use when not.

 

And there are updated solutions already written in C++ for CUDA. Which „does not require” additional work on solving it itself. „Only” adapting it to the codebase.

Some are not so popular but interesting, like

https://github.com/davors/gpu-sorting

 

You know, sometimes someone catch the case and create algorithm which speed things up. And this was my goal when i send this email.

When first CUDA was released, there was many try and fail cases, but finally we have many things speeded up.

 

Regards,

Karol Bieniaszewski

 

Od: 'Dimitry Sibiryakov' via firebird-devel
Wysłano: niedziela, 10 września 2023 11:28
Do: firebir...@googlegroups.com
Temat: Re: [firebird-devel] Merge sort on GPU

 

Karol Bieniaszewski wrote 10.09.2023 11:22:

--

You received this message because you are subscribed to the Google Groups "firebird-devel" group.

To unsubscribe from this group and stop receiving emails from it, send an email to firebird-deve...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages