Cycles CUDA rendering do not work

Hi all,
I’m using Blender on my TX1 and it work perfectly since the last l4t update.
Just one thing do not work. Cycles rendering with CUDA. Cycles with CPU work perfectly.
Cycles work great on TK1 with CUDA.

On the TX1, i’ve always got this error:
CUDA error: Invalid value in cuMemcpyHtoD(cuda_device_ptr(mem.device_pointer), (void*)mem.data_pointer, mem.memory_size())

I’ve reported this error on the blender bug tracker but as the Jetson-TX1 is not officially supported, no work is done (here https://developer.blender.org/T49603)

If someone can help, I would be very grateful.

Hi,

Thanks for your question.
We are investigating this issue, will update to you later.

hi,

Thanks for your help.

Hi,

Could you provide detail reproduce step for this issue with Blender .
It will help us to solve the issue much faster.

Hi,

1/ compile blender as the packaged version do not support CUDA (see https://wiki.blender.org/index.php/Dev:Doc/Building_Blender/Linux/Ubuntu/CMake)
2/ start blender, go to menu -> File -> User Preferences (Ctrl + Alt + u)
3/ In the User Preferences window, go to System tab. Choose CUDA at the bottom left (Cycles Compute Device). Click “Save User Settings” at the bottom and close that wiindow.
4/ Change “Blender Render” with “Cycles Render” at the top center of the main blender window.
5/ In the right part of the window ,in “Render”, choose GPU Compute in “Device:”
6/ hit F12 or click Render
The first time you hit render, the kernel take times to compile.

The default scene include a cube, a light source and a camera which is sufficient to reproduce the bug.
In “5”, if you select CPU, the scene render correctly.

I may try to compile a staticaly linked version if you need.

Hi,

Sure.
It will be helpful if you can provide more information.

I’ll try to make a staticaly linked binary of blender and make a scene.

But the bug is really simple to reproduce if you compile blender. The bug always appear when you hit render with cuda. From the simplest scene to more complicated one. Blender/cycles do not work at all on the tx1 with CUDA (but work well on the tk1 or on the CPU without CUDA).

Hi,

We follow the installation guide to build blender:
https://wiki.blender.org/index.php/Dev:Doc/Building_Blender/Linux/Ubuntu/CMake

But hit error in building OpenColorIO since -msse2 option.
Did you have any external setting when compiling blender?

Sorry for this.
I’ve modified the install_deps.sh file for removing sse needs.

Take this one here please:
http://ovh.to/fH2gfbw

Thanks for your help

Hi,

Sorry for the late reply and thanks for your helping.
I have compiled blender with this install_dep.sh but still found the following error:
Did you meet this before?

/home/ubuntu/src/blender-deps/LLVM-3.4/autoconf/config.guess: unable to guess system type

This script, last modified 2011-08-20, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from

  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and
  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD

If the version you run (/home/ubuntu/src/blender-deps/LLVM-3.4/autoconf/config.guess) is already up to date, please
send the following data and any information you think might be
pertinent to <config-patches@gnu.org> in order to provide the needed
information to handle your system.

config.guess timestamp = 2011-08-20

uname -m = aarch64
uname -r = 3.10.96-tegra
uname -s = Linux
uname -v = #1 SMP PREEMPT Wed Nov 9 19:42:57 PST 2016

/usr/bin/uname -p = 
/bin/uname -X     = 

hostinfo               = 
/bin/universe          = 
/usr/bin/arch -k       = 
/bin/arch              = 
/usr/bin/oslevel       = 
/usr/convex/getsysinfo = 

UNAME_MACHINE = aarch64
UNAME_RELEASE = 3.10.96-tegra
UNAME_SYSTEM  = Linux
UNAME_VERSION = #1 SMP PREEMPT Wed Nov 9 19:42:57 PST 2016
CMake Error at cmake/modules/GetHostTriple.cmake:24 (message):
  Failed to execute
  /home/ubuntu/src/blender-deps/LLVM-3.4/autoconf/config.guess
Call Stack (most recent call first):
  cmake/config-ix.cmake:344 (get_host_triple)
  CMakeLists.txt:264 (include)


-- Configuring incomplete, errors occurred!
See also "/home/ubuntu/src/blender-deps/LLVM-3.4/build/CMakeFiles/CMakeOutput.log".
See also "/home/ubuntu/src/blender-deps/LLVM-3.4/build/CMakeFiles/CMakeError.log".
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target 'clean'.  Stop.
ERROR! LLVM-3.4 failed to compile, exiting

You can safely skip llvm as it’s only an option with “install_deps.sh --skip-llvm”.

Thans very much for your help

Hi,

Thanks for your helping. We can reproduce this issue now.
We are investigating this problem and will update to you once we have more information.

Nice :)

Thanks.

Hi,

Sorry for the late reply.

This could be an application issue that it is actually sending in an invalid pointer.
The common cases where Invalid value can be returned by cuMemcpyHtoD() are

  1. If the src or dst pointer are NULL
  2. If the dst ptr size is less than the size the of buffer is to be copied from host

Could you help to verify if you are seeing any of the above condition on blender?

Hi,

I’ll try to debug cycles by the end of the week.
But this happens only on aarch64. No problem on armv7 and x86_64.

Bug found :)
aarch64 was detected as 32bit.
Now blender and cycles work perfectly.

https://developer.blender.org/rB05dfe9c318e1408f0e4ee59bc1bf65a2d3c2eae1

Thanks for your help

this link is no longer available, is there any way i can access the file that was in this link to see if it will work with the current software or can you show me the new way of installing blender on to the tx2

The link works for me. Basically it’s a diff for file extern/cuew/include/cuew.h at line 117:

  • #if defined(__x86_64) || defined(AMD64) || defined(_M_AMD64)
  • #if defined(__x86_64) || defined(AMD64) || defined(_M_AMD64) || defined (aarch64)