Page MenuHome

Cycles Rendering GPU in OSX 10.8.2 not working [sm_30]
Closed, ResolvedPublic

Description

--- Operating System, Graphics card ---
Mac OSX 10.8.2, gtx650m

--- Blender version with error, and version that worked ---
In version 2.65.10 r54336M does not work, this is the link to the build http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66#Blender_2.66_Release_Notes
In version 2.65.10 r54408M it works , this is is the link to the build that works http://www.graphicall.org/856#be-nice

--- Short description of error ---
In the new official test build for 2.66 on mac 64 bit with my current hardware when you go to render with the GPU it reports back the error "CUDA kernel compilation failed", however I have the toolkit 4.2 and the cuda driver installed yet it will not render.
I found that build 2.65.10 r54408M works just fine

Also I found in the build 2.65.10 r54336M which is the build that don't work work ,it has missing scripts if you show package and go deep into the cycles folder then into the lib folder. The missing scripts are as follows.
kernel_sm_10.cubin
kernel_sm_11.cubin
kernel_sm_12.cubin
kernel_sm_13.cubin
kernel_sm_20.cubin
kernel_sm_21.cubin
kernel_sm_30.cubin



--- Steps for others to reproduce the error (preferably based on attached .blend file) ---
set to gpu render and try to render in viewport on 10.8.2 osx with a Kepler GPU card

Notes ---
I'm not a programmer so this is over my head but i report in case it helps ;)

Event Timeline

Hi,
on Mac OS X, we don't bundle the CUDA kernels, the user needs to compile those themselves.

You need the CUDA Toolkit 4.2.x and XCODE installed.

Also, for future reference, the error message says: "CUDA kernel compilation failed, see console for details." So looking into the console (start Blender from a terminal) can help. :)

>> Closing

I have both toolkit 4.2 and xcode installed and as I said it works in the second build but not the first, also it does not work in the latest stable release of blender 2.65a.
How can it work in one build and not another ?, I don't really understand it much but when I Google it lots of people with 10.8.2 and gtx650m seem to all be receiving the same issue.
When checking the console it comes up with
Compiling CUDA kernel ...
gcc: No such file or directory
CUDA kernel compilation failed, see console for details.

Yet I got both cuda toolkit 4.2 and xcode installed, I have also tried toolkit 5

It does not find gcc, which is part of xcode afaik.

Assigning to Jens

Thanks so maybe it is a bug , ill re-download and install xcode(seems I may have a developer preview release), ill get back to yeah soon ;).
Ps. no internet slang for me I had to google afaik meaning ;)

I have now download/installed xcode 4.5.2 and it is still the same error.

You need the xcode commandlinetools for cuda kernelcompile.
Thats also way smaller ( around 130MB ) than full xcode.
But now while you got it, goto xcode preferences -> download -> components and
get the commandlinetolls from there. ( just press on "install" )

I formely explained why i don't provide cudakernels atm. Perhaps we could host
them for postinstall somewhere, so a user can get the kernel_sm_<cuda_version>.cubin
he needs.

Jens

Thanks now just waiting for it to install, ill get back to you soon as its finshed ;)
Sorry I'm only a user trying my best to get blender working on my mac ;).

Maybe this web page link could be updated for better instructions on how to get it working, honestly it was the first place I went when it would not render in GPU mode.
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/GPU_Rendering#On_Mac_OS_X.2C_no_CUDA_GPU_is_available
shorty after I Google a lot.

its installed, I ran blender and the error below is my result

CUDA error: Launch failed in cuCtxSynchronize()
CUDA error: Launch failed in cuGraphicsMapResources(1, &pmem.cuPBOresource, 0)
CUDA error: Launch failed in cuGraphicsResourceGetMappedPointer(&buffer, &bytes, pmem.cuPBOresource)
CUDA error: Launch failed in cuModuleGetFunction(&cuFilmConvert, cuModule, "kernel_cuda_tonemap")
CUDA error: Launch failed in cuParamSetv(cuFilmConvert, offset, &d_rgba, sizeof(d_rgba))
CUDA error: Launch failed in cuParamSetv(cuFilmConvert, offset, &d_buffer, sizeof(d_buffer))
CUDA error: Launch failed in cuParamSeti(cuFilmConvert, offset, task.sample)
CUDA error: Launch failed in cuParamSeti(cuFilmConvert, offset, task.resolution)
CUDA error: Launch failed in cuParamSeti(cuFilmConvert, offset, task.x)
CUDA error: Launch failed in cuParamSeti(cuFilmConvert, offset, task.y)
CUDA error: Launch failed in cuParamSeti(cuFilmConvert, offset, task.w)
CUDA error: Launch failed in cuParamSeti(cuFilmConvert, offset, task.h)
CUDA error: Launch failed in cuParamSeti(cuFilmConvert, offset, task.offset)
CUDA error: Launch failed in cuParamSeti(cuFilmConvert, offset, task.stride)
CUDA error: Launch failed in cuParamSetSize(cuFilmConvert, offset)
CUDA error: Unknown CUDA error value in cuFuncSetCacheConfig(cuFilmConvert, CU_FUNC_CACHE_PREFER_L1)
CUDA error: Launch failed in cuFuncSetBlockShape(cuFilmConvert, xthreads, ythreads, 1)
CUDA error: Launch failed in cuLaunchGrid(cuFilmConvert, xblocks, yblocks)
CUDA error: Launch failed in cuGraphicsUnmapResources(1, &pmem.cuPBOresource, 0)
CUDA error: Launch failed in cuCtxSynchronize()

Marking as sm_30 error then and re-assign to Brecht.

Deleted Blender and downloaded 2.65a , tried view port as gpu mode and teh full error below.

Compiling CUDA kernel ...
nvcc warning : Option '--opencc-options (-Xopencc)' is obsolete and ignored, when targeting compute_20, sm_20, or higher
ptxas info : 0 bytes gmem, 1152 bytes cmem[3]
ptxas info : Compiling entry function 'kernel_cuda_tonemap' for 'sm_30'
ptxas info : Function properties for kernel_cuda_tonemap
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 15 registers, 368 bytes cmem[0], 16 bytes cmem[2]
ptxas info : Compiling entry function 'kernel_cuda_shader' for 'sm_30'
ptxas info : Function properties for kernel_cuda_shader
880 bytes stack frame, 92 bytes spill stores, 132 bytes spill loads
ptxas info : Used 24 registers, 792 bytes cmem[0], 524 bytes cmem[2]
ptxas info : Function properties for _Z10voronoi_Fn6float3fii
128 bytes stack frame, 92 bytes spill stores, 72 bytes spill loads
ptxas info : Function properties for _Z11brick_noisei
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Function properties for _Z11svm_checker6float3f
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Function properties for _Z11svm_voronoi19NodeVoronoiColoringf6float3
8 bytes stack frame, 4 bytes spill stores, 4 bytes spill loads
ptxas info : Function properties for _Z14svm_eval_nodesP13KernelGlobalsP10ShaderData10ShaderTypefi
1136 bytes stack frame, 764 bytes spill stores, 1808 bytes spill loads
ptxas info : Function properties for _Z16noise_turbulence6float314NodeNoiseBasisfi
40 bytes stack frame, 80 bytes spill stores, 72 bytes spill loads
ptxas info : Function properties for _Z18noise_musgrave_fBm6float314NodeNoiseBasisfff
32 bytes stack frame, 92 bytes spill stores, 40 bytes spill loads
ptxas info : Function properties for _Z18svm_node_tex_coordP13KernelGlobalsP10ShaderDataPfjj
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Function properties for _Z19svm_node_normal_mapP13KernelGlobalsP10ShaderDataPf5uint4
40 bytes stack frame, 40 bytes spill stores, 40 bytes spill loads
ptxas info : Function properties for _Z21svm_node_attr_bump_dyP13KernelGlobalsP10ShaderDataPf5uint4
8 bytes stack frame, 8 bytes spill stores, 16 bytes spill loads
ptxas info : Function properties for _Z26svm_node_tex_coord_bump_dxP13KernelGlobalsP10ShaderDataPfjj
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Function properties for _Z26svm_node_tex_coord_bump_dyP13KernelGlobalsP10ShaderDataPfjj
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Function properties for _Z28noise_musgrave_multi_fractal6float314NodeNoiseBasisfff
40 bytes stack frame, 108 bytes spill stores, 48 bytes spill loads
ptxas info : Function properties for _Z29noise_musgrave_hetero_terrain6float314NodeNoiseBasisffff
48 bytes stack frame, 128 bytes spill stores, 92 bytes spill loads
ptxas info : Function properties for _Z30shader_setup_object_transformsP13KernelGlobalsP10ShaderDataf
56 bytes stack frame, 140 bytes spill stores, 172 bytes spill loads
ptxas info : Function properties for _Z35noise_musgrave_hybrid_multi_fractal6float314NodeNoiseBasisfffff
56 bytes stack frame, 136 bytes spill stores, 104 bytes spill loads
ptxas info : Function properties for _Z35noise_musgrave_ridged_multi_fractal6float314NodeNoiseBasisfffff
56 bytes stack frame, 112 bytes spill stores, 64 bytes spill loads
ptxas info : Function properties for _Z6perlinfff
160 bytes stack frame, 160 bytes spill stores, 160 bytes spill loads
ptxas info : Function properties for _Z8svm_wave12NodeWaveType6float3ffff
8 bytes stack frame, 16 bytes spill stores, 16 bytes spill loads
ptxas info : Function properties for _Z9cellnoise6float3
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Function properties for _Z9svm_brick6float3ffffffifi
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Function properties for _Z9svm_magic6float3if
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Compiling entry function 'kernel_cuda_path_trace' for 'sm_30'
ptxas info : Function properties for kernel_cuda_path_trace
4752 bytes stack frame, 4460 bytes spill stores, 4824 bytes spill loads
ptxas info : Used 24 registers, 860 bytes cmem[0], 628 bytes cmem[2]
ptxas info : Function properties for _Z10voronoi_Fn6float3fii
128 bytes stack frame, 92 bytes spill stores, 72 bytes spill loads
ptxas info : Function properties for _Z11brick_noisei
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Function properties for _Z11svm_checker6float3f
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Function properties for _Z11svm_voronoi19NodeVoronoiColoringf6float3
8 bytes stack frame, 4 bytes spill stores, 4 bytes spill loads
ptxas info : Function properties for _Z14shadow_blockedP13KernelGlobalsP9PathStateP3RayP6float3
2488 bytes stack frame, 952 bytes spill stores, 1004 bytes spill loads
ptxas info : Function properties for _Z14svm_eval_nodesP13KernelGlobalsP10ShaderData10ShaderTypefi
1136 bytes stack frame, 740 bytes spill stores, 1808 bytes spill loads
ptxas info : Function properties for _Z16noise_turbulence6float314NodeNoiseBasisfi
40 bytes stack frame, 80 bytes spill stores, 72 bytes spill loads
ptxas info : Function properties for _Z18noise_musgrave_fBm6float314NodeNoiseBasisfff
32 bytes stack frame, 92 bytes spill stores, 40 bytes spill loads
ptxas info : Function properties for _Z18shader_bsdf_sampleP13KernelGlobalsPK10ShaderDataffP8BsdfEvalP6float3P13differential3Pf
128 bytes stack frame, 1664 bytes spill stores, 1684 bytes spill loads
ptxas info : Function properties for _Z18svm_node_tex_coordP13KernelGlobalsP10ShaderDataPfjj
16 bytes stack frame, 12 bytes spill stores, 12 bytes spill loads
ptxas info : Function properties for _Z19svm_node_normal_mapP13KernelGlobalsP10ShaderDataPf5uint4
48 bytes stack frame, 48 bytes spill stores, 48 bytes spill loads
ptxas info : Function properties for _Z21svm_node_attr_bump_dyP13KernelGlobalsP10ShaderDataPf5uint4
16 bytes stack frame, 16 bytes spill stores, 48 bytes spill loads
ptxas info : Function properties for _Z26svm_node_tex_coord_bump_dxP13KernelGlobalsP10ShaderDataPfjj
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Function properties for _Z26svm_node_tex_coord_bump_dyP13KernelGlobalsP10ShaderDataPfjj
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Function properties for _Z28noise_musgrave_multi_fractal6float314NodeNoiseBasisfff
40 bytes stack frame, 108 bytes spill stores, 48 bytes spill loads
ptxas info : Function properties for _Z29noise_musgrave_hetero_terrain6float314NodeNoiseBasisffff
48 bytes stack frame, 128 bytes spill stores, 92 bytes spill loads
ptxas info : Function properties for _Z30shader_setup_object_transformsP13KernelGlobalsP10ShaderDataf
72 bytes stack frame, 172 bytes spill stores, 196 bytes spill loads
ptxas info : Function properties for _Z35noise_musgrave_hybrid_multi_fractal6float314NodeNoiseBasisfffff
56 bytes stack frame, 136 bytes spill stores, 112 bytes spill loads
ptxas info : Function properties for _Z35noise_musgrave_ridged_multi_fractal6float314NodeNoiseBasisfffff
56 bytes stack frame, 112 bytes spill stores, 64 bytes spill loads
ptxas info : Function properties for _Z6perlinfff
192 bytes stack frame, 188 bytes spill stores, 188 bytes spill loads
ptxas info : Function properties for _Z8svm_wave12NodeWaveType6float3ffff
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Function properties for _Z9cellnoise6float3
8 bytes stack frame, 4 bytes spill stores, 4 bytes spill loads
ptxas info : Function properties for _Z9svm_brick6float3ffffffifi
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Function properties for _Z9svm_magic6float3if
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
Kernel compilation finished in 38.13s.
CUDA error: Launch failed in cuCtxSynchronize()
CUDA error: Launch failed in cuGraphicsMapResources(1, &pmem.cuPBOresource, 0)
CUDA error: Launch failed in cuGraphicsResourceGetMappedPointer(&buffer, &bytes, pmem.cuPBOresource)
CUDA error: Launch failed in cuModuleGetFunction(&cuFilmConvert, cuModule, "kernel_cuda_tonemap")
CUDA error: Launch failed in cuParamSetv(cuFilmConvert, offset, &d_rgba, sizeof(d_rgba))
CUDA error: Launch failed in cuParamSetv(cuFilmConvert, offset, &d_buffer, sizeof(d_buffer))
CUDA error: Launch failed in cuParamSeti(cuFilmConvert, offset, task.sample)
CUDA error: Launch failed in cuParamSeti(cuFilmConvert, offset, task.resolution)
CUDA error: Launch failed in cuParamSeti(cuFilmConvert, offset, task.x)
CUDA error: Launch failed in cuParamSeti(cuFilmConvert, offset, task.y)
CUDA error: Launch failed in cuParamSeti(cuFilmConvert, offset, task.w)
CUDA error: Launch failed in cuParamSeti(cuFilmConvert, offset, task.h)
CUDA error: Launch failed in cuParamSeti(cuFilmConvert, offset, task.offset)
CUDA error: Launch failed in cuParamSeti(cuFilmConvert, offset, task.stride)
CUDA error: Launch failed in cuParamSetSize(cuFilmConvert, offset)
CUDA error: Unknown CUDA error value in cuFuncSetCacheConfig(cuFilmConvert, CU_FUNC_CACHE_PREFER_L1)
CUDA error: Launch failed in cuFuncSetBlockShape(cuFilmConvert, xthreads, ythreads, 1)
CUDA error: Launch failed in cuLaunchGrid(cuFilmConvert, xblocks, yblocks)
CUDA error: Launch failed in cuGraphicsUnmapResources(1, &pmem.cuPBOresource, 0)
CUDA error: Launch failed in cuCtxSynchronize()

Testing here on OS X 10.8.2, blender 2.65a, it works ok. Are you building with toolkit 4.2? If you still have 5.0 installed it might not work.

The output of this:
/usr/local/cuda/bin/nvcc --version

Should be:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2012 NVIDIA Corporation
Built on Sat_Apr__7_14:56:41_PDT_2012
Cuda compilation tools, release 4.2, V0.2.1221

Ok it seems both 4.2 and 5.0 are installed at the same time, mmmm il try to unstall 5.0 and report back here, any advice on removing 5.0 would be nice.
At the moment I'm re-downloading 5 to see if the 5.0 has a option to uninstall it, I saw under developer folder on root of drive has both 4.2 and 5.

5 has no option to uninstall it , guess ill install 4.2 again to see if it overwrites it.

It is now is 4.2 once again, and reports back below the same as you said ;).
Cuda compilation tools, release 4.2, V0.2.1221

Now when I run Blender( using a fresh copy of 2.65a) I just get the following lines below, but its much shorter then earlier progress I guess :p.
found bundled python: /Users/Steven/Downloads/Blender/blender.app/Contents/MacOS/2.65/python
CUDA error: Launch failed in cuCtxSynchronize()
CUDA error: Launch failed in cuGraphicsMapResources(1, &pmem.cuPBOresource, 0)
CUDA error: Launch failed in cuGraphicsResourceGetMappedPointer(&buffer, &bytes, pmem.cuPBOresource)
CUDA error: Launch failed in cuModuleGetFunction(&cuFilmConvert, cuModule, "kernel_cuda_tonemap")
CUDA error: Launch failed in cuParamSetv(cuFilmConvert, offset, &d_rgba, sizeof(d_rgba))
CUDA error: Launch failed in cuParamSetv(cuFilmConvert, offset, &d_buffer, sizeof(d_buffer))
CUDA error: Launch failed in cuParamSeti(cuFilmConvert, offset, task.sample)
CUDA error: Launch failed in cuParamSeti(cuFilmConvert, offset, task.resolution)
CUDA error: Launch failed in cuParamSeti(cuFilmConvert, offset, task.x)
CUDA error: Launch failed in cuParamSeti(cuFilmConvert, offset, task.y)
CUDA error: Launch failed in cuParamSeti(cuFilmConvert, offset, task.w)
CUDA error: Launch failed in cuParamSeti(cuFilmConvert, offset, task.h)
CUDA error: Launch failed in cuParamSeti(cuFilmConvert, offset, task.offset)
CUDA error: Launch failed in cuParamSeti(cuFilmConvert, offset, task.stride)
CUDA error: Launch failed in cuParamSetSize(cuFilmConvert, offset)
CUDA error: Unknown CUDA error value in cuFuncSetCacheConfig(cuFilmConvert, CU_FUNC_CACHE_PREFER_L1)
CUDA error: Launch failed in cuFuncSetBlockShape(cuFilmConvert, xthreads, ythreads, 1)
CUDA error: Launch failed in cuLaunchGrid(cuFilmConvert, xblocks, yblocks)
CUDA error: Launch failed in cuGraphicsUnmapResources(1, &pmem.cuPBOresource, 0)
CUDA error: Launch failed in cuCtxSynchronize()



Please test with recent 2.66 Testbuild again. http://download.blender.org/release/Blender2.66/

Finally fixed it.
After reinstalling 4.2 toolkit it showed in terminal it was 4.2 once again as you said it would, but yet the problem remained.
Well I opened the root of my drive and yet the 5.0 folder was still sitting there next to 4.2 folder so I sent it to the trash and bingo its working in fresh copy of 2.65a and the new test build for the next release 2.66. Basically somehow the 5.0 folder was conflicting with 4.2.
So finally its working how it should thank you all very much ;)

I am a little concerned how hard it could be for other mac users and hope that easy to follow instructions can be given to mac users.
Is there a wiki page I could update ? to put simple instructions for mac users.

Its working nicely now which is great, sorry for wasting your time, but bight-side is that the instructions can now be given and ill help other user's in the same mess .

Hi,
great that it works now.
We have infos in the Cycles wiki: http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/GPU_Rendering
See the point "On Mac OS X, no CUDA GPU is available".

>> Closing

Thomas Dinges (dingto) changed the task status from Unknown Status to Resolved.Feb 11 2013, 10:29 PM

To be clear I just added some extra details in that documentation based on this bug report, so thanks for testing.