inducer / pyopencl

OpenCL integration for Python, plus shiny features
http://mathema.tician.de/software/pyopencl
Other
1.04k stars 238 forks source link

remove print-binary.py #685

Closed matthiasdiener closed 1 year ago

matthiasdiener commented 1 year ago

With decode() and pocl, this results in the following error:

$ python experiments/print-binary.py foo.cl
Traceback (most recent call last):
  File "/Users/mdiener/Work/drivers_y3-prediction-esdg/emirge/pyopencl/experiments/print-binary.py", line 13, in <module>
    print(prg.binaries[0].decode("utf-8"))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9f in position 8: invalid start byte

With this PR:

$ python experiments/print-binary.py foo.cl
poclbinŸ„|Ç¿zžÖ LN/PIKEMMJELAABPLIMDDGLDMIKPKNLCOPMBLENOƒˆ
                                                          /program.bcpˆÞÀ
[...]

This is the only file in experiments, so I thought it may be a candidate to move to scripts.

isuruf commented 1 year ago

contrib/cldis.py has kind of the same functionality right?

inducer commented 1 year ago

Yeah, let's just get rid of print-binary.

matthiasdiener commented 1 year ago

Sounds good, I changed this PR to remove it.

inducer commented 1 year ago

Thanks!