Comments (11)
I believe they are related to these changes in band_detect_cl.py
: USNavalResearchLaboratory/PyEBSDIndex@88136e6#diff-b1a7457abbba36e579c00423396bc962373e6fcb044b4c43a3c2ad0384cca8be
from kikuchipy.
What is the data type of your dask array?
from kikuchipy.
In this example it is uint8.
from kikuchipy.
Trying to figure out exactly what is up ... I see Numba error, but seems like it is failing on making an opencl buffer?
from kikuchipy.
Ah - I see what is up ... I think. When it fails to run the OpenCL version, it attempts the numba version. Both are failing for similar reasons. Let me look at what I can do here.
from kikuchipy.
Thank you for having a look, really appreciate it! Any potentially useful information you have about the problem is useful.
from kikuchipy.
If only all the fixes where this easy (at least I hope it is this easy). Maybe not the most elegant solution, but it looks like throwing an image = np.asarray(image)
at the top of the radon functions should work. This will make a copy of the chunk of patterns read in, but I think I was doing that before anyway. While I have made many improvements on making PyEBSDIndex faster, I have not worried much about the memory efficiency.
Some insight:
- Through some staring some Windows system monitoring tools, it looked like I was spending just about as much time transferring patterns to the GPU as calculating (as is the way with GPU compute). I figured it would not be that bad, that if the patterns are uint8, or uint16, I could just send them as-is to the GPU, and convert to float on the GPU. In fact - I made the decision that if the patterns were float -- I actually convert them to uint16, and then scale the results (anyone who wants 32-bit precision on pattern quality really needs to justify it to me I guess).
- Then I figured, well, I might as well do my data transpose on the GPU as well.
Thus, I stoped converting to float on the CPU (which would have made a copy in this case), and tried sending a version as is to the GPU. OpenCL and Numba will work with numpy, but not Dask arrays ... thus the issue on both pipelines.
I will send in a PR for you to test.
from kikuchipy.
BTW - old version on my machine: 780 pats/s, new 1180 pats/s
from kikuchipy.
Your changes in USNavalResearchLaboratory/PyEBSDIndex#60 fixes my issue here, thanks!
from kikuchipy.
PyEBSDIndex 0.3.2 is now out on PyPi and conda-forge, and should be the fix for this issue.
from kikuchipy.
Thank you so much for the quick handling of my issue here. Have a good weekend!
from kikuchipy.
Related Issues (20)
- Keeping not_indexed dummy phase after orientation refinement HOT 5
- Lazy and Dask Improvements HOT 2
- Build documentation on Windows (without PyVista frame buffer)
- Segmentation fault HOT 4
- Merging crystal maps with not_indexed points results in removal of phase HOT 1
- Support Python 3.11 HOT 1
- Support HyperSpy 2.0 HOT 10
- Error with `kikuchipy.data.si_wafer` HOT 1
- kikuchipy v0.9.0 HOT 1
- `TestKikuchipyH5EBSD.test_load_with_padding` test failure HOT 1
- Reading of master patterns generated with EDAX HOT 4
- Post-process and index raw diffraction patterns in a .tif format HOT 1
- Incorrect detector shape for downsampled signal
- Set correct sample tilt for TKD dataset read from Bruker HDF5 HOT 5
- Also read crystal map together with EBSD patterns from a Bruker HDF5 file HOT 1
- Force EBSDDetector values to be float
- Small minor release 0.10.0
- New string representation for EBSDDetector
- Kinematic EBSD simulation from tetragonal phase
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kikuchipy.