AMD OpenCL error - Cycles #49398

Closed
opened 2016-09-19 13:50:44 +02:00 by Alma Talp · 29 comments

Hello,

on AMD RX 480 I get this error, while the same scene renders perfectly with CUDA on GTX 970.

'Opencl error -61 CL_INVALID_BUFFER_SIZE in CLCreateBuffer'

System:
Blender 2.78RC
Win7 64

Hello, on AMD RX 480 I get this error, while the same scene renders perfectly with CUDA on GTX 970. 'Opencl error -61 CL_INVALID_BUFFER_SIZE in CLCreateBuffer' System: Blender 2.78RC Win7 64
Thomas Dinges was assigned by Alma Talp 2016-09-19 13:50:44 +02:00
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @AlmaTalp

Added subscriber: @AlmaTalp

Added subscriber: @bliblubli

Added subscriber: @bliblubli
  1. Driver version used?
  2. Did it work in 2.77a? Does it work in latest master?
  3. Does it render with smaller tile size? (like 384x384)
    Attach an example file which trigger this bug.
    In my experience, 16.7.1 crashed in some scenes, but 16.30 on Linux and 16.8.3 on windows never had any problem, so try with one of those.
1) Driver version used? 2) Did it work in 2.77a? Does it work in latest master? 3) Does it render with smaller tile size? (like 384x384) Attach an example file which trigger this bug. In my experience, 16.7.1 crashed in some scenes, but 16.30 on Linux and 16.8.3 on windows never had any problem, so try with one of those.
Author

Thanks, I try to be more specific:

  1. Driver version: 16.8.2 and 16.9.1

Didn't work in 2.77a (viewport rendering)
Didnt work with 2.78 RCII (viewport rendering)
Didn't work with 2.78 daily build C2D7D47 (viewport rendering)

Unfortunately I cannot share the files because of its content (copyrighted).
It uses 2K and 4K textures and more than 10.000 objects (mostly instanced).

  1. Does not render with smaller tilesize

With 16.9.1 viewport rendering does not work, normal render works, but with these problems:

  • no remaining time is shown (lack of refreshing I think)
  • no image in the actually rendered region is shown, just after the tile is finished
  • canceling render is extremely unresponsive

Idea: could this problem be related to some kind of texture number limitations handled differently in viewport render and final render?

I also tried to use split kernel (debug mode) with nVidia + AMD GPU OpenCL mode (together), it resulted error in 'standard' rendering, also half of the image was rendered in progressive mode (OpenCL error -4) Mem object allocation error in clenque NDrangeKernel

Thanks, I try to be more specific: 1. Driver version: 16.8.2 and 16.9.1 2. Didn't work in 2.77a (viewport rendering) Didnt work with 2.78 RCII (viewport rendering) Didn't work with 2.78 daily build C2D7D47 (viewport rendering) Unfortunately I cannot share the files because of its content (copyrighted). It uses 2K and 4K textures and more than 10.000 objects (mostly instanced). 3. Does not render with smaller tilesize With 16.9.1 viewport rendering does not work, normal render works, but with these problems: - no remaining time is shown (lack of refreshing I think) - no image in the actually rendered region is shown, just after the tile is finished - canceling render is extremely unresponsive Idea: could this problem be related to some kind of texture number limitations handled differently in viewport render and final render? I also tried to use split kernel (debug mode) with nVidia + AMD GPU OpenCL mode (together), it resulted error in 'standard' rendering, also half of the image was rendered in progressive mode (OpenCL error -4) Mem object allocation error in clenque NDrangeKernel

Added subscriber: @TomG

Added subscriber: @TomG

I got OpenCl error when rendering with latest build.
AMD 7870, 16.9.1
Does not depend on tile size.

https://dev-files.blender.org/file/data/gn5rchdyrwpxgpg4wesr/PHID-FILE-tydf2b4iqvxbkjdzvx7j/micro3t.JPG

https://developer.blender.org/T49371

I got OpenCl error when rendering with latest build. AMD 7870, 16.9.1 Does not depend on tile size. https://dev-files.blender.org/file/data/gn5rchdyrwpxgpg4wesr/PHID-FILE-tydf2b4iqvxbkjdzvx7j/micro3t.JPG https://developer.blender.org/T49371

Added subscribers: @ThomasDinges, @brecht

Added subscribers: @ThomasDinges, @brecht
Thomas Dinges was unassigned by Brecht Van Lommel 2016-09-25 02:10:26 +02:00

We really need a way to reproduce the issue to investigate this. Even if you can't share the original .blend, it is usually possible to investigate what is going on, incrementally removing meshes, materials, textures, etc. until you find more details about what goes wrong specifically and can redo it in a simple .blend.

Even if it requires a complex .blend you can usually replace meshes, materials, textures with dummies to the point that there is nothing of value in the .blend anymore that you can't share.

We really need a way to reproduce the issue to investigate this. Even if you can't share the original .blend, it is usually possible to investigate what is going on, incrementally removing meshes, materials, textures, etc. until you find more details about what goes wrong specifically and can redo it in a simple .blend. Even if it requires a complex .blend you can usually replace meshes, materials, textures with dummies to the point that there is nothing of value in the .blend anymore that you can't share.
Author

I spent this afternoon with finding the problem.

I came out with this: when I have about 60 of 4K textures, I got the problem. Same file renders on CUDA.

Important: it affects viewport rendering; tiles-based final render (F12) works.

I spent this afternoon with finding the problem. I came out with this: when I have about 60 of 4K textures, I got the problem. Same file renders on CUDA. Important: it affects viewport rendering; tiles-based final render (F12) works.
Author

Another thing: I got blue screen several times instead of error message during the tests.

Another thing: I got blue screen several times instead of error message during the tests.

Is this a card with 4 GB memory? It sounds like an out of memory error that we should be handling more gracefully. If it's a more than 4 GB, we might be reaching limits of 32 bit pointers.

With 60 4k textures memory usage would be:

single channel byte textures 960MB
rgba byte textures 3840MB
single channel float textures 3840MB
rgba float textures 15360MB
Is this a card with 4 GB memory? It sounds like an out of memory error that we should be handling more gracefully. If it's a more than 4 GB, we might be reaching limits of 32 bit pointers. With 60 4k textures memory usage would be: |single channel byte textures|960MB| | -- | -- | |rgba byte textures|3840MB| |single channel float textures|3840MB| |rgba float textures|15360MB|
Author

These are RGB, RGBA and greyscale textures together.

As I wrote it renders on a GTX 970 (3.5 GB memory), I use RX 480 8 GB for OpenCL.

These are RGB, RGBA and greyscale textures together. As I wrote it renders on a GTX 970 (3.5 GB memory), I use RX 480 8 GB for OpenCL.
Author

Hello guys, I just tested with 2.78a; still I get this error with another file, only 2 GB texture memory used on RX480, renders well on GTX 970.
Is there any news on this? Thanks.

Hello guys, I just tested with 2.78a; still I get this error with another file, only 2 GB texture memory used on RX480, renders well on GTX 970. Is there any news on this? Thanks.

Use 16.10.4 and try to check motion blur before rendering.

Use 16.10.4 and try to check motion blur before rendering.
Author

Thanks, it does not work. Viewport rendering just reproduces the same error, it is not related to motion blur; it is related to the number of textures.

Thanks, it does not work. Viewport rendering just reproduces the same error, it is not related to motion blur; it is related to the number of textures.
Author

Hello Guys, is there any news on this? I downloaded the latest builds and still cannot use my RX480 for viewport rendering.

Hello Guys, is there any news on this? I downloaded the latest builds and still cannot use my RX480 for viewport rendering.

Try https://builder.blender.org/download/ and wait for new drivers.

Try https://builder.blender.org/download/ and wait for new drivers.
Mai Lavelle was assigned by Aaron Carlisle 2017-02-02 16:52:09 +01:00
Member

Your GPU is running out of memory because the tile size is too large. Unfortunately the tile size for viewport rendering isn't the same as for final renders and isn't controllable from the UI. To change the tile size for viewport rendering you'll have to use python. Set bpy.data.scenes['Scene'].cycles.debug_tile_size to the desired size.

This kind of thing is handled better in the cycles_split_kernel branch, hopefully we can merge those changes into master soon.

Your GPU is running out of memory because the tile size is too large. Unfortunately the tile size for viewport rendering isn't the same as for final renders and isn't controllable from the UI. To change the tile size for viewport rendering you'll have to use python. Set `bpy.data.scenes['Scene'].cycles.debug_tile_size` to the desired size. This kind of thing is handled better in the cycles_split_kernel branch, hopefully we can merge those changes into master soon.
Author

Hello Mai, thanks for the answer.
I have zero knowledge in python; would you please write me down what I exactly should do (and then how to revert back?)

Thanks

Hello Mai, thanks for the answer. I have zero knowledge in python; would you please write me down what I exactly should do (and then how to revert back?) Thanks
Author

UPDATE:

I just made a quick test with the actual version of my 'big scene' on RX480 with the latest nightly build.

It does not render at all. No viewport render, no final render.

For final render I tested with different tilesizes, from 100 x 100 to 1000 x 1000, also progressive rendering.

Same scene renders well with GTX 1070, about 5,5 GB RAM usage (I added some more stuff to my scene since the last test and I bought a new nVidia card as AMD seems to be completely useless for work).

UPDATE: I just made a quick test with the actual version of my 'big scene' on RX480 with the latest nightly build. It does not render at all. No viewport render, no final render. For final render I tested with different tilesizes, from 100 x 100 to 1000 x 1000, also progressive rendering. Same scene renders well with GTX 1070, about 5,5 GB RAM usage (I added some more stuff to my scene since the last test and I bought a new nVidia card as AMD seems to be completely useless for work).
Member

To change the tile size setting for viewport rendering open the python console editor in blender and enter a line such as bpy.data.scenes['Scene'].cycles.debug_tile_size = 64, changing Scene and 64 as needed.

If your scene isn't rendering at all it means you've ran out of GPU memory, the only things to do in that case is to reduce scene complexity or use another device.

To change the tile size setting for viewport rendering open the python console editor in blender and enter a line such as `bpy.data.scenes['Scene'].cycles.debug_tile_size = 64`, changing `Scene` and `64` as needed. If your scene isn't rendering at all it means you've ran out of GPU memory, the only things to do in that case is to reduce scene complexity or use another device.
Author

Thanks.

'If your scene isn't rendering at all it means you've ran out of GPU memory, the only things to do in that case is to reduce scene complexity or use another device.'

I didn't run out of memory; please take a look on the second part of my former reply. Thanks.

Thanks. 'If your scene isn't rendering at all it means you've ran out of GPU memory, the only things to do in that case is to reduce scene complexity or use another device.' I didn't run out of memory; please take a look on the second part of my former reply. Thanks.
Author

I made some tests with for the viewport.

Changing tilesize makes artifacts on the screen and bad renders.

Differences:

I made a test on a part of the scene.

While default tilesize for viewport render only results the 'openCL error' message and black screen, changing it to 512 or 256 starts fine at the 1st sample, but from the second makes artifacts (random image parts on the screen).

I made some tests with for the viewport. Changing tilesize makes artifacts on the screen and bad renders. Differences: I made a test on a part of the scene. While default tilesize for viewport render only results the 'openCL error' message and black screen, changing it to 512 or 256 starts fine at the 1st sample, but from the second makes artifacts (random image parts on the screen).
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

Please try a build from builder.blender.org/download

Please try a build from builder.blender.org/download
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Member

Since last asking for information it has been 7 or more days, due to the policy of our bug tracker
we will have to archive the report until the requested information is given.

Since last asking for information it has been 7 or more days, due to the policy of our bug tracker we will have to archive the report until the requested information is given.
Author

Sorry, I simply forgot to comment back, it still does not work. (Blender blender-2.78-3ab8895-win64).

Sorry, I simply forgot to comment back, it still does not work. (Blender blender-2.78-3ab8895-win64).
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
6 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#49398
No description provided.