You are not logged in.

#1 2020-08-03 16:23:05

simunic
Member
Registered: 2011-04-17
Posts: 9

Discussions about packaging Thrust and CUB on AUR

Hello,

I'm trying to figure out the best way to package Thrust on AUR, regarding its dependency (CUB).

For some context, since version 1.9,8, upstream removed Thrust's internal derivative of CUB, so it needs it as dependency. Then, since version 1.9.10, Thrust introduced a breaking change: Thrust now checks that it is compatible with the version of CUB found in your include path, so they recommend using the version of CUB that comes with thrust.

In my experience, people developing with Thrust usually have different versions of CUDA in their systems. For this reason, when I packaged Thrust on AUR, I decided to install it on /opt [1]. Since each version of CUDA comes with its own version of Thrust and CUB, I think Thrust should do the same, hence I put CUB inside the Thrust folder on /opt. I think this setup remains consistent and does not conflict with any other package (besides alternative versions of Thrust).

Another way could be installing each package to the standard paths. For instance, the CUB package on AUR installs it this way. Then, Thrust could just depend on this CUB and not pack its own version. The only problem I see with this approach is that it is not conflict-free, and one should make several packages to cover all the use cases, as noted by petronny on their comment. In fact, since there are not a lot of Thrust-standalone users (3 votes for Thrust, 5 for CUB), I figure it is not worth this much trouble to make a lot of packages.

I'm open to suggestions and critics.

Offline

#2 2020-08-05 07:01:21

petronny
Member
Registered: 2020-08-05
Posts: 1

Re: Discussions about packaging Thrust and CUB on AUR

Hi, it seems that now cuda is providing cub under `/opt/cuda/targets/x86_64-linux/include/cub/`.

I think we can just drop the cub package and build thrust with the cub in cuda.

Offline

#3 2020-08-05 14:56:00

simunic
Member
Registered: 2011-04-17
Posts: 9

Re: Discussions about packaging Thrust and CUB on AUR

petronny wrote:

it seems that now cuda is providing cub under `/opt/cuda/targets/x86_64-linux/include/cub/`.

Yeah, that's what I've meant here:

simunic wrote:

Since each version of CUDA comes with its own version of Thrust and CUB, I think Thrust should do the same, hence I put CUB inside the Thrust folder on /opt.

I don't know if CUB has any standalone use-case. If it doesn't, I suppose it can be dropped.

As for Thrust, it has plenty of uses outside of CUDA, so I think it makes sense to offer it as a standalone package as it is now, with CUB included. I don't think CUB is necessary on every Thrust project, but it doesn't take many space and I think this way is the simpler way.

Offline

Board footer

Powered by FluxBB