# Pynq OpenCL parsing error

**URL:** <https://discuss.pynq.io/t/pynq-opencl-parsing-error/2081>\
**Category:** Support\
**Created:** [November 30, 2020, 10:56am UTC](https://discuss.pynq.io/t/pynq-opencl-parsing-error/2081 "2020-11-30T10:56:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bartokon](https://avatars.discourse-cdn.com/v4/letter/b/8edcca/32.png) [@bartokon](https://discuss.pynq.io/u/bartokon)\
**Post date:** [November 30, 2020, 10:56am UTC](https://discuss.pynq.io/t/pynq-opencl-parsing-error/2081/1 "2020-11-30T10:56:43Z")

</div>

Hello, I have created project based on “multiple\_kernels” example in Vitis and I have added my own IP something like this:

```
kernel void vecAdd( global double *a,                     
                       global double *b,                      
                       global double *c,                       
                       const unsigned int n,
int ide)                  
{                                                            
    //Get our global thread ID                                  
    int id = get_global_id(0);                                
     ide = id;                                                          
    //Make sure we do not go out of bounds                     
    if (id < n)                                                
        c[id] = a[id] + b[id] + id;                                
} 

```

I have tried to use this .xclbin in Pynq but I’m getting parsing error.  
`ol = Overlay("/media/sd-mmcblk0p1/multi_krnl.xclbin")`

```
    ValueError Traceback (most recent call last)
<ipython-input-3-4b6572ba9a4d> in <module>
----> 1 ol = Overlay("/media/sd-mmcblk0p1/multi_krnl.xclbin")

/usr/lib/python3.7/site-packages/pynq/overlay.py in __init__ (self, bitfile_name, dtbo, download, ignore_version, device)
    328 super(). __init__ (bitfile_name, dtbo, partial=False, device=device)
    329 
--> 330 self.parser = self.device.get_bitfile_metadata(self.bitfile_name)
    331 
    332 self.ip_dict = self.gpio_dict = self.interrupt_controllers = \

/usr/lib/python3.7/site-packages/pynq/pl_server/xrt_device.py in get_bitfile_metadata(self, bitfile_name)
    518 def get_bitfile_metadata(self, bitfile_name):
    519 from .xclbin_parser import XclBin
--> 520 return XclBin(bitfile_name)
    521 
    522 def get_exec_bo(self, size=1024):

/usr/lib/python3.7/site-packages/pynq/pl_server/xclbin_parser.py in __init__ (self, filename)
    284 """
    285 def __init__ (self, filename):
--> 286 self.ip_dict, self.mem_dict = _xclbin_to_dicts(filename)
    287 self.gpio_dict = {}
    288 self.interrupt_controllers = {}

/usr/lib/python3.7/site-packages/pynq/pl_server/xclbin_parser.py in _xclbin_to_dicts(filename)
    235 ip_dict = _xclxml_to_ip_dict(
    236 sections[xclbin.AXLF_SECTION_KIND.EMBEDDED_METADATA].decode(),
--> 237 xclbin_uuid)
    238 ip_layout = xclbin.ip_layout.from_buffer(
    239 sections[xclbin.AXLF_SECTION_KIND.IP_LAYOUT])

/usr/lib/python3.7/site-packages/pynq/pl_server/xclbin_parser.py in _xclxml_to_ip_dict(raw_xml, xclbin_uuid)
    128 'description': 'OpenCL Argument Register',
    129 'type': attrib['type'],
--> 130 'id': int(attrib['id'])
    131 }
    132 else:

ValueError: invalid literal for int() with base 10: ''   

```

Any ideas why it is crashing?  
I have created this design with petalinux 2020.2  
[multi\_krnl.zip](https://discuss.pynq.io/uploads/short-url/usDLfr7Bx84P7sVuuontvmKhVQd.zip) (1.0 MB)

- one more question, how can I provide libsensors for Pynq?  
I have tried several times with libsensors in petalinux, but still same error  
/usr/lib/python3.7/site-packages/pynq/pmbus.py:230: UserWarning: Could not initialise libsensors library  
warnings.warn(“Could not initialise libsensors library”)

Thanks 🙂
