Skip to content

Conversation

@kif
Copy link
Member

@kif kif commented Nov 21, 2025

close #2560

@kif kif requested a review from gudlot November 21, 2025 15:29
@kif
Copy link
Member Author

kif commented Nov 21, 2025

@gudlot can you test on your computer ? (without the "-o" option)

@kif
Copy link
Member Author

kif commented Nov 21, 2025

Testing on a computer with python3.12, MacOSX 10.13 and OpenCL:
[0] <pyopencl.Device 'Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz' on 'Apple' at 0xffffffff>
[1] <pyopencl.Device 'AMD Radeon R9 M370X Compute Engine' on 'Apple' at 0x1021c00>
[2] <pyopencl.Device 'Iris Pro' on 'Apple' at 0x1024500>
Only the former is an issue.

Apparently, all OpenCL test supposed to pass are passing:

======================================================================
SKIPPED: runTest (pyFAI.gui.test.SkipGuiTest.runTest)
----------------------------------------------------------------------
pyFAI.gui tests disabled (Skipped by command line)
======================================================================
SKIPPED: test_hexagonal_detector (pyFAI.test.test_detector.TestDetector.test_hexagonal_detector)
----------------------------------------------------------------------
SplitPixel does not work (yet) with hexagonal pixels: pos.shape[0] == size
======================================================================
SKIPPED: test_sparse_fullsplit (pyFAI.test.test_sparse.TestSparseIntegrate2d.test_sparse_fullsplit)
----------------------------------------------------------------------
Fix this test
======================================================================
SKIPPED: test_opencl_csr (pyFAI.test.test_csr.TestCSR.test_opencl_csr)
SKIPPED: test_peakfinder (pyFAI.opencl.test.test_peak_finder.TestOclPeakFinder.test_peakfinder)
test for peakfinder
----------------------------------------------------------------------
Apple platform detected
======================================================================
SKIPPED: testCheckCalib (pyFAI.test.test_scripts.TestScriptsHelp.testCheckCalib)
SKIPPED: testMxcalibrate (pyFAI.test.test_scripts.TestScriptsHelp.testMxcalibrate)
SKIPPED: testPilx (pyFAI.test.test_scripts.TestScriptsHelp.testPilx)
SKIPPED: testPyfaiBenchmark (pyFAI.test.test_scripts.TestScriptsHelp.testPyfaiBenchmark)
SKIPPED: testPyfaiCalib (pyFAI.test.test_scripts.TestScriptsHelp.testPyfaiCalib)
SKIPPED: testPyfaiDrawmask (pyFAI.test.test_scripts.TestScriptsHelp.testPyfaiDrawmask)
SKIPPED: testPyfaiIntegrate (pyFAI.test.test_scripts.TestScriptsHelp.testPyfaiIntegrate)
SKIPPED: testPyfaiRecalib (pyFAI.test.test_scripts.TestScriptsHelp.testPyfaiRecalib)
----------------------------------------------------------------------
no GUI
======================================================================
SKIPPED: test_reference_book (pyFAI.opencl.test.test_openCL.TestSort.test_reference_book)
SKIPPED: test_reference_file (pyFAI.opencl.test.test_openCL.TestSort.test_reference_file)
SKIPPED: test_sort_all (pyFAI.opencl.test.test_openCL.TestSort.test_sort_all)
SKIPPED: test_sort_horizontal (pyFAI.opencl.test.test_openCL.TestSort.test_sort_horizontal)
SKIPPED: test_sort_vertical (pyFAI.opencl.test.test_openCL.TestSort.test_sort_vertical)
----------------------------------------------------------------------
known buggy configuration
======================================================================
SKIPPED: test_filter_hor (pyFAI.opencl.test.test_ocl_sort.TestOclSort.test_filter_hor)
SKIPPED: test_filter_vert (pyFAI.opencl.test.test_ocl_sort.TestOclSort.test_filter_vert)
SKIPPED: test_mean_hor (pyFAI.opencl.test.test_ocl_sort.TestOclSort.test_mean_hor)
SKIPPED: test_mean_vert (pyFAI.opencl.test.test_ocl_sort.TestOclSort.test_mean_vert)
SKIPPED: test_sigma_clip_hor (pyFAI.opencl.test.test_ocl_sort.TestOclSort.test_sigma_clip_hor)
SKIPPED: test_sigma_clip_vert (pyFAI.opencl.test.test_ocl_sort.TestOclSort.test_sigma_clip_vert)
SKIPPED: test_sort_hor (pyFAI.opencl.test.test_ocl_sort.TestOclSort.test_sort_hor)
SKIPPED: test_sort_vert (pyFAI.opencl.test.test_ocl_sort.TestOclSort.test_sort_vert)
----------------------------------------------------------------------
Known buggy configuration
----------------------------------------------------------------------
Ran 544 tests in 268.526s

OK (skipped=26)

@gudlot
Copy link
Collaborator

gudlot commented Nov 22, 2025

@kif

Hi Jerome,

I tested PR #2702 on my current Mac:

MacBook Pro (2019, Intel/AMD)

  • GPUs: Intel UHD 630 (integrated), AMD Radeon Pro 5300M (discrete)
  • VRAM: 1.5 GB / 4 GB
  • Metal support: Metal 3
  • OpenCL: unavailable (PyOpenCL cannot find a platform)

I ran:
git fetch upstream pull/2702/head:pr-2702
git checkout pr-2702
python run_tests.py -x

All CPU-based tests passed. OpenCL-dependent tests were skipped. I also tried using POCL (CPU OpenCL), but PyOpenCL still could not find any platforms on macOS. This seems related to Apple’s deprecation of OpenCL in favor of Metal.

My output with python run_tests.py -x:

======================================================================
SKIPPED: runTest (pyFAI.gui.test.SkipGuiTest.runTest)
----------------------------------------------------------------------
pyFAI.gui tests disabled (Skipped by command line)
======================================================================
SKIPPED: test_histo (pyFAI.test.test_azimuthal_integrator.TestIntergrationNextGeneration.test_histo)
----------------------------------------------------------------------
Skipping TestIntergrationNextGeneration.test_histo as OpenCL method not available
======================================================================
SKIPPED: test_hexagonal_detector (pyFAI.test.test_detector.TestDetector.test_hexagonal_detector)
----------------------------------------------------------------------
SplitPixel does not work (yet) with hexagonal pixels: pos.shape[0] == size
======================================================================
SKIPPED: test_sparse_fullsplit (pyFAI.test.test_sparse.TestSparseIntegrate2d.test_sparse_fullsplit)
----------------------------------------------------------------------
Fix this test
======================================================================
SKIPPED: test_opencl_csr (pyFAI.test.test_csr.TestCSR.test_opencl_csr)
----------------------------------------------------------------------
Test on OpenCL disabled
======================================================================
SKIPPED: test_bug_2538 (pyFAI.test.test_bug_regression.TestBugRegression.test_bug_2538)
This bug is creating an infinite loop when some bins have no contributing pixels
SKIPPED: test_add (pyFAI.opencl.test.test_addition.TestAddition.test_add)
tests the addition  kernel
SKIPPED: test_measurement (pyFAI.opencl.test.test_addition.TestAddition.test_measurement)
tests that all devices are working properly ...
SKIPPED: test_preproc (pyFAI.opencl.test.test_preproc.TestPreproc.test_preproc)
tests the preproc kernel
SKIPPED: test_histogram1d (pyFAI.opencl.test.test_ocl_histo.TestOclHistogram.test_histogram1d)
tests the 1d histogram kernel
SKIPPED: test_histogram2d (pyFAI.opencl.test.test_ocl_histo.TestOclHistogram.test_histogram2d)
tests the 2D histogram kernel
SKIPPED: test_integrate_ng (pyFAI.opencl.test.test_ocl_azim_csr.TestOclAzimCSR.test_integrate_ng)
tests the 1d histogram kernel, default block size
SKIPPED: test_integrate_ng_single (pyFAI.opencl.test.test_ocl_azim_csr.TestOclAzimCSR.test_integrate_ng_single)
tests the 1d histogram kernel, default block size
SKIPPED: test_medfilt (pyFAI.opencl.test.test_ocl_azim_csr.TestOclAzimCSR.test_medfilt)
tests the median filtering kernel, default block size
SKIPPED: test_sigma_clip (pyFAI.opencl.test.test_ocl_azim_csr.TestOclAzimCSR.test_sigma_clip)
tests the sigma-clipping kernel, default block size
SKIPPED: test_integrate_ng (pyFAI.opencl.test.test_ocl_azim_lut.TestOclAzimLUT.test_integrate_ng)
tests the 1d histogram kernel
SKIPPED: test_azimuthal_peak_finder (pyFAI.opencl.test.test_peak_finder.TestOclPeakFinder.test_azimuthal_peak_finder)
test for peak picker with background calculate from an azimuthal sigma-clipping
SKIPPED: test_azimuthal_peak_finder_chauvenet (pyFAI.opencl.test.test_peak_finder.TestOclPeakFinder.test_azimuthal_peak_finder_chauvenet)
test for peak picker with background calculate from an azimuthal sigma-clipping
SKIPPED: test_azimuthal_peak_finder_single (pyFAI.opencl.test.test_peak_finder.TestOclPeakFinder.test_azimuthal_peak_finder_single)
test for peak picker with background calculate from an azimuthal sigma-clipping
SKIPPED: test_peakfinder (pyFAI.opencl.test.test_peak_finder.TestOclPeakFinder.test_peakfinder)
test for peakfinder
SKIPPED: test_simple_peak_finder (pyFAI.opencl.test.test_peak_finder.TestOclPeakFinder.test_simple_peak_finder)
test for simple peak picker
SKIPPED: test_Blelloch (pyFAI.opencl.test.test_collective.TestGroupFunction.test_Blelloch)
tests the Blelloch scan function
SKIPPED: test_Blelloch_multipass (pyFAI.opencl.test.test_collective.TestGroupFunction.test_Blelloch_multipass)
tests the Blelloch cumsum using multiple passes ...
SKIPPED: test_Hillis_Steele (pyFAI.opencl.test.test_collective.TestGroupFunction.test_Hillis_Steele)
tests the Hillis_Steele scan function
SKIPPED: test_atomic (pyFAI.opencl.test.test_collective.TestGroupFunction.test_atomic)
tests the sum_int_atomic function
SKIPPED: test_reduction (pyFAI.opencl.test.test_collective.TestGroupFunction.test_reduction)
tests the sum_int_reduction function
SKIPPED: test_sort (pyFAI.opencl.test.test_collective.TestGroupFunction.test_sort)
tests the sort of floating points in a workgroup
SKIPPED: test_sort4 (pyFAI.opencl.test.test_collective.TestGroupFunction.test_sort4)
tests the sort of floating points in a workgroup
----------------------------------------------------------------------
PyOpenCl is missing
======================================================================
SKIPPED: test_opencl (pyFAI.test.test_preproc.TestPreproc.test_opencl)
----------------------------------------------------------------------
OpenCL not available
======================================================================
SKIPPED: testCheckCalib (pyFAI.test.test_scripts.TestScriptsHelp.testCheckCalib)
SKIPPED: testMxcalibrate (pyFAI.test.test_scripts.TestScriptsHelp.testMxcalibrate)
SKIPPED: testPilx (pyFAI.test.test_scripts.TestScriptsHelp.testPilx)
SKIPPED: testPyfaiBenchmark (pyFAI.test.test_scripts.TestScriptsHelp.testPyfaiBenchmark)
SKIPPED: testPyfaiCalib (pyFAI.test.test_scripts.TestScriptsHelp.testPyfaiCalib)
SKIPPED: testPyfaiDrawmask (pyFAI.test.test_scripts.TestScriptsHelp.testPyfaiDrawmask)
SKIPPED: testPyfaiIntegrate (pyFAI.test.test_scripts.TestScriptsHelp.testPyfaiIntegrate)
SKIPPED: testPyfaiRecalib (pyFAI.test.test_scripts.TestScriptsHelp.testPyfaiRecalib)
----------------------------------------------------------------------
no GUI
======================================================================
SKIPPED: test_OpenCL_sigma_clip (pyFAI.opencl.test.test_openCL.TestMask.test_OpenCL_sigma_clip)
SKIPPED: test_OpenCL_sparse (pyFAI.opencl.test.test_openCL.TestMask.test_OpenCL_sparse)
SKIPPED: test_histogram (pyFAI.opencl.test.test_openCL.TestMask.test_histogram)
SKIPPED: test_reference_book (pyFAI.opencl.test.test_openCL.TestSort.test_reference_book)
SKIPPED: test_reference_file (pyFAI.opencl.test.test_openCL.TestSort.test_reference_file)
SKIPPED: test_sort_all (pyFAI.opencl.test.test_openCL.TestSort.test_sort_all)
SKIPPED: test_sort_horizontal (pyFAI.opencl.test.test_openCL.TestSort.test_sort_horizontal)
SKIPPED: test_sort_vertical (pyFAI.opencl.test.test_openCL.TestSort.test_sort_vertical)
SKIPPED: test_dot16 (pyFAI.opencl.test.test_openCL.TestKahan.test_dot16)
SKIPPED: test_kahan (pyFAI.opencl.test.test_openCL.TestKahan.test_kahan)
SKIPPED: test_filter_hor (pyFAI.opencl.test.test_ocl_sort.TestOclSort.test_filter_hor)
SKIPPED: test_filter_vert (pyFAI.opencl.test.test_ocl_sort.TestOclSort.test_filter_vert)
SKIPPED: test_mean_hor (pyFAI.opencl.test.test_ocl_sort.TestOclSort.test_mean_hor)
SKIPPED: test_mean_vert (pyFAI.opencl.test.test_ocl_sort.TestOclSort.test_mean_vert)
SKIPPED: test_sigma_clip_hor (pyFAI.opencl.test.test_ocl_sort.TestOclSort.test_sigma_clip_hor)
SKIPPED: test_sigma_clip_vert (pyFAI.opencl.test.test_ocl_sort.TestOclSort.test_sigma_clip_vert)
SKIPPED: test_sort_hor (pyFAI.opencl.test.test_ocl_sort.TestOclSort.test_sort_hor)
SKIPPED: test_sort_vert (pyFAI.opencl.test.test_ocl_sort.TestOclSort.test_sort_vert)
----------------------------------------------------------------------
OpenCL is not available
======================================================================
SKIPPED: setUpClass (pyFAI.opencl.test.test_openCL.TestDoubleWord)
----------------------------------------------------------------------
OpenCL module (pyopencl) is not present or no device available
======================================================================
SKIPPED: test_opencl (pyFAI.test.test_medfilt_engine.TestMedfilt.test_opencl)
----------------------------------------------------------------------
pyopencl is missing
----------------------------------------------------------------------
Ran 535 tests in 368.194s

OK (skipped=57)

@kif
Copy link
Member Author

kif commented Nov 22, 2025

Surprizing you got opencl error without opencl installed ...

@kif kif merged commit 9ffc53c into main Nov 22, 2025
9 checks passed
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

Successfully merging this pull request may close these issues.

[OpenCL] Some kernel are broken using Apple CPU-driver

3 participants