Two `resample_by_picking` in simple-dg TranslationUnit
- Dominant language
- Python
- Stars
- 34
- Forks
- 25
- Avg merge
- 3h 37m
- Merged PRs (30d)
- 2
Description
I was just playing with (and being amazed by!) https://github.com/inducer/meshmode/pull/216.(https://github.com/inducer/meshmode/pull/216/commits/1de7f8f8fc3518ead4cd0191adf2238078636543 specifically, and https://github.com/inducer/pytato/commit/585576ac4a94c6bc3e38e5fc85ffa2fb165afea0)
If I run `python simple.dg --lazy` and set a break point at https://github.com/inducer/arraycontext/blob/82b03d20849d9aac0f54cb4e9c00ba0f5908911c/arraycontext/impl/pytato/compile.py#L306, and then go
```
print(self.pytato_program.program)
```
the resulting `TranslationUnit` comes out with two copies of `resample_by_picking` that aren't visibly different:
>>> print(self.pytato_program.program)
---------------------------------------------------------------------------
KERNEL: resample_by_picking
---------------------------------------------------------------------------
ARGUMENTS:
ary: type: np:dtype('float64'), shape: (nelements_vec, n_from_nodes), dim_tags: (N1:stride:n_from_nodes, N0:stride:1), offset: aspace: global
from_element_indices: type: np:dtype('int64'), shape: (nelements), dim_tags: (N0:stride:1), offset: aspace: global
n_from_nodes: ValueArg, type: np:dtype('int32')
n_to_nodes: ValueArg, type: np:dtype('int64')
nelements: ValueArg, type: np:dtype('int64')
nelements_vec: ValueArg, type: np:dtype('int32')
pick_list: type: np:dtype('int32'), shape: (n_to_nodes), dim_tags: (N0:stride:1), offset: aspace: global
result: type: np:dtype('float64'), shape: (nelements, n_to_nodes), dim_tags: (N1:stride:n_to_nodes, N0:stride:1), offset: aspace: global
---------------------------------------------------------------------------
DOMAINS:
[nelements] -> { [iel] : 0 <= iel < nelements }
[n_to_nodes] -> { [idof] : 0 <= idof < n_to_nodes }
---------------------------------------------------------------------------
INAME IMPLEMENTATION TAGS:
idof: ConcurrentDOFInameTag()
iel: ConcurrentElementInameTag()
---------------------------------------------------------------------------
INSTRUCTIONS:
for idof, iel
result[iel, idof] = ary[from_element_indices[iel], pick_list[idof]] if from_element_indices[iel] != -1 else 0 {id=insn}
end idof, iel
---------------------------------------------------------------------------
---------------------------------------------------------------------------
KERNEL: resample_by_picking_0
---------------------------------------------------------------------------
ARGUMENTS:
ary: type: np:dtype('float64'), shape: (nelements_vec, n_from_nodes), dim_tags: (N1:stride:n_from_nodes, N0:stride:1), offset: aspace: global
from_element_indices: type: np:dtype('int32'), shape: (nelements), dim_tags: (N0:stride:1), offset: aspace: global
n_from_nodes: ValueArg, type: np:dtype('int32')
n_to_nodes: ValueArg, type: np:dtype('int64')
nelements: ValueArg, type: np:dtype('int64')
nelements_vec: ValueArg, type: np:dtype('int32')
pick_list: type: np:dtype('int32'), shape: (n_to_nodes), dim_tags: (N0:stride:1), offset: aspace: global
result: type: np:dtype('float64'), shape: (nelements, n_to_nodes), dim_tags: (N1:stride:n_to_nodes, N0:stride:1), offset: aspace: global
---------------------------------------------------------------------------
DOMAINS:
[nelements] -> { [iel] : 0 <= iel < nelements }
[n_to_nodes] -> { [idof] : 0 <= idof < n_to_nodes }
---------------------------------------------------------------------------
INAME IMPLEMENTATION TAGS:
idof: ConcurrentDOFInameTag()
iel: ConcurrentElementInameTag()
---------------------------------------------------------------------------
INSTRUCTIONS:
for idof, iel
result[iel, idof] = ary[from_element_indices[iel], pick_list[idof]] if from_element_indices[iel] != -1 else 0 {id=insn}
end idof, iel
---------------------------------------------------------------------------
(...SNIP...)
Any thoughts on why that might be?
cc @kaushikcfd @matthiasdiener
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.