Closed proski closed 2 months ago
@proski - If you want future commits to be automatically checked that they successfully build on x86 macOS, you could add something like this to the existing GitHub actions workflow file:
macOS:
name: macOS
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Install
run: |
brew install opencl-headers
g++ --version
- name: Script
run: |
make prpll -j "$(sysctl -n hw.ncpu)"
cd build-release
rm -f -- *.o
./prpll -h
- uses: actions/upload-artifact@v4
if: always()
with:
name: macos_prpll
path: ${{ github.workspace }}
I am guessing that the opencl-headers package would need to be installed. The opencl-icd-loader package might need to be installed as well.
@proski - If you want future commits to be automatically checked that they successfully build on x86 macOS, you could add something like this to the existing GitHub actions workflow file:
I've added it, thank you!
I am guessing that the opencl-headers package would need to be installed. The opencl-icd-loader package might need to be installed as well.
None of them is needed. Even gcc@14
is installed already, but I'm installing it anyway to be explicit about the dependency.
We should run a real test like prpll -iters 10000 -ll 82589933
but other OSes don't do it, so let's keep it consistent. Also, there is no test for the cmake build, I should have added it in #293. It could be added in a separate PR.
INVALID_WORK_GROUP_SIZE
is reproducible in the CI:
https://github.com/preda/gpuowl/actions/runs/10842867463/job/30089143591?pr=295#step:4:71
Added fallback for the case when cmake cannot find OpenCL but linking with -lOpenCL
works. Observed on Windows in the CI.
This is for x86_64 only. No attempt was made to support Apple Silicon. However, this PR could be used as a spepping stone in that direction.
The remaining problem is an error when running
prpll
:That would need to be addressed by an OpenCL expert. It's possible that the issue is specific to my hardware or software.
However, many other issues have been addressed is a clean way.
std::filesystem::path
in the standard library).-framework OpenCL
linker directive.fdatasync()
is used on MacOS.i32
andu32
in OpenCL code has been fixed.transposeWords
uses signature that preservesglobal
andrestrict
attributes used by the callers.clCreateCommandQueueWithProperties
is missing on MacOS, useclCreateCommandQueueWithPropertiesAPPLE
instead.Basically, the C++ code compiles, the OpenCL code compiles and loads, but fails to run on the GPU.