FIX: Detect CUDA version correctly for setting c++17 #119984

Open
William Leeson wants to merge 2 commits from leesonw/blender-cluster:Fix_CUDA_CMakeList into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Member

Previous version checked cuda_version which was not set until later. However CUDA_VERSION exists prior to this point so checking that should work.

Previous version checked cuda_version which was not set until later. However CUDA_VERSION exists prior to this point so checking that should work.
Brecht Van Lommel was assigned by William Leeson 2024-03-27 21:46:04 +01:00
Sergey Sharybin was assigned by William Leeson 2024-03-27 21:46:04 +01:00
William Leeson added 1 commit 2024-03-27 21:46:17 +01:00
c57f9a91c7 FIX: Detect CUDA version correctly for setting c++17
Previous version checked cuda_version which was not set until
much later. However CUDA_VERSION exists prior to this point so
checking that should work.
Iliya Katushenock requested review from Brecht Van Lommel 2024-03-27 21:54:37 +01:00
Iliya Katushenock requested review from Sergey Sharybin 2024-03-27 21:54:38 +01:00
Brecht Van Lommel was unassigned by Iliya Katushenock 2024-03-27 21:54:42 +01:00
Sergey Sharybin was unassigned by Iliya Katushenock 2024-03-27 21:54:42 +01:00
William Leeson added 1 commit 2024-03-28 08:43:40 +01:00
Brecht Van Lommel requested changes 2024-03-28 15:56:11 +01:00
Brecht Van Lommel left a comment
Owner

I don't think this fix is right, but the code is confusing, and it would be good to improve variable names and pass in the cuda version explicitly as an argument into CYCLES_CUDA_KERNEL_ADD.

CUDA_VERSION is the main CUDA version detected. However it is possible to compile with multiple CUDA toolkits, and cuda_version is set depending on the toolkit used for each architecture.

See the code inside foreach(arch ${CYCLES_CUDA_BINARIES_ARCH}).

I don't think this fix is right, but the code is confusing, and it would be good to improve variable names and pass in the cuda version explicitly as an argument into `CYCLES_CUDA_KERNEL_ADD`. `CUDA_VERSION` is the main CUDA version detected. However it is possible to compile with multiple CUDA toolkits, and `cuda_version` is set depending on the toolkit used for each architecture. See the code inside `foreach(arch ${CYCLES_CUDA_BINARIES_ARCH})`.

Is there some repro case which demonstrates the issue?

If the variable is indeed undefined, then I'd expect an error like this to be reported by CMake:

  if given arguments:

    "GREATER_EQUAL" "110"

  Unknown arguments specified
Is there some repro case which demonstrates the issue? If the variable is indeed undefined, then I'd expect an error like this to be reported by CMake: ``` if given arguments: "GREATER_EQUAL" "110" Unknown arguments specified ```
Author
Member

Is there some repro case which demonstrates the issue?

If the variable is indeed undefined, then I'd expect an error like this to be reported by CMake:

  if given arguments:

    "GREATER_EQUAL" "110"

  Unknown arguments specified

Yeah, I did notice that it was not getting set. However, I can't find any "Unknown arguments specified" in the logs. I'll see it I can repo it on a plan Blender build. Thanks for the feed back.

> Is there some repro case which demonstrates the issue? > > If the variable is indeed undefined, then I'd expect an error like this to be reported by CMake: > ``` > if given arguments: > > "GREATER_EQUAL" "110" > > Unknown arguments specified > ``` Yeah, I did notice that it was not getting set. However, I can't find any "Unknown arguments specified" in the logs. I'll see it I can repo it on a plan Blender build. Thanks for the feed back.
Merge conflict checking is in progress. Try again in few moments.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u Fix_CUDA_CMakeList:leesonw-Fix_CUDA_CMakeList
git checkout leesonw-Fix_CUDA_CMakeList
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#119984
No description provided.