There are two cubins. one is "good.cubin", generated by ptxas. the other
is "bad.cubin" generated by asfermi.
cuobjdump --dump-sass good.cubin
code for sm_20
Function : f
/*0000*/ /*0x00005de428004404*/ MOV R1, c [0x1] [0x100];
/*0008*/ /*0x8000dde428004000*/ MOV R3, c [0x0] [0x20];
/*0010*/ /*0x00301c8580000000*/ LD R0, [R3];
/*0018*/ /*0x10309c8580000000*/ LD R2, [R3+0x4];
/*0020*/ /*0x00201c0348000000*/ IADD R0, R2, R0;
/*0028*/ /*0x30301c8590000000*/ ST [R3+0xc], R0;
/*0030*/ /*0x00001de780000000*/ EXIT;
and
cuobjdump --dump-sass bad.cubin
code for sm_20
Function : f
/*0000*/ /*0x00005de428004404*/ MOV R1, c [0x1] [0x100];
/*0008*/ /*0x8000dde428004000*/ MOV R3, c [0x0] [0x20];
/*0010*/ /*0x00301c8580000000*/ LD R0, [R3];
/*0018*/ /*0x10309c8580000000*/ LD R2, [R3+0x4];
/*0020*/ /*0x00201c0348000000*/ IADD R0, R2, R0;
/*0028*/ /*0x30301c8590000000*/ ST [R3+0xc], R0;
/*0030*/ /*0x00001de780000000*/ EXIT;
Yes! they are exactly the same.
The common protype is:
__global__ void f(int *p)
{
p[3] = p[0] + p[2];
}
However, good_by_ptxas.cubin will run on almost all cards. and
bad_by_asfermi.cubin will not run all sm_20 cards, and could only run on
GT430/GT520-like low end card.
bad_by_asfermi.cubin will give access violation on GTX480/GTX460 cards.
Any ideas?
Thank you!
Sun HuanHuan
>
> The common protype is:
> __global__ void f(int *p)
> {
> p[3] = p[0] + p[2];
+P[1];
> }
typo.
:(
WOW! It's resolved!
Thank HYQ the great who helped in figuring out where the problem is.
Actually the two cubins are not the same.
I missed the !param which seemed to be some info for parameter
size/space. I added !param 4 and now it worked.
And,
LD/ST/RED/ATOM has nothing to do with SP! So please ignore the post
yesterday in which I think LD relies on SP which is not corret.
HuanHuan
:)
--
You received this message because you are subscribed to the Google Groups "asfermi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to asfermi+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.