Add fvm advection stencil to documentation#79
Conversation
0c6aa9f to
d7735b4
Compare
…ctional since missing translation from gtir downwards)
…n (should be functional, but untested)
havogt
left a comment
There was a problem hiding this comment.
I think we should remove all nodes we currently don't use (YAGNI).
This also remove a design flaw because at nir level we don't want to set how many neighbors we have.
| init: Optional[Expr] # TODO: use in gtir to nir lowering for reduction var | ||
|
|
||
|
|
||
| class TensorLocalVar(LocalVar): |
There was a problem hiding this comment.
Let's just do what we need now and remove this extra step for now.
| init: Optional[List[Expr]] | ||
|
|
||
|
|
||
| class LocalFieldVar(TensorLocalVar): |
There was a problem hiding this comment.
I don't think we should pass max_size for constructing this node. If the TensorLocalVar is gone, we have no problem and no smart patterns.
| #class IndexAccess(Access): # TODO(tehrengruber): use for TensorLocalVar | ||
| # indices: List[int] | ||
|
|
||
| class LocationLocalIdAccess(Access): |
src/gtc/unstructured/nir_to_usid.py
Outdated
| ) | ||
|
|
||
| def visit_NeighborLoopLocationAccess(self, node: nir.NeighborLoopLocationAccess, **kwargs): | ||
| return usid.IndexAccess(name=node.name+"_neigh", location_type=node.location_type) |
There was a problem hiding this comment.
NeighborLoop is declaring a symbol which we want to use here. I think the correct way is node.name -> nir.NeighborLoop -> usid.NeighborLoop -> iter_var. It's probably something we should discuss with @egparedes how that could work with the symbol table.
src/gtc/unstructured/nir_to_usid.py
Outdated
|
|
||
| def visit_NeighborLoop(self, node: nir.NeighborLoop, **kwargs): | ||
| return usid.NeighborLoop( | ||
| iter_var=node.name+"_neigh", |
There was a problem hiding this comment.
We need to find the right pattern, see marker below.
This is just a draft for discussion. The gtscript syntax used here is not supported right now.