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

Support Pocl for CPU-only OpenCL implementation #69

Closed
jserv opened this issue Sep 15, 2018 · 9 comments
Closed

Support Pocl for CPU-only OpenCL implementation #69

jserv opened this issue Sep 15, 2018 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@jserv
Copy link
Member

jserv commented Sep 15, 2018

Current GPU-accelerated PoW is implemented via OpenCL, and Travis-CI in general doesn't have GPUs. The good thing about OpenCL is that you can use a CPU implementation of OpenCL, such as Pocl, which uses Clang as an OpenCL C frontend and LLVM for kernel compiler implementation, and as a portability layer.

Pocl packages are available in recent Debian/Ubuntu repositories:

sudo apt install libpocl-dev

Utilities such as clinfo can find the new pocl ICD via

/etc/OpenCL/vendors/pocl.icd
@jserv jserv self-assigned this Sep 15, 2018
@jserv
Copy link
Member Author

jserv commented Sep 15, 2018

Sample usage on Pocl and Travis: https://github.com/boostorg/compute/blob/master/.travis.yml

@jserv
Copy link
Member Author

jserv commented Sep 16, 2018

PoW linking to Pocl was not functioned as expected:

[dcurl] Implementation GPU (OpenCL) is initialized successfully
test-pow: tests/test-pow.c:111: main: Assertion `pow_ctx' failed.
Aborted (core dumped)

Reported by clinfo:

Number of platforms                               1
  Platform Name                                   Portable Computing Language
  Platform Vendor                                 The pocl project
  Platform Version                                OpenCL 2.0 pocl 0.13, LLVM 3.8.1
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd
  Platform Extensions function suffix             POCL

  Platform Name                                   Portable Computing Language

@furuame
Copy link
Member

furuame commented Sep 17, 2018

The reason might be that I only configure GPU devices on the dcurl.

clGetDeviceIDs(platform[i], CL_DEVICE_TYPE_GPU, 0, NULL, &num_devices);

@furuame
Copy link
Member

furuame commented Sep 24, 2018

@jserv Should we create a now BUILD option in Makefile for CI test?

E.g.

#if defined(BUILD_CI)
    clGetDeviceIDs(platform[i], CL_DEVICE_TYPE_CPU, 0, NULL, &num_devices);
#else
    clGetDeviceIDs(platform[i], CL_DEVICE_TYPE_GPU, 0, NULL, &num_devices);
#endif

@jserv
Copy link
Member Author

jserv commented Sep 24, 2018

@jserv Should we create a now BUILD option in Makefile for CI test?

Never write code dedicated to CI. We can provide some shotcuts or helper functions instead.

@furuame
Copy link
Member

furuame commented Sep 24, 2018

Maybe we should reserve the flexibility to let the user can configure their own OpenCL implementation. And we can provide some pre-tested config file like GPU or Pocl.

@jserv
Copy link
Member Author

jserv commented Sep 24, 2018

I agree with the way to improve the flexibility of adopting various OpenCL implementations like Pocl.

@jserv jserv added the enhancement New feature or request label Feb 11, 2019
@marktwtn
Copy link
Collaborator

marktwtn commented Apr 1, 2019

Since the current CI system is buildkite running on our own machine, we do not worry about the GPU problem.
Shall we close this issue or leave it as a future enhancement?

@jserv
Copy link
Member Author

jserv commented Apr 1, 2019

Close the historical issue

@jserv jserv closed this as completed Apr 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants