Various GPU-related and some general fixes.
3 open threads
- Recombine KernelWrapper APIs of CPU and GPU JIT
- Clean up JIT module
- Fix kernel constraints analysis
- Fix handling of slices with negative start index
- Fix sparse iteration spaces on GPUs
- Reintroduce GPU periodicity module
- Extend GPU test cases
- Reintroduce kwargs for create_kernel
- Restrict parsing of structured data types to aligned types
- Expose GPU block size selection through
CreateKernelConfig
Edited by Frederik Hennig
Merge request reports
Activity
requested review from @holzer
assigned to @da15siwa
added 3 commits
-
f78b8229...169e3f8a - 2 commits from branch
backend-rework
- 49164691 - Merge branch 'backend-rework' into fhennig/gpu-fixes
-
f78b8229...169e3f8a - 2 commits from branch
mentioned in merge request lbmpy!172 (merged)
- Resolved by Michael Zikeli
- Resolved by Michael Zikeli
- Resolved by Michael Zikeli
- Resolved by Michael Zikeli
- src/pystencils/gpu/periodicity.py 0 → 100644
1 import numpy as np 2 from itertools import product 3 4 from pystencils import CreateKernelConfig, create_kernel 5 from pystencils import Assignment, Field 6 from pystencils.enums import Target 7 from pystencils.slicing import get_periodic_boundary_src_dst_slices, normalize_slice 8 9 10 def create_copy_kernel(domain_size, from_slice, to_slice, index_dimensions=0, index_dim_shape=1, dtype=np.float64): This has to be changed in the rest of this function as well.
changed this line in version 8 of the diff
- Resolved by Michael Zikeli
added 1 commit
- db0670d1 - Fix naming in GPU periodicity module; remove copy of the module in `old` folder
- Resolved by Michael Zikeli
- Resolved by Michael Zikeli
12 src_slice, 13 dst_slice, 14 index_dimensions=0, 15 index_dim_shape=1, 16 dtype=np.float64, 17 ): 11 18 """Copies a rectangular part of an array to another non-overlapping part""" 12 19 13 f = Field.create_generic("pdfs", len(domain_size), index_dimensions=index_dimensions, dtype=dtype) 14 normalized_from_slice = normalize_slice(from_slice, f.spatial_shape) 15 normalized_to_slice = normalize_slice(to_slice, f.spatial_shape) 20 field = Field.create_generic( 21 "field", len(domain_size), index_dimensions=index_dimensions, dtype=dtype 22 ) 23 normalized_from_slice = normalize_slice(src_slice, field.spatial_shape) 24 normalized_to_slice = normalize_slice(dst_slice, field.spatial_shape) - Comment on lines +23 to +24
23 normalized_from_slice = normalize_slice(src_slice, field.spatial_shape) 24 normalized_to_slice = normalize_slice(dst_slice, field.spatial_shape) 23 normalized_src_slice = normalize_slice(src_slice, field.spatial_shape) 24 normalized_dst_slice = normalize_slice(dst_slice, field.spatial_shape) changed this line in version 12 of the diff
20 field = Field.create_generic( 21 "field", len(domain_size), index_dimensions=index_dimensions, dtype=dtype 22 ) 23 normalized_from_slice = normalize_slice(src_slice, field.spatial_shape) 24 normalized_to_slice = normalize_slice(dst_slice, field.spatial_shape) 16 25 17 offset = [s1.start - s2.start for s1, s2 in zip(normalized_from_slice, normalized_to_slice)] 18 assert offset == [s1.stop - s2.stop for s1, s2 in zip(normalized_from_slice, normalized_to_slice)], \ 19 "Slices have to have same size" 26 offset = [ 27 s1.start - s2.start 28 for s1, s2 in zip(normalized_from_slice, normalized_to_slice) 29 ] 30 assert offset == [ 31 s1.stop - s2.stop for s1, s2 in zip(normalized_from_slice, normalized_to_slice) 32 ], "Slices have to have same size" - Comment on lines +26 to +32
26 offset = [ 27 s1.start - s2.start 28 for s1, s2 in zip(normalized_from_slice, normalized_to_slice) 29 ] 30 assert offset == [ 31 s1.stop - s2.stop for s1, s2 in zip(normalized_from_slice, normalized_to_slice) 32 ], "Slices have to have same size" 26 offset = [ 27 s1.start - s2.start 28 for s1, s2 in zip(normalized_src_slice, normalized_dst_slice) 29 ] 30 assert offset == [ 31 s1.stop - s2.stop for s1, s2 in zip(normalized_src_slice, normalized_dst_slice) 32 ], "Slices have to have same size"
- Resolved by Michael Zikeli
mentioned in commit a03acd9a
mentioned in issue #93
Please register or sign in to reply