[AMDGPU-pro] Cycles troubles with opencl (CL_OUT_OF_HOST_MEMORY)
Closed, ArchivedPublic

Description

System Information
OS: Ubuntu 16.04
Kernel: 4.10 x86_64
GPU: Radeon R9 280x
Driver: amdgpu-pro-16.60-379184 x86_64

Blender Version
Broken: blender-2.78-7359cc1060-linux-glibc219-x86_64

Short description of error
Cycles render over gpu return OpenCL error (-6): CL_OUT_OF_HOST_MEMORY

Exact steps for others to reproduce the error

  1. Run blender
  2. Configure it to use opencl
  3. Chenge render engine to cycles
  4. Press F12

Attachments
System-info:


Clinfo:
Blender --gedug-cycles:

Details

Type
Bug
Mai Lavelle (maiself) closed this task as "Invalid".Feb 23 2017, 11:13 AM
Mai Lavelle (maiself) claimed this task.

Out of host memory means your computer ran out of memory, theres no bug here.

Pavel (Metallikus) reopened this task as "Open".Feb 23 2017, 6:20 PM

Out of host memory means your computer ran out of memory, theres no bug here.

  1. My card have 3Gb memory.
  2. I get this error when rendering the starting cube.
  3. I have no this error under fglrx.

This is a bug.

Considering that the same build of Blender works on a different driver, I'm pretty sure that AMDGPU is to blame here, not Blender.

Mai Lavelle (maiself) closed this task as "Invalid".Feb 24 2017, 1:31 AM

Host memory is system memory, not GPU memory. Either your system ran out of memory or there's a driver bug.

Unless there's some other info you've left out there's nothing we can do, this isn't a bug we can fix in Blender.

Pavel (Metallikus) reopened this task as "Open".Feb 24 2017, 8:46 AM

Considering that the same build of Blender works on a different driver, I'm pretty sure that AMDGPU is to blame here, not Blender.

Under fglrx the holders of such cards get another error: https://developer.blender.org/T49465

Host memory is system memory, not GPU memory.

System has 2Gb free RAM and 4Gb swap memory.
Why the default scene uses more than 6Gb memory to render it over amdgpu-pro OpenCL api? Why cycles render over CPU work fine? It is realy not memory leak in cycles engine?

Top output:

This comment was removed by Tom (vejn).

@Tom (vejn) that is interesting and might point to something we can fix. Its a different issue than the one in this report tho.

Could either of you test the split kernel branch and see if thats any better?

Bastien Montagne (mont29) triaged this task as "Incomplete" priority.EditedFeb 24 2017, 1:05 PM

@Tom (vejn) also, since it’s different issue might be better to report it in different task, better to strictly keep one issue per task. ;)

@Tom (vejn) also, since it’s different issue might be better to report it in different task, better to strictly keep one issue per task. ;)

Ok, I have deleted this comment and open here https://developer.blender.org/T50773

@Tom (vejn) that is interesting and might point to something we can fix. Its a different issue than the one in this report tho.

Could either of you test the split kernel branch and see if thats any better?

No, I haven't tested split kernel branch. I don't know how.

This comment was removed by Pavel (Metallikus).

Same here. Blender 2.77 on Ubuntu 16.10 + AMDGPU-PRO OpenCL driver (hybrid installation with Padoka:ppa Mesa display driver).
After starting rendering on GPU it throws CL_OUT_OF_HOST_MEMORY. Try again and blender crashes.
Host Memory: 16GB
GPU: AMD Radeon HD7870, 2GB

This could actually be related to T50968? Sounds *somewhat* similar at least, @Sergey Sharybin (sergey)?

I'm seeing this as well with a Radeon R9 270X (2 GB vRAM), 16 GB of system RAM, and amdgpu 16.60-379184 on Ubuntu 16.04.

I can confirm the same error message with Ubuntu LTS 16.04 + proprietary AMDGPU-PRO Driver 16.6:

Blender 2.78 (sub 4), Commit date: 2017-04-01 13:29, Hash 3bf0026bec
bpy.context.scene.cycles.device = 'GPU'
F12 -> 
OpenCL error (-6): CL_OUT_OF_HOST_MEMORY

Additionally Blender then later crashes with a segmentation fault:

OpenCL: Error creating command queue
OpenCL error: CL_INVALID_COMMAND_QUEUE in clEnqueueWriteBuffer(cqCommandQueue, CL_MEM_PTR(mem.device_pointer), CL_TRUE, 0, mem.memory_size(), zero, 0, NULL, NULL)
OpenCL: failed to initialize device.
Writing: /tmp/blender.crash.txt

Crash report:

Aaron Carlisle (Blendify) raised the priority of this task from "Incomplete" to "Normal".Apr 21 2017, 8:56 PM
Mai Lavelle (maiself) lowered the priority of this task from "Normal" to "Incomplete".Apr 21 2017, 9:28 PM

This could be a driver issue with GCN 1 cards as all cards mentioned in this report are that generation. I cant reproduce this with the cards I have available, and if it is a driver bug there's nothing that we can do anyways. There is a new version of the drivers released recently you guys could try, but we may have to drop support for these cards.

Please see here for more info regarding supported cards: https://wiki.blender.org/index.php/Dev:Source/Render/Cycles/OpenCL

Unfortunately you are right, GCN1 arch ;-(
Even after upgrade to the latest AMD driver still the same issue.

OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: AMD Radeon HD 7700 Series
OpenGL core profile version string: 4.5.13474 Core Profile Context 17.10.2
OpenGL core profile shading language version string: 4.50

clinfo 2.1.16.01.12 (mesa), this seems to be a related bug/error:

Address bits             32, Little-Endian
Global memory size       624066560 (595.2MiB)
Global free memory (AMD) <printDeviceInfo:68: get number of CL_DEVICE_GLOBAL_FREE_MEMORY_AMD : error -33>

Fable Fox (fablefox) closed this task as "Archived".May 11 2017, 5:33 AM
  1. It seems agreed that issue was on GCN1 cards and planned to drop support (?).
  2. Last conversation was on Apr 22.

Archived for now.