doing
ptxas CUDA_extentions_mat.ptx
with attached minimal test case crashes.
Btw. it would be nice if you could allow adding files with .ptx extension here…
gdb backtrace:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47942369332000 (LWP 30372)]
0x000000000044317f in InitializeNodesToFloatingPoint ()
(gdb) bt #0 0x000000000044317f in InitializeNodesToFloatingPoint () #1 0x0000000000442a22 in SetRefCount () #2 0x00000000004d983c in OriUpdateBvLive () #3 0x00000000004d935a in OriUpdateBvLive () #4 0x0000000000453686 in PropagateTest () #5 0x0000000000453723 in PropagateTest () #6 0x00000000004d9283 in OriUpdateBvLive () #7 0x000000000047469f in CopyDag () #8 0x00000000004691d0 in TransformAssignConstantsToRegisters () #9 0x0000000000455a9d in TransformExpandSqrtToRcpRsqrt () #10 0x000000000041e982 in stdStringEqual () #11 0x000000000040f959 in __gxx_personality_v0 () at …/…/…/…/libstdc+±v3/libsupc++/eh_personality.cc:351 #12 0x000000000041902d in __gxx_personality_v0 () at …/…/…/…/libstdc+±v3/libsupc++/eh_personality.cc:351 #13 0x000000000040f3b4 in __gxx_personality_v0 () at …/…/…/…/libstdc+±v3/libsupc++/eh_personality.cc:351 #14 0x00002b9a73b27ae4 in __libc_start_main () from /lib64/libc.so.6 #15 0x000000000040d3f9 in __gxx_personality_v0 () at …/…/…/…/libstdc+±v3/libsupc++/eh_personality.cc:351 #16 0x00007fff37f58ab8 in ?? () #17 0x0000000000000000 in ?? ()
The problem seems to exist with the older ptxas from CUDA 1.1, too.
I’d be happy about both a fixed version or a hint how I can avoid the problem. CUDA_extentions_mat.txt (561 Bytes)
We believe that we’ve found a workaround, as the input program is incorrect? Shouldn’t __cudaparm__Z4AmulP6float2S0_7textureIS_Li2EL19cudaTextureReadMode0EEPiii_values;
be from .tex space?
Changing it to
.tex .u64 __cudaparm__Z4AmulP6float2S0_7textureIS_Li2EL19cudaTextureReadMode0EEPiii_values;
makes it work.
Was your ptx generated from a .cu file or did you write it manually?
Ah, I do not know enough about .ptx yet, so I did not notice
It was generated from a .cu file, but with as much code as possible removed.
I attached a minimal .cu file that leads to the same problem.
I admit none of the examples seem to pass textures as function parameters, maybe that is the problem? I only did it because doing it differently would require a few more changes to the code and I am lazy :) test_cu.txt (117 Bytes)
The segfault will be fixed in the 2.0-final release. Both of your test examples attached here will result in the following output from ptxas:
ptxas CUDA_extentions_mat.ptx, line 9; error : State space mismatch between instruction and address in instruction ‘tex’
Thanks. If you haven’t done so, maybe you could add a sentence about it to the documentation? Currently I can only find “A texture reference is declared at file scope as a variable of type texture:” but no mention about where a texture reference can be used as function argument (it seems to work for host functions, not for global functions, and maybe, maybe not for device functions).