gpuocelot: syntax error when parsing DWARF info

Trying to run


.version 7.5
.target sm_35
.address_size 64

        // .globl       E__012

.visible .entry E__012(
        .param .u64 E__012_param_0,
        .param .u64 E__012_param_1,
        .param .u64 E__012_param_2
)
.maxntid 128, 1, 1
{
        .reg .pred      %p<4>;
        .reg .b32       %r<5>;
        .reg .f32       %f<4>;
        .reg .b64       %rd<4>;
        .loc    1 5 0
$L__func_begin0:
        .loc    1 5 0

        ld.param.u64    %rd3, [E__012_param_0];
        ld.param.u64    %rd1, [E__012_param_1];
        mov.pred        %p1, -1;
$L__tmp0:
        .loc    1 6 19
        mov.u32 %r1, 0x0;
        @%p1 ld.global.b32 { %r1 }, [ %rd1 + 0 ];
        mov.b32         %f1, %r1;
        ld.param.u64    %rd2, [E__012_param_2];
        .loc    1 7 19
        mov.u32 %r2, 0x0;
        @%p1 ld.global.b32 { %r2 }, [ %rd2 + 0 ];
        mov.b32         %f2, %r2;
        .loc    1 8 18
        add.f32         %f3, %f1, %f2;
        .loc    1 9 22
        mov.u32         %r4, %tid.x;
        setp.eq.s32     %p3, %r4, 0;
        mov.b32         %r3, %f3;
        @%p3 st.global.b32 [ %rd3 + 0 ], { %r3 };
        .loc    1 9 2
        ret;
$L__tmp1:
$L__func_end0:

}
        .file   1 "/tmp/fdd8645ffd4a0efbff44b049ab8c6846.py"
        .section        .debug_abbrev
        {
.b8 1
.b8 17
.b8 1
.b8 37
.b8 8
.b8 19
.b8 5
.b8 3
.b8 8
.b8 16
.b8 6
.b8 27
.b8 8
.b8 180
.b8 66
.b8 12
.b8 17
.b8 1
.b8 18
.b8 1
.b8 0
.b8 0
.b8 2
.b8 46
.b8 0
.b8 17
.b8 1
.b8 18
.b8 1
.b8 64
.b8 10
.b8 135
.b8 64
.b8 8
.b8 3
.b8 8
.b8 58
.b8 11
.b8 59
.b8 11
.b8 63
.b8 12
.b8 0
.b8 0
.b8 0
        }
        .section        .debug_info
        {
.b32 116
.b8 2
.b8 0
.b32 .debug_abbrev
.b8 8
.b8 1
.b8 116
.b8 114
.b8 105
.b8 116
.b8 111
.b8 110
.b8 0
.b8 2
.b8 0
.b8 102
.b8 100
.b8 100
.b8 56
.b8 54
.b8 52
.b8 53
.b8 102
.b8 102
.b8 100
.b8 52
.b8 97
.b8 48
.b8 101
.b8 102
.b8 98
.b8 102
.b8 102
.b8 52
.b8 52
.b8 98
.b8 48
.b8 52
.b8 57
.b8 97
.b8 98
.b8 56
.b8 99
.b8 54
.b8 56
.b8 52
.b8 54
.b8 46
.b8 112
.b8 121
.b8 0
.b32 .debug_line
.b8 47
.b8 116
.b8 109
.b8 112
.b8 0
.b8 1
.b64 $L__func_begin0
.b64 $L__func_end0
.b8 2
.b64 $L__func_begin0
.b64 $L__func_end0
.b8 1
.b8 156
.b8 69
.b8 95
.b8 95
.b8 48
.b8 49
.b8 50
.b8 0
.b8 69
.b8 95
.b8 95
.b8 48
.b8 49
.b8 50
.b8 0
.b8 1
.b8 5
.b8 1
.b8 0
        }
        .section        .debug_pubnames
        {
.b32 $L__pubNames_end0-$L__pubNames_start0
$L__pubNames_start0:
.b8 2
.b8 0
.b32 .debug_info
.b32 120
.b32 83
.b8 69
.b8 95
.b8 95
.b8 48
.b8 49
.b8 50
.b8 0
.b32 0
$L__pubNames_end0:
        }
        .section        .debug_pubtypes
        {
.b32 $L__pubTypes_end0-$L__pubTypes_start0
$L__pubTypes_start0:
.b8 2
.b8 0
.b32 .debug_info
.b32 120
.b32 0
$L__pubTypes_end0:
        }
        .section        .debug_loc      {       }

results in ocelot throwing

terminate called after throwing an instance of 'parser::PTXParser::Exception'
  what():  
Failed to parse file '':
43      setp.eq.s32     %p3, %r4, 0;
44      mov.b32         %r3, %f3;
45      @%p3 st.global.b32 [ %rd3 + 0 ], { %r3 };
46      .loc    1 9 2
47      ret;
48 $L__tmp1:
49 $L__func_end0:
50 
51 }
52      .file   1 "/tmp/fdd8645ffd4a0efbff44b049ab8c6846.py"
53      .section        .debug_abbrev
54      {
55 .b8 1
56 .b8 17
57 .b8 1
58 .b8 37
59 .b8 8
60 .b8 19
61 .b8 5
62 .b8 3
63 
 (53, 5):  syntax error
Aborted (core dumped)

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (15 by maintainers)

Most upvoted comments

Trust me, I’m as puzzled by this as you are

It’s generated by the triton compiler and seems to actually be just like the initializer list from c++ https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#initializers 5.4.4 if the header permalink doesn’t work