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

how to choose a different device #18

Open
joaomamede opened this issue Feb 29, 2024 · 1 comment
Open

how to choose a different device #18

joaomamede opened this issue Feb 29, 2024 · 1 comment

Comments

@joaomamede
Copy link

The only way to choose a diferent device is to change this bit of the code right in the reikna.py?

        ocldevice = self.api.get_platforms()[0].get_devices()[0] #Get first device available
        logging.info(f"OCL device selected : {ocldevice}")

Basically if we want to setup parallel multi GPU or using the integrated GPU it's the only way to select the device?

ty for RedLionFish

@perdigao1
Copy link
Contributor

I just added an option to choose a preferred device by matching string. You can see an example in https://github.com/rosalindfranklininstitute/RedLionfish/blob/d3b94c166da167725a5840877bea491198739882/scripts/test_and_benchm.py#L130C1-L131C87

import RedLionfishDeconv.RLDeconv3DReiknaOCL as rlocl

rlocl.RL_CL_PLATFORM_PREFERENCE="intel" # sets to use intel CPU as openCL device
res_ocl_intel = rlocl.nonBlock_RLDeconvolutionReiknaOCL(data,datapsf, niter=niter)

@perdigao1 perdigao1 reopened this Apr 23, 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

2 participants