Cycles OpenCL kernel-splitting work #44197
Labels
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
24 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#44197
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is a design task related on the Cycles kernel split patch (D1200) for the communication which are not strongly related on the actual code.
Current OpenCL state is quite limited feature-wise. There's no:
Reports about crashes and render artifacts could happen here. Sharing benchmarks and test files which demonstrates issues is also possible here.
Please keep this thread constructive. Do not report issues with applying the patch or bulding blender. This kind of feedback is to happen via IRC.
Also do not put backtraces / logs as inlined into the comment, attach them as file instead.
All the non-constructive comments will be removed. Keep in mind it's not a forum, but a way to communicate with the patch developers.
Changed status to: 'Open'
Added subscriber: @Sergey
Added subscriber: @GeorgeKyriazis
Added subscriber: @mib2berlin
Get repeatable crash with opencl on intel with simple file.
Open .blend and start render with F12, crash before last tile finish.
Hash: 30c689ff7
Opensuse 13.2/64
Intel i5 3770K
GTX 760 4 GB
Driver 349.12
opencl-1.2-5.0.0.57
cpu_crash.blend
cpu_crash.txt
Cheers, mib
Intel has problems. We don't know what the issue is, but Intel does not work on any scenes. They have some issues compiling the kernels.
Added subscriber: @bliblubli
This comment was removed by @bliblubli
Added subscriber: @ideasman42
@bliblubli, This thread is not for you to make value judgment on our work and tell us what you think our priorities should be. This task was set up so users could report how well the patch works, or where it fails.
if you think it is a bad direction or would choose some other priorities for Cycles, this is not the place to say so.
Comments like this are not appreciated and will be deleted in future.
Added subscriber: @MarcClintDion
Added subscriber: @mont29
Added subscriber: @lennyhpc
On WIndows 7, the kernel compiles with AMD drivers for OpenCL CPU on Intel processors (without Intel GPU drivers). Blender doesn't crash but rendering takes ages. (@ideasman42 sorry if you understood it so, was meant as a debate, English is not my mother tong. I didn't want to tell you what to do.)
One should avoid using CPU OpenCL with split-kernel, most of the optimizations are only effective on GPU. Additional kernels and buffers also account to extra overhead.
Using CPU as OpenCL device, we observed the original mega-kernel crashes to the desktop randomly before or after the rendering. This appears on both Intel and AMD systems using blender 2.73/2.74 on Windows. Probably should report this bug somewhere else if it matters. When the CPU OpenCL does work, the performance however is always slower than native CPU.
In multi-device mode, it's doable to use mega-kernel for CPU OpenCL and split-kernel for GPU.
Added subscriber: @Lockal
I've tested this patch (the original one from D1200) on Ubuntu 14.10 x86-64 and NVidia GTX 690 with MikePan BMW scene.
Testing notes:
Performance on NVidia (modified BMW benchmark with 256x256 tiles: do not compare absolute values with results on your system):
Note for testers with NVidia GPUs:
Added subscriber: @thelasthope
I also tested the original patch form D1200 on Windows 7 64bit with an AMD Radeon HD 6950 2 GB, AMD Omega Driver 14.12
I tried to render the standard cube.
Notes:
I can confirm Sv.Lockals notes that the sample count goes into a negative direction during rendering.
@GeorgeKyriazis Is it possible to get Cycles working on non GCN Architecture GPUs?
We're still investigating feasibility. We can't make any commitments, though.
Our main focus is on future architectures and APIs. For example, if/when we add OpenCL 2.0 support, this won't be supported on pre-GCN, since pre-GCN HW cannot support OpenCL 2.0 features.
Hi OpenCL on Nvidia does not work after latest commits.
Opensuse 13.2/64
Intel i5 3770K
GTX 760 4 GB
Driver 349.12
Blender Hash 7d9412f
After start render it start compiling but after some kernel it goes in to endless loop.
cuda_endless_compile.txt
Cheers, mib
Added subscriber: @varunsundar08
Hello mib. We have set up a Linux system with Nvidia. But we are not able to re-produce the error you reported.
The configuration is as follows,
Ubuntu 14.04, 64-bit
Intel i5 4670k
GTX 780Ti
Driver 346.46
Thank you for looking into.
Iirc Sergey told me to use the latest Beta driver to get OpenCL 1.2 support.
I will try to downgrade my driver to 346.46 and report here.
Cheers, mib
EDIT: Test with 346.47 and 349.16 but does not work.
Delete Intel OpenCL installation but same result.
Added subscriber: @ThomasBerglund
Any chances of seeing support for the AMD FirePro D-series GPUs that are found in the Apple Mac Pro?
http://www.amd.com/en-us/solutions/professional/d-series
I have tried compiling and running the latest cycles_kernel_split branch, simply trying to render the default cube scene, but It fails to compile the OpenCL kernel.
Mac Pro (2013)
32GB ram
AMD Radeon HD FirePro D-700 6GB (2x) + Intel Xeon CPU E5-1680 v2 @ 3.00GHz
OS X 10.10.3 (build 14D136)
OpenCL 1.2 (Feb 27 2015 01:29:10)
Blender build: 2.74, hash 5ad79b8
I have attached the CVMCompiler crash log:
CVMCompiler_2015-05-01-091334.crash
Anything else I can provide to help troubleshoot this? Any ideas about what is going wrong?
Added subscriber: @ThomasDinges
Hi,
I compiled the latest cycles_kernel_split branch revision after your commits last night (Windows 7 x64, Geforce 540M) and I get an instant crash when I try to render with OpenCL, both F12 render and Viewport.
Console is showing this:
Hi,
After a fresh build 2 hours ago and a merge with lateste master, all works fine on AMD Cards, performance are the same compared with a week ago. Viewport render now works, but it is really slow. Slower than CPU, certainly because it loads the megakernel for every sample (it writes "loading kernel..." for a bit more than 1sec every time a sample is done, for 32 samples, it's more than 30sec loosed only to load the kernel.)
Again a new test with 5ad79b8
System:
Win 7 64bit
AMD Radeon HD 6950 2GB
Tried to render the standard cube (F12).
The compiling of the OpenCL Kernels didn't work anymore.
Console:
I monitored the VRAM usage of the GPU and the VRAM Usage was all the time while rendering around 169MB
The latest build where the OpenCL Kernel was able to compile was f32fad9
Hello bliblubli,
I investigated the viewport render delay . the kernel load does not take much time . the delay is actually because of the transparent shadows feature ( which is still broken on amd ) that is turned on. We will take care of it on further commits . the previous revision did not have transparent shadows feature enabled . the progress bar stays on "loading render kernels" as there is no update to the progress bar after load_kernels function ( will correct it asap) . thanks :)
Hello david,
I will look into it and get back asap . thanks :)
I've checked 5ad79b8 again with NVidia and it doesn't compile on my computer anymore even with ADV shading disabled. The compile process looks similar to nvcc, clBuildProgram works for 1 minute or so and then eats up all available RAM and crashes. I guess this is related to @varunsundar08 report.
Hello lockal,
I believe the error you reported is similar to the one that Thomas dinges mentioned earlier in the day . please let us know if cycles opencl on blender master branch works for you (on nvidia). sergey mentioned that cycles opencl on master does not work with nvidia since nvidia's driver update (if I remember correctly). thanks .
Added subscriber: @Lapineige
Added subscriber: @flubba86
Im getting the same issue I think.
Im using the latest available code from the cycles_kernel_split branch, as at Sat May 9th.
The first time I tried to render, the progress bar did the "Loading render kernels (this may take a few minutes)" and after about it minute it stopped with "OpenCL build failed: errors in console." The error in the console was
Error E013: Insufficient Private Resources
.Now, after that, every time I hit render it seems to not even try compile the kernel, it just crashes straight out with "OpenCL build failed: errors in console" but there are no errors in the console at all. I tried with
--debug-cycles
and--debug-all
and there is nothing to indicate why the compilation of the kernel is not working.I thought maybe openCL was caching the incomplete kernel, so I deleted the bin files stored in ~/.AMD/GLCache. After doing that, it goes back to the "Loading render kernels (this make take a few minutes)" and stopping on
Error E013: Insufficient Private Resources
.My System:
Linux Debian (sid)
Intel core i7 3820 x4 @ 3.9Ghz
AMD Radeon HD 6870 1GB
EDIT
It looks like the
Insufficient Private Resources
has got to do with the size of the code cache on the HD6xxx series cards. See here for a similar problem in luxrender with a HD6950 card.Added subscriber: @jesterking
I'm also getting
E103:Insufficient Private Recources
System:
I have updated to 14.12 drivers.
Cycles reports:
Failure to compile with 2. and 4., aborting with E103
It'd be great if the multi device 4. worked, but I'm figuring that it fails because of 2.
Added subscriber: @joshr
My GPU lacks double precision compute units and that is what causes this error about insufficient resources
GPU: AMD HD 6770
Specifications: http://en.wikipedia.org/wiki/Radeon_HD_6000_Series#Chipset_table
It also reports errors which support this before "insufficient private resources"
such as:
Also note others which have reported the same issue also lack double precision support on their graphics chipsets see the above wikipedia table for details.
Solution:
The code needs to recognise a GPU's lack of double precision support and map DP constants to SP
Or if that's not possible display an error saying support for double precision is required.
I'm not sure why insufficient private resources is appearing, don't have any AMD hardware here, and here it all works fine on intel opencl, gtx560 and gt520m.
As for the warning -- it's really weird. The constant is explicitly float and cycles doesn't sue doubles anywhere in kernel actually.
Yes all of those are able to use double precision, can anyone confirm a compiler bug on AMD hardware being unable to explicitly cast to single precision instead of double precision. That would explain this issue.
Edit:
Looks like a minor addition is needed:
http://stackoverflow.com/questions/7001424/opencl-problem-with-double-type
An interesting post about working around this problem from:
http://devgurus.amd.com/message/1282921#1282921
Quote:
Currently OpenCL users are limited to 25% of device memory,
I don't know where you get this from, perhaps it's a rumor, but it's certainly not correct.
(there is a 512MB limit per allocation call but you can allocate as much as you like)
I do predominately scientific computing and often need very large and fast memory so I am mostly using the 7970. On the 7970, I often allocate a single contiguous buffer that uses just shy of 3GB, the device limit. It's very simple, all you do is allocate in chunks of 512MB or less and make sure the chunks are rounded to about 0x4000 bytes, then they will be placed contiguously. Example, allocating 2GB you might have kernel buffers like
Since this is C language and A,B,C,D are memory pointers, you can use A to reference all of memory.
Here is a printout from a typical program start:
The last couple of buffers are different size for an unrelated reason. Note, I have not used GPU_MAX_ALLOC
type parameters and have never seen a need to. This also works on Cayman, and Barts devices but I prefer
Tahiti because the memory is so large and fast. Sorry, I don't know much about Nvida devices because I
usually choose hardware based on specifications.
Hope it helps.
Hi testing OpenCL on CPU and GPU and get artifacts.
CPU cant render Glass shader.
Blender
a49534a
Opensuse 13.2/64
Intel i5 3770K
GTX 760 4 GB
Driver 346.47
Intel opencl_runtime_15.1_x64_5.0.0.57
Thanks, mib
@mib2berlin, those artifacts seems to be somewhat similar to what was having with NVidia opencl when was looking into object motion, so it could be bug outside of the kernel. Will check on that.
As for the glass shader on cpu -- don't rememebr it working here, but it is surely on the todo list to investigate. It works on nvidia tho...
Hi, (reporting for users from Blenderartists)
DingTo asked to test some OpenCL features on http://blenderartists.org/forum/showthread.php?254521-A-good-news-for-AMD-ATI-Graphic-cards-owners&p=2871012&viewfull=1#post2871012 . Reproducible bugs (reported by more than one) are:
Things that could be enabled by default:
Note that one of them over there has a script to test on 200 scenes of it's own and from the community. So enabled features + Hair and Camera MB seems to be rock solid.
He reports (other maybe too but it's confusing if it's same problem or object motion blur) freezes when memory usage goes above graphic card limit.
Regards
Added subscriber: @omar-1
GPU:AMD HD 5450
Error:
double-precision constant is
in many lines.
Same as @joshr
Added subscriber: @boxed_9k
It seems to be a hardware limitation.
Info on recent (April/2015) patches from AMD, refer this wiki link, states that the supported systems are AMD's Radeon HD 7730 and above.
And they all support double precision.
Added subscriber: @mrdotcoza
Added subscriber: @adapmal
Ya... Please, any updates on the AMD driver crashing cycles on MAC?
I'm on a iMac Retina 5k 2014
Yosemite 10.10.5
AMD Radeon R9 M295X2
Blender Version 2.77 (2.77 2016-03-19)
Crashing log:
Thanks a lot!
You have to update to El Capitan at least to use OpenCL on OSX. It is actually written in our release logs: https://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.76/Cycles#OSX
Added subscriber: @TomG
Added subscriber: @MaiLavelle
Added subscriber: @brecht
Changed status from 'Open' to: 'Archived'
Archiving old out of data task.