Skip to content

Can't decode comm_id #586

Open
Open
@wangluochao902

Description

@wangluochao902

Hi,
I can't decode the comm_id (Unique clique id) with 'utf-8'. Can anyone tell me how to decode it?

python = 2.7.16
theano = 1.0.3
pygpu = 0.7.6

>>> import theano
Using cuDNN version 5110 on context None
Mapped name None to device cuda: Tesla K80 (0000:00:04.0)
>>> from pygpu import collectives
>>> ctx = theano.gpuarray.type.get_context(None)
>>> local_id = collectives.GpuCommCliqueId(context=ctx)
>>> comm_id = local_id.comm_id
>>> comm_id.decode('utf-8')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/Tom/anaconda3/envs/theano/lib/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe4 in position 2: invalid continuation byte
>>> comm_id
bytearray(b'\x02\x00\xe4Q\n\x80\x00\n\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x90\xe4\xb3\x81U\x00\x00\x84v\x97|\x01\x00\x00\x00$"\x00\x00\x00\x00\x00\x00\x00w\x82\x1a\xe2\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions