PTXParser::Exception: unexpected ','

84 views
Skip to first unread message

Henning Lohse

unread,
Oct 24, 2014, 7:15:48 AM10/24/14
to gpuo...@googlegroups.com
Hi all,

I built ocelot using revision 2235, LLVM using revision 183385 and CUDA 5.5.
My GPU is using a GF100 Fermi, therefore I compile using -arch=sm_20;

The following code is used to test ocelot:


#include <cuda.h>
#include <cuda_runtime.h>

__global__ void someKernel(char* buffer)
{  
    volatile int idx = blockIdx.x*blockDim.x + threadIdx.x;
    buffer[idx] = 10;
}

int main(int argc, char* argv[])
{  
    char buffer[10];
    someKernel<<<2, 5>>>(buffer);
    cudaDeviceSynchronize();
}

$ /usr/local/cuda-5.5/bin/nvcc -O0 -c main.cu -arch=sm_20
$ /usr/local/cuda-5.5/bin/nvcc -O0 main.o -o main -L/usr/local/cuda-5.5/lib64 -locelot


The following exception occurs during execution:


$ ./main
terminate called after throwing an instance of 'parser::PTXParser::Exception'
  what(): 
Failed to parse file 'main.cu':
2
3
4
5
6
7 .version 3.2
8 .target sm_20
9 .address_size 64
10
11 .file        1 "/hlohse/ocelot.test/main.cu", 1414148380, 295
12
13 .visible .entry _Z10someKernelPc(
14 .param .u64 _Z10someKernelPc_param_0
15 )
16 {
17 .local .align 4 .b8 __local_depot0[4];
18 .reg .b64 %SP;
19 .reg .b64 %SPL;
20 .reg .s16 %rs<2>;
21 .reg .s32 %r<5>;
22
main.cu (11, 41):  syntax error, unexpected ','
Aborted (core dumped)


Could someone help me with this problem? Is the PTX output bugged, or how can I fix nvcc's PTX output? Many thanks in advance.

Best Regards,
Henning Lohse

Jin Wang

unread,
Nov 6, 2014, 12:43:09 PM11/6/14
to gpuo...@googlegroups.com
Hi Henning,

The error is because that the PTX Parser in ocelot does not recognize the ptx code generated by CUDA 5.5. While we are working on making the ocelot to support newer version of PTX code, the easiest way of getting around this error is to roll back to an earlier version of CUDA. Ocelot has been tested with CUDA 4.2 and possibly CUDA 5.0.

Regards,

Jin

Diogo Sampaio

unread,
Nov 11, 2014, 5:40:27 AM11/11/14
to gpuo...@googlegroups.com
An possible easy workaround to remove the lines that begin with
".file" using any text tool and see if all the rest works.
> --
> You received this message because you are subscribed to the Google Groups
> "gpuocelot" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to gpuocelot+...@googlegroups.com.
> To post to this group, send email to gpuo...@googlegroups.com.
> Visit this group at http://groups.google.com/group/gpuocelot.
> For more options, visit https://groups.google.com/d/optout.



--
Diogo Nunes Sampaio

Jason Wong

unread,
Jan 30, 2018, 9:33:28 AM1/30/18
to gpuocelot
Where's revision 2235 now, Jin? Is it quite different to the latest? 

Very many thanks

Jin Wang

unread,
Jan 30, 2018, 1:07:10 PM1/30/18
to gpuo...@googlegroups.com
Hi Jason,

GPUOcelot is not actively maintained. The latest repo is available at https://github.com/gtcasl/gpuocelot

jin

--
You received this message because you are subscribed to the Google Groups "gpuocelot" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gpuocelot+...@googlegroups.com.
To post to this group, send email to gpuo...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages