Reputation: 10653
I have some PTX code that fails to load. I'm running this on a 650M, with OSX. Other CUDA examples run fine on the system, but when loading the module I always get error 209: CUDA_ERROR_NO_BINARY_FOR_GPU
What am I missing?
.version 3.1
.target sm_20, texmode_independent
.address_size 64
// .globl examples_2E_mandelbrot_2F_calc_2D_mandelbrot_2D_ptx
.entry examples_2E_mandelbrot_2F_calc_2D_mandelbrot_2D_ptx(
.param .u64 .ptr .global .align 8 examples_2E_mandelbrot_2F_calc_2D_mandelbrot_2D_ptx_param_0,
.param .f64 examples_2E_mandelbrot_2F_calc_2D_mandelbrot_2D_ptx_param_1,
.param .f64 examples_2E_mandelbrot_2F_calc_2D_mandelbrot_2D_ptx_param_2,
.param .f64 examples_2E_mandelbrot_2F_calc_2D_mandelbrot_2D_ptx_param_3
)
{
.reg .pred %p<396>;
.reg .s16 %rc<396>;
.reg .s16 %rs<396>;
.reg .s32 %r<396>;
.reg .s64 %rl<396>;
.reg .f32 %f<396>;
.reg .f64 %fl<396>;
ld.param.u64 %rl0, [examples_2E_mandelbrot_2F_calc_2D_mandelbrot_2D_ptx_param_0];
mov.b64 func_retval0, %rl0;
ret;
}
Upvotes: 4
Views: 4879
Reputation: 465
Great advice on running ptxas. I was getting error 209: Problem turned out to be __shared__ memory was oversubscribed. Used to be this would be a warning on compile. I have Cuda 5.5 and no warnings on compile now -- even with verbose turned on. thanks
Upvotes: 1
Reputation: 72349
You are getting the error because your PTX contains a syntax error and it is never compiling as a result. The line
mov.b64 func_retval0, %rl0;
references a label func_retval0
, but that isn't defined in the PTX file anywhere. You can check this by trying to compile the PTX with the toolchain yourself:
$ ptxas -arch=sm_20 own.ptx
ptxas own.ptx, line 24; error : Arguments mismatch for instruction 'mov'
ptxas own.ptx, line 24; error : Unknown symbol 'func_retval0'
ptxas own.ptx, line 24; error : Label expected for forward reference of 'func_retval0'
ptxas fatal : Ptx assembly aborted due to errors
Upvotes: 6