Loading render kernels time increase from 20s to 6m45s (Apple Metal) #100102

Closed
opened 2022-07-31 23:07:27 +02:00 by Wouter Stomp · 25 comments

System Information
Operating system: macOS-12.2.1-arm64-arm-64bit 64 Bits
Graphics card: Apple M1 Max Apple 4.1 Metal - 76.3

Blender Version
Broken: version: 3.3.0 Beta, branch: master, commit date: 2022-07-30 06:17, hash: 8ae14bc1d7
Worked: 3.2.1

Short description of error
Not sure if this is a bug or if this is expected with the new metal optimisations, but the initial 'loading render kernels' when first starting blender has increased from 20s in 3.2.1. to 6m45s in 3.3 beta.

Exact steps for others to reproduce the error
Start Blender
Switch to cycles and gpu rendering (metal)
Enable rendered view

**System Information** Operating system: macOS-12.2.1-arm64-arm-64bit 64 Bits Graphics card: Apple M1 Max Apple 4.1 Metal - 76.3 **Blender Version** Broken: version: 3.3.0 Beta, branch: master, commit date: 2022-07-30 06:17, hash: `8ae14bc1d7` Worked: 3.2.1 **Short description of error** Not sure if this is a bug or if this is expected with the new metal optimisations, but the initial 'loading render kernels' when first starting blender has increased from 20s in 3.2.1. to 6m45s in 3.3 beta. **Exact steps for others to reproduce the error** Start Blender Switch to cycles and gpu rendering (metal) Enable rendered view
Author

Added subscriber: @blenderrocket

Added subscriber: @blenderrocket
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

Operating system: macOS-12.2.1-arm64-arm-64bit 64 Bits

Thanks for the report. Upgrade macOS version and see if that makes any difference.

> Operating system: macOS-12.2.1-arm64-arm-64bit 64 Bits Thanks for the report. Upgrade macOS version and see if that makes any difference.
Author

Upgraded to 12.5, still takes about 6m30s.

Upgraded to 12.5, still takes about 6m30s.

Added subscriber: @Memento

Added subscriber: @Memento
Member

Added subscriber: @mano-wii

Added subscriber: @mano-wii
Member

first starting blender has increased from 20s in 3.2.1. to 6m45s in 3.3 beta.

@mano-wii , can you confirm this?

> first starting blender has increased from 20s in 3.2.1. to 6m45s in 3.3 beta. @mano-wii , can you confirm this?

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'

I can confirm a much longer kernel compile time in recent builds.

version: time:
3.2 21s
3.4 6m55s

6 minutes (with no warning or progress) really seems like a lot, but I can't say if this is a bug, since the kernels are cached and this delay only happens the first time we use a new version of Blender.

This must be some side effect of some recent optimization in the rendering itself.


System Information
Operating system: macOS-12.2-arm64-arm-64bit 64 Bits
Graphics card: Apple M1 Apple 4.1 Metal - 76.3

I can confirm a much longer kernel compile time in recent builds. |version:|time: |---|--- |3.2|21s |3.4|6m55s 6 minutes (with no warning or progress) really seems like a lot, but I can't say if this is a bug, since the kernels are cached and this delay only happens the first time we use a new version of Blender. This must be some side effect of some recent optimization in the rendering itself. --- **System Information** Operating system: `macOS-12.2-arm64-arm-64bit 64 Bits` Graphics card: `Apple M1 Apple 4.1 Metal - 76.3`

Added subscriber: @ikester_blender

Added subscriber: @ikester_blender

I can also confirm this. MacBook Pro M1 Max. MacOS 12.5. Not quite 6 minutes, but it spent about 4 minutes in rendering kernels and about 1 minute "Updating Device".

This is more than an order of magnitude slower to render kernels. Did Cycles change that much between 3.2 and 3.3?

I can also confirm this. MacBook Pro M1 Max. MacOS 12.5. Not quite 6 minutes, but it spent about 4 minutes in rendering kernels and about 1 minute "Updating Device". This is more than an order of magnitude slower to render kernels. Did Cycles change that much between 3.2 and 3.3?

Added subscriber: @Nurb2Kea

Added subscriber: @Nurb2Kea

Sorry, right at the moment when I got the mail for this issue, I send my one over here.
https://developer.blender.org/T100450

Sorry, right at the moment when I got the mail for this issue, I send my one over here. https://developer.blender.org/T100450
Member

In #100102#1404834, @Nurb2Kea wrote:
Sorry, right at the moment when I got the mail for this issue, I send my one over here.
https://developer.blender.org/T100450

Hi, your report may or may not be same as this one.
How much render time it takes in 3.2 and older versions?

> In #100102#1404834, @Nurb2Kea wrote: > Sorry, right at the moment when I got the mail for this issue, I send my one over here. > https://developer.blender.org/T100450 Hi, your report may or may not be same as this one. How much render time it takes in 3.2 and older versions?

This issue was referenced by e11c899e71

This issue was referenced by e11c899e715b01f65b0a3b9b99cd69cf460209b1

Added subscribers: @Michael-Jones, @brecht

Added subscribers: @Michael-Jones, @brecht

This is a known thing to help improve render times, but given the feedback we may want to back out of it.

@Michael-Jones, what do you think about removing the inlining changes from intern/cycles/kernel/device/metal/compat.h for 3.3, but leaving the other optimizations intact?

More aggressive inline could then be done in the future along with for shader specialization, with an option that users explicitly enable.

This is a known thing to help improve render times, but given the feedback we may want to back out of it. @Michael-Jones, what do you think about removing the inlining changes from `intern/cycles/kernel/device/metal/compat.h` for 3.3, but leaving the other optimizations intact? More aggressive inline could then be done in the future along with for shader specialization, with an option that users explicitly enable.

Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'

Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'

Added subscriber: @extrup-1

Added subscriber: @extrup-1

On my M1Max MBP, kernels failed to load when only the GPU is selected as the render device and took about 4:45min to load when both GPU and CPU are selected.

On my M1Max MBP, kernels failed to load when only the GPU is selected as the render device and took about 4:45min to load when both GPU and CPU are selected.

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Brecht Van Lommel self-assigned this 2022-08-18 20:17:00 +02:00

I've reverted it now since we are so close to the release and so we don't wait too long with testing changes like this.

I've reverted it now since we are so close to the release and so we don't wait too long with testing changes like this.

Removing the inlining brought it right back down: August-19 build Rendering Kernels and Update Device: 24 secs. on an MacBook Pro 16", M1 Max, 32 GB.

But why does the viewport lose the retina resolution in Rendered mode? :)

Removing the inlining brought it right back down: August-19 build Rendering Kernels and Update Device: 24 secs. on an MacBook Pro 16", M1 Max, 32 GB. But why does the viewport lose the retina resolution in Rendered mode? :)

@ikester_blender, there's a setting in the Performance > Viewport panel to control that.

@ikester_blender, there's a setting in the Performance > Viewport panel to control that.
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
9 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#100102
No description provided.