Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 619460

Summary: cuda.eclass: Support CUDA architectures via USE_EXPAND?
Product: Gentoo Linux Reporter: Ladislav Zitka <archenroot>
Component: EclassesAssignee: Gentoo Science Related Packages <sci>
Status: UNCONFIRMED ---    
Severity: normal CC: bugzilla, negril.nx+gentoo, pacho, soap, waebbl-gentoo
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=863566
Whiteboard:
Package list:
Runtime testing required: ---

Description Ladislav Zitka 2017-05-23 15:50:32 UTC
This is more feature request related to CUDA GPU acceleration support in packages. Problem is that usually the packages compile its CUDA code into multiple architectures, here example from opencv-3.2.0:
-gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61

But I have for example architecture 52, so only interested in this specific compilation.

The easy idea is to provide custom USE flag per architecture in similar way as single target for python:
cuda_single_target_50
cuda_single_target_30
etc.

What do you think about it?

I opened discussion about this here:
https://forums.gentoo.org/viewtopic-t-1063800.html

Thank you for looking into this.

Ladislav
Comment 1 Ladislav Zitka 2017-05-23 18:43:55 UTC
Probably OpenCV was also nice example as their CMAKE upstream configuration includes special CUDA config generator, so I raised the question with them as well:
https://github.com/opencv/opencv/issues/8781
Comment 2 Ladislav Zitka 2017-05-23 18:56:14 UTC
I think we should propose something like CUDA_GENERATION variable to be configured in /etc/make.conf where we can list system wide GPU chip type.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-10-20 03:21:27 UTC
It'd be a USE_EXPAND I guess.