Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.0.0][OpenCL] issue with pocl 5.0.2 -- help :) #4073

Closed
picca opened this issue Mar 2, 2024 · 4 comments
Closed

[2.0.0][OpenCL] issue with pocl 5.0.2 -- help :) #4073

picca opened this issue Mar 2, 2024 · 4 comments
Milestone

Comments

@picca
Copy link
Contributor

picca commented Mar 2, 2024

Hello, I have this issue in the autopkgtest of silxs 2.0.0

https://ci.debian.net/packages/s/silx/testing/amd64/43428196/

here the buf report related to this issue

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1060318#10

I am not yet a specialiste of PyOpenCL/OpenCL/pocl debugging.

Could you help me debug this issue.

For information If I build the same code on Debian12 with pocl 3.x it works.

thanks for considering.

Fred.

PS: Next step would be to run this on this platform with real GPU hardware :)

https://ci.rocm.debian.net/packages/r/rocfft/

@t20100 t20100 added this to the 2.1.0 milestone Mar 4, 2024
@kif
Copy link
Member

kif commented Mar 11, 2024

Tested on PoCL 3, 4 and 5:

POCL3: OpenCL 3.0 PoCL 3.1+debian Linux, None+Asserts, RELOC, SPIR, LLVM 15.0.6, SLEEF, DISTRO, POCL_DEBUG

lintaillefer:~/workspace/silx % PYOPENCL_CTX=portable POCL_DEBUG=all POCL_WORK_GROUP_METHOD=cbs  ./run_tests.py src/silx/image/test/test_medianfilter.py -vv
INFO:silx.setup:Install requires: numpy >=1.24.2
Building silx to /users/kieffer/workspace-400/silx/build/lib.linux-x86_64-3.11
INFO:silx.setup:Install requires: numpy >=1.24.2
INFO:root:running build
INFO:root:running build_py
INFO:root:running build_ext
INFO: Disabling color, you really want to install colorlog.
INFO:pythran:Disabling color, you really want to install colorlog.
/usr/lib/python3/dist-packages/pythran/tables.py:4530: FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
  if not hasattr(numpy, method):
/usr/lib/python3/dist-packages/pythran/tables.py:4563: FutureWarning: In the future `np.bytes` will be defined as the corresponding NumPy scalar.
  obj = getattr(themodule, elem)
Patched sys.path, added: '/users/kieffer/workspace-400/silx/build/lib.linux-x86_64-3.11'
==================================================================================== test session starts =====================================================================================
platform linux -- Python 3.11.2, pytest-7.2.1, pluggy-1.0.0+repack -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /users/kieffer/workspace-400/silx/build/lib.linux-x86_64-3.11/silx, configfile: ../../../pytest.ini
plugins: mock-3.8.2, xvfb-2.0.0
collected 2 items                                                                                                                                                                            

build/lib.linux-x86_64-3.11/silx/image/test/test_medianfilter.py::TestMedianFilterEngines::testCppMedFilt2d PASSED                                                                     [ 50%]
build/lib.linux-x86_64-3.11/silx/image/test/test_medianfilter.py::TestMedianFilterEngines::testOpenCLMedFilt2d PASSED                                                                  [100%]

===================================================================================== 2 passed in 0.52s ======================================================================================
[2024-03-11 12:22:16.793487736] POCL: in fn POclReleaseContext at line 48:
  *** INFO ***  | REFCOUNTS |  Release Context 20 (0x26b8b30), Refcount: 1

PoCL4: OpenCL 3.0 PoCL 4.0 Linux, Debug+Asserts, RELOC, SPIR, SPIR-V, LLVM 15.0.6, SLEEF, CUDA, POCL_DEBUG

[ ... ]
Patched sys.path, added: '/users/kieffer/workspace-400/silx/build/lib.linux-x86_64-3.11'
==================================================================================== test session starts =====================================================================================
platform linux -- Python 3.11.2, pytest-7.2.1, pluggy-1.0.0+repack -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /users/kieffer/workspace-400/silx/build/lib.linux-x86_64-3.11/silx, configfile: ../../../pytest.ini
plugins: mock-3.8.2, xvfb-2.0.0
collected 2 items                                                                                                                                                                            

build/lib.linux-x86_64-3.11/silx/image/test/test_medianfilter.py::TestMedianFilterEngines::testCppMedFilt2d PASSED                                                                     [ 50%]
build/lib.linux-x86_64-3.11/silx/image/test/test_medianfilter.py::TestMedianFilterEngines::testOpenCLMedFilt2d PASSED                                                                  [100%]

===================================================================================== 2 passed in 1.65s ======================================================================================
[2024-03-11 12:23:12.822077758] POCL: in fn POclReleaseContext at line 48:
  *** INFO ***  | REFCOUNTS |  Release Context 36 (0xc5c5530), Refcount: 1

PoCL5: OpenCL 3.0 PoCL 5.0 Linux, Debug+Asserts, RELOC, SPIR, SPIR-V, LLVM 15.0.6, SLEEF, POCL_DEBUG

Patched sys.path, added: '/users/kieffer/workspace-400/silx/build/lib.linux-x86_64-3.11'
==================================================================================== test session starts =====================================================================================
platform linux -- Python 3.11.2, pytest-7.2.1, pluggy-1.0.0+repack -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /users/kieffer/workspace-400/silx/build/lib.linux-x86_64-3.11/silx, configfile: ../../../pytest.ini
plugins: mock-3.8.2, xvfb-2.0.0
collected 2 items                                                                                                                                                                            

build/lib.linux-x86_64-3.11/silx/image/test/test_medianfilter.py::TestMedianFilterEngines::testCppMedFilt2d PASSED                                                                     [ 50%]
build/lib.linux-x86_64-3.11/silx/image/test/test_medianfilter.py::TestMedianFilterEngines::testOpenCLMedFilt2d PASSED                                                                  [100%]

===================================================================================== 2 passed in 0.52s ======================================================================================
[2024-03-11 12:28:26.268747955] POCL: in fn POclReleaseContext at line 53:
  *** INFO ***  | REFCOUNTS |  Release Context 20 (0x2c071c0), Refcount: 1

apparently it works with PoCL5 and LLVM15 (debian stable)

@kif
Copy link
Member

kif commented Mar 11, 2024

I managed to get it crashing with:
OpenCL 3.0 PoCL 5.0 Linux, Debug+Asserts, RELOC, SPIR, SPIR-V, LLVM 16.0.6, SLEEF, POCL_DEBUG

@kif
Copy link
Member

kif commented Mar 11, 2024

So the regression appears to be more in LLVM than in PoCL ...

@t20100
Copy link
Member

t20100 commented Apr 18, 2024

This has been fixed in pocl: pocl/pocl#1435 (comment)

Please reopen if needed

@t20100 t20100 closed this as completed Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants