Skip to content

Commit

Permalink
Fix opencl usage and example compilation on macOS (#185)
Browse files Browse the repository at this point in the history
* Fix opencl usage on macOS

* Don't skip examples on macOS

* Install opencl-headers

* Fix
  • Loading branch information
ttytm authored Oct 25, 2023
1 parent 7d5ee50 commit 0a5f65b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,13 @@ jobs:
brew install open-mpi
brew install openblas
brew install lapack
brew install opencl-headers
- name: Move VSL source code to V Modules
run: mv ./vsl ~/.vmodules

- name: Execute Tests using Pure V Backend
run: ~/.vmodules/vsl/bin/test --skip-examples
run: ~/.vmodules/vsl/bin/test

- name: Execute Tests using Pure V Backend with Pure C Blas
run: ~/.vmodules/vsl/bin/test --use-cblas --skip-examples
run: ~/.vmodules/vsl/bin/test --use-cblas
2 changes: 1 addition & 1 deletion bin/test
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ if [[ -z "${skip_examples}" ]]; then
continue
fi
echo "Compiling ${file}"
v ${flags} -o "${file}.o" "${file}"
v ${flags} -d dlopencl -o "${file}.o" "${file}"
echo "${file}.o created"
echo "Removing ${file}.o"
rm -f "${file}.o"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion vcl/vcl.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef VCL_OPENCL_H
#define VCL_OPENCL_H

#ifdef DARWIN
#ifdef __APPLE__
#include <OpenCL/opencl.h>
#else
#include <CL/cl.h>
Expand Down

0 comments on commit 0a5f65b

Please sign in to comment.