Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 641242 - =media-libs/opensubdiv-3.3.0 with CUDA 9 - 'compute_20' is not defined for option 'gpu-architecture'
Summary: =media-libs/opensubdiv-3.3.0 with CUDA 9 - 'compute_20' is not defined for op...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jonathan Scruggs (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-16 04:04 UTC by Daniel M. Weeks
Modified: 2017-12-24 22:16 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
opensubdiv-3.3.0-add-CUDA9-compatibility (opensubdiv-3.3.0-CUDA9-compatibility.patch,897 bytes, patch)
2017-12-23 11:56 UTC, Jonathan Scruggs (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel M. Weeks 2017-12-16 04:04:40 UTC
opensubdiv 3.3.0 assumes the compute_20 architecture for any CUDA version >= 6, however, this has been dropped in CUDA 9. This causes the build to fail under CUDA 9.

A pull request has been submitted upstream to correct this problem: https://github.com/PixarAnimationStudios/OpenSubdiv/pull/961

Reproducible: Always
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2017-12-22 15:41:45 UTC
Please describe the actual problem, possibly by posting some output showing where it (starts to) fail(s).
Comment 2 Daniel M. Weeks 2017-12-22 16:55:06 UTC
Build fails early on when nvcc is invoked with the the GPU architecture set to compute_20 which is selected by the build system for any CUDA version >=6:

nvcc fatal   : Value 'compute_20' is not defined for option 'gpu-architecture'
Comment 3 Jonathan Scruggs (RETIRED) gentoo-dev 2017-12-23 11:52:06 UTC
This is the offending line in the CMakeLists.txt file:
set( OSD_CUDA_NVCC_FLAGS --gpu-architecture compute_20 )

I don't have nVidia, so I'm not familiar with it. What is the lowest version that I can change this to?

I'll do something like less than CUDA 8 set to compute_20, else set to next version up.
Comment 4 Jonathan Scruggs (RETIRED) gentoo-dev 2017-12-23 11:53:01 UTC
Nevermind, I just found a patch to fix this. It does what I said about adding a new if else statement.
Comment 5 Jonathan Scruggs (RETIRED) gentoo-dev 2017-12-23 11:56:56 UTC
Created attachment 511538 [details, diff]
opensubdiv-3.3.0-add-CUDA9-compatibility

Please test this patch for me as I can't use CUDA.

Many thanks.
Comment 6 Daniel M. Weeks 2017-12-23 14:10:52 UTC
(In reply to Jonathan Scruggs from comment #5)
> Created attachment 511538 [details, diff] [details, diff]
> opensubdiv-3.3.0-add-CUDA9-compatibility
> 
> Please test this patch for me as I can't use CUDA.
> 
> Many thanks.

That is my patch that I linked to when I opened the ticket. I've tested it; it works.
Comment 7 Jonathan Scruggs (RETIRED) gentoo-dev 2017-12-23 15:24:11 UTC
Ah. Thanks for the patch. I'll add it after my other PRs have gone through.
Comment 8 Larry the Git Cow gentoo-dev 2017-12-24 22:16:20 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02baca534283f0b8bfda69c603033418726a34b2

commit 02baca534283f0b8bfda69c603033418726a34b2
Author:     Jonathan Scruggs <j.scruggs@gmail.com>
AuthorDate: 2017-12-24 18:37:08 +0000
Commit:     David Seifert <soap@gentoo.org>
CommitDate: 2017-12-24 22:15:56 +0000

    media-libs/opensubdiv: Add CUDA 9 compatibility patch
    
    Closes: https://bugs.gentoo.org/641242
    Closes: https://github.com/gentoo/gentoo/pull/6624

 .../opensubdiv-3.3.0-add-CUDA9-compatibility.patch | 25 ++++++++++++++++++++++
 media-libs/opensubdiv/opensubdiv-3.3.0.ebuild      |  7 +++---
 2 files changed, 29 insertions(+), 3 deletions(-)