From 463cf6f3a7f2ecbb725d366d5810e164ac210d9e Mon Sep 17 00:00:00 2001 From: David Rowenhorst Date: Fri, 24 May 2024 14:26:05 -0400 Subject: [PATCH] Prep for release Signed-off by: David Rowenhorst --- CHANGELOG.rst | 8 ++++++++ pyebsdindex/__init__.py | 2 +- pyebsdindex/opencl/openclparam.py | 4 +++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4addd3a..5ec87c2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,14 @@ Changelog All notable changes to PyEBSDIndex will be documented in this file. The format is based on `Keep a Changelog `_. +0.3.1 (2024-05-24) +================== + +Fixed +----- +- Fixed issue when multiple OpenCL platforms are detected. Will default to discrete GPUs, with whatever platform has the most discrete GPUs attached. Otherwise, will fall back to integrated graphics. + + 0.3.0 (2024-05-23) ================== Added diff --git a/pyebsdindex/__init__.py b/pyebsdindex/__init__.py index 12a4ae2..44989a1 100644 --- a/pyebsdindex/__init__.py +++ b/pyebsdindex/__init__.py @@ -7,7 +7,7 @@ ] __description__ = "Python based tool for Radon based EBSD indexing" __name__ = "pyebsdindex" -__version__ = "0.3.0" +__version__ = "0.3.1" # Try to import only once - also will perform check that at least one GPU is found. diff --git a/pyebsdindex/opencl/openclparam.py b/pyebsdindex/opencl/openclparam.py index 05420af..5552842 100644 --- a/pyebsdindex/opencl/openclparam.py +++ b/pyebsdindex/opencl/openclparam.py @@ -57,10 +57,12 @@ def get_platform(self): self.platform = cl.get_platforms() return self.platform def get_gpu(self): - if self.platform is None: self.get_platform() + if type(self.platform) is not list: + self.platform = [self.platform] + pgpudiscrete = np.zeros(len(self.platform), dtype=int) for i in range(len(self.platform)):