Open archenroot opened 7 years ago
Why not CUDA_TARGETS
?
Could be CUDA_TARGETS, but then it doesn't support OpenCL, so could be GPU_TARGETS, but in general question is what OpenCL packages requires from this perpsective, do they need some kind of architecture specificatiokn, or in case of OpenCL it doesn't metter?
2017-06-08 9:33 GMT+02:00 Alessandro Barbieri notifications@github.com:
Why not CUDA_TARGETS?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/archenroot/gentoo-overlay/issues/24#issuecomment-307023592, or mute the thread https://github.com/notifications/unsubscribe-auth/AAhyKJ0ChtX-7bJ69layrqAcKnjUjEhnks5sB6OugaJpZM4Nzor- .
If I remember right, OPENCL
uses just in time compilation. Regarding the architecture specification, I suppose gets determined at runtime.
So it is different than CUDA from this perspective and it doesn't make sense to specify more details in pre-compile time for OpenCL.... interesting
2017-06-08 11:29 GMT+02:00 Alessandro Barbieri notifications@github.com:
If I remember right, OPENCL uses just in time compilation. Regarding the architecture specification, I suppose gets determined at runtime.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/archenroot/gentoo-overlay/issues/24#issuecomment-307050362, or mute the thread https://github.com/notifications/unsubscribe-auth/AAhyKL06K40h6d0LSQp_JaQEHoP0Jivqks5sB77mgaJpZM4Nzor- .
There is common problem with hardware GPU acceleration support. I am mainly interested in CUDA, but could be related to OpenCL as well.
Problem: In upstream there is common problem:
Detail: When I say compilation is executed for all available architectures I mean NVCC gets following switches:
It is pretty much and prolong the compilation time by 3-5x, here is sample CMakeList plugin for configuration based on architecture name and failover to autodetect if not specified:
Solution proposal: Gentoo in the moment has one USE_EXPAND variable called VIDEO_CARDS, but this variable supports mixture of VENDOR(intel,nvidia), ARCHITECTURE (radeon) and DRIVER (noveau vs nvidia) related values, so is not usable. It is not a problem and naturally this variable servers mainly for X11 drivers installation.
I came with some idea and discussed this on gentoo-dev IRC channel and would like to propose following USE_EXPAND new variable:
GPU_ARCHITECTURE | GPU_TARGETS
I didn't use CUDA, because I think this could be used for both CUDA and OpenCL at the same time. Such variable must be defined in /etc/portage/make.conf
Possible values:
I am even fan of creating more complex configuration than just nvidia_maxwell, we can add other important switches.
To support this stuff it would be quite intelligent approach to create new Gentoo eclass to keep it sane :-).
I welcome and comments or help with this.
Thanks
NOTE: For reference I keep here original thread on forum: Gentoo forum thread as reference