pystencils merge requestshttps://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests2020-12-08T13:15:47+01:00https://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/195Allow failure2020-12-08T13:15:47+01:00Markus HolzerAllow failureThe integration pipeline should not be necessary for an MR.
The integration will be checked consequently with the pycodegen repo before releasing. For every MR it should not be necessary due to waLBerlas codegen depending on pystencils ...The integration pipeline should not be necessary for an MR.
The integration will be checked consequently with the pycodegen repo before releasing. For every MR it should not be necessary due to waLBerlas codegen depending on pystencils and not pystencils depending on waLBerla.Stephan SeitzStephan Seitzhttps://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/118Allow functions for Field.coordinate_transform2020-01-09T20:20:23+01:00Stephan SeitzAllow functions for Field.coordinate_transformThis lets you quickly switch to polar coordinate systems:
```python
field.coordinate_transform = lambda x: sympy.Matrix((x.norm(), sympy.atan2(*x) / (2 * sympy.pi) * field.shape[1]))
```This lets you quickly switch to polar coordinate systems:
```python
field.coordinate_transform = lambda x: sympy.Matrix((x.norm(), sympy.atan2(*x) / (2 * sympy.pi) * field.shape[1]))
```https://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/133Allow vector assignments2020-01-21T22:04:08+01:00Stephan SeitzAllow vector assignments```python
>>>import pystencils as ps
>>>import sympy as sp
>>>a, b, c = sp.symbols("a b c")
>>>ps.Assignment(sp.Matrix([a,b,c]), sp.Matrix([1,2,3]))
(Assignment(a, 1), Assignment(b, 2), Assignment(c, 3))
```
Fixes #17```python
>>>import pystencils as ps
>>>import sympy as sp
>>>a, b, c = sp.symbols("a b c")
>>>ps.Assignment(sp.Matrix([a,b,c]), sp.Matrix([1,2,3]))
(Assignment(a, 1), Assignment(b, 2), Assignment(c, 3))
```
Fixes #17https://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/140Append assignments to KernelFunction (for later analysis etc.)2020-02-22T11:23:51+01:00Stephan SeitzAppend assignments to KernelFunction (for later analysis etc.)I wonder if it would be a good idea to apend the assignments from which a `KernelFunction` was created to `KernelFunction`.I wonder if it would be a good idea to apend the assignments from which a `KernelFunction` was created to `KernelFunction`.https://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/222ARM Neon: Fix makeVec and add Philox2021-03-16T20:29:52+01:00Michael Kuronmkuron@icp.uni-stuttgart.deARM Neon: Fix makeVec and add PhiloxI did a quick find-and-replace translation of the Philox from SSE to Neon and noticed that `makeVec` was broken. Tests pass now.I did a quick find-and-replace translation of the Philox from SSE to Neon and noticed that `makeVec` was broken. Tests pass now.Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/108AssignmentCollection.__bool__2019-12-17T13:30:15+01:00Stephan SeitzAssignmentCollection.__bool__`AssignmentCollection` can be used in many cases where you could also use
a `List[Assignment]`. With `AssignmentCollection.__bool__`, an empty
AssignmentCollection is falsy and a non-empty one truthy.
So you can `assert assignments,...`AssignmentCollection` can be used in many cases where you could also use
a `List[Assignment]`. With `AssignmentCollection.__bool__`, an empty
AssignmentCollection is falsy and a non-empty one truthy.
So you can `assert assignments, 'must not be emtpy'`https://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/243atomically write cache status file2021-05-03T14:19:21+02:00Michael Kuronmkuron@icp.uni-stuttgart.deatomically write cache status fileTry to fix https://i10git.cs.fau.de/pycodegen/pycodegen/-/jobs/568263, introduced in !240Try to fix https://i10git.cs.fau.de/pycodegen/pycodegen/-/jobs/568263, introduced in !240Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/95Auto for assignments2019-12-04T10:58:44+01:00Stephan SeitzAuto for assignmentsI had problems to teach pystencils C's weird type system for complex numbers with `auto` everything was working fine.I had problems to teach pystencils C's weird type system for complex numbers with `auto` everything was working fine.https://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/121Automatic Finite Volume and Volume-of-Fluid discretization2020-01-14T14:08:05+01:00Michael Kuronmkuron@icp.uni-stuttgart.deAutomatic Finite Volume and Volume-of-Fluid discretizationI don't yet have a good test for volume-of-fluid and the source term, but @alexander.reinauer requested the code because he needs it now. I'll add the missing tests at some later point.I don't yet have a good test for volume-of-fluid and the source term, but @alexander.reinauer requested the code because he needs it now. I'll add the missing tests at some later point.Martin BauerMartin Bauerhttps://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/189Automatically align to what is required for vectorization2020-11-19T06:18:38+01:00Michael Kuronmkuron@icp.uni-stuttgart.deAutomatically align to what is required for vectorizationIf this cannot be detected because cpuinfo is missing, use 512 bitIf this cannot be detected because cpuinfo is missing, use 512 bitMarkus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/91Avoid `hash()` in Field.hashable_contents2019-11-21T20:27:55+01:00Stephan SeitzAvoid `hash()` in Field.hashable_contentshash should not be used in hashable_contents because even if we will use
a deterministic hash function we will end up non-deterministic since
hash is initialized with a random seed.hash should not be used in hashable_contents because even if we will use
a deterministic hash function we will end up non-deterministic since
hash is initialized with a random seed.https://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/29Basic support for OpenCL (experimental)2019-08-22T08:37:37+02:00Stephan SeitzBasic support for OpenCL (experimental)Basic support for OpenCL
Problem: OpenCL cannot import `stdint.h`. Temporary fix: define custom `opencl_stdint.h` (~~defines currently only `int64_t`~~ `)
TODO:
- ~~implement `opencl_stdint.h`~~
- implement shard_mem, textures,...Basic support for OpenCL
Problem: OpenCL cannot import `stdint.h`. Temporary fix: define custom `opencl_stdint.h` (~~defines currently only `int64_t`~~ `)
TODO:
- ~~implement `opencl_stdint.h`~~
- implement shard_mem, textures, built-in functions
- ~~avoid CUDA intrinsics (`fast_div`)~~https://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/257Bit Flag Conditional2021-07-04T16:57:51+02:00Frederik HennigBit Flag ConditionalThis MR introduces a bit flag conditional that acts like a ternary operator for a single bit flag. It takes at least three arguments:
- `flag_bit` specifies which bit of the mask is examined
- `mask_expression` is an integer-typed expres...This MR introduces a bit flag conditional that acts like a ternary operator for a single bit flag. It takes at least three arguments:
- `flag_bit` specifies which bit of the mask is examined
- `mask_expression` is an integer-typed expression which acts as a bit mask
- `then_expression` is a SymPy expression of arbitrary type, and
- optionally `else_expression` is a SymPy expression of arbitrary type
`flag_cond` examines the given bit of the given mask and takes the value of `then_expression` if the bit is set to 1. If not, it becomes either `0` or `else_expression`:
Three argument version:
```
flag_cond(flag_bit, mask, expr) = expr if (flag_bit is set in mask) else 0
```
Four argument version:
```
flag_cond(flag_bit, mask, expr_then, expr_else) = expr_then if (flag_bit is set in mask) else expr_else
```https://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/185Blocking for partial directions2020-11-18T09:57:53+01:00Markus HolzerBlocking for partial directionsIn the current implementation, it was only possible to block for all coordinates. However, for some problems it might make sense to only block one specific direction. This can now be achieved by setting unwanted coordinates to zero.In the current implementation, it was only possible to block for all coordinates. However, for some problems it might make sense to only block one specific direction. This can now be achieved by setting unwanted coordinates to zero.Jan HönigJan Hönighttps://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/290Bug fix simplification2022-03-28T10:40:33+02:00Markus HolzerBug fix simplificationMarkus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/64Bugfix avoid east and west const2019-09-30T14:10:05+02:00Stephan SeitzBugfix avoid east and west constHere's the printing logic for SympyAsssignment:
```python
if node.is_declaration:
if node.is_const # <<< and 'const' not in self._print(node.lhs.dtype):
prefix = 'const '
else:
...Here's the printing logic for SympyAsssignment:
```python
if node.is_declaration:
if node.is_const # <<< and 'const' not in self._print(node.lhs.dtype):
prefix = 'const '
else:
prefix = ''
data_type = prefix + self._print(node.lhs.dtype) + " "
return "%s%s = %s;" % (data_type, self.sympy_printer.doprint(node.lhs),
self.sympy_printer.doprint(node.rhs))
else:
lhs_type = get_type_of_expression(node.lhs)
if type(lhs_type) is VectorType and isinstance(node.lhs, cast_func):
```
It will always prefix const on a declaration. This will not work if dtype is also const since:
```python
def __str__(self):
result = BasicType.numpy_name_to_c(str(self._dtype))
if self.const:
result += " const"
return result
```
So we get something like `const int64_t const`.
I deleted the postfix const to have everything nicely aligned.https://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/62Bugfix fields accessed for interpolator access2019-09-30T14:10:31+02:00Stephan SeitzBugfix fields accessed for interpolator accesshttps://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/155BugFix of the fast_subs function in rng nodes.2020-05-04T10:36:55+02:00Markus HolzerBugFix of the fast_subs function in rng nodes.https://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/65Bugfix: Align calculation of number of ghost layers on GPU with CPU version2019-09-30T14:10:47+02:00Stephan SeitzBugfix: Align calculation of number of ghost layers on GPU with CPU versionFor the calculation of the number of ghostlayers only relative accesses
should be considered like on the CPU versionFor the calculation of the number of ghostlayers only relative accesses
should be considered like on the CPU versionhttps://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/32Bugfix: Readd __launch_bounds__ for dialect 'cuda'2019-08-15T09:14:26+02:00Stephan SeitzBugfix: Readd __launch_bounds__ for dialect 'cuda'__launch_bounds__ was deactivated when introducing `CudaBackend`__launch_bounds__ was deactivated when introducing `CudaBackend`