Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug[next]: Fix codegen in gtfn for unused vertical offset provider #1746

Merged
merged 15 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -246,21 +246,8 @@ def simple_mesh() -> MeshDescriptor:
num_vertices=num_vertices,
num_edges=np.int32(num_edges),
num_cells=num_cells,
offset_provider={
V2E.value: gtx.NeighborTableOffsetProvider(
v2e_arr, Vertex, Edge, 4, has_skip_values=False
),
E2V.value: gtx.NeighborTableOffsetProvider(
e2v_arr, Edge, Vertex, 2, has_skip_values=False
),
C2V.value: gtx.NeighborTableOffsetProvider(
c2v_arr, Cell, Vertex, 4, has_skip_values=False
),
C2E.value: gtx.NeighborTableOffsetProvider(
c2e_arr, Cell, Edge, 4, has_skip_values=False
),
Koff.value: KDim,
},
offset_provider=offset_provider,
offset_provider_type=common.offset_provider_to_type(offset_provider),
)


Expand Down Expand Up @@ -350,21 +337,8 @@ def skip_value_mesh() -> MeshDescriptor:
num_vertices=num_vertices,
num_edges=num_edges,
num_cells=num_cells,
offset_provider={
V2E.value: gtx.NeighborTableOffsetProvider(
v2e_arr, Vertex, Edge, 5, has_skip_values=True
),
E2V.value: gtx.NeighborTableOffsetProvider(
e2v_arr, Edge, Vertex, 2, has_skip_values=False
),
C2V.value: gtx.NeighborTableOffsetProvider(
c2v_arr, Cell, Vertex, 3, has_skip_values=False
),
C2E.value: gtx.NeighborTableOffsetProvider(
c2e_arr, Cell, Edge, 3, has_skip_values=False
),
Koff.value: KDim,
},
offset_provider=offset_provider,
offset_provider_type=common.offset_provider_to_type(offset_provider),
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def reduction_ke_field(
"fop", [reduction_e_field, reduction_ek_field, reduction_ke_field], ids=lambda fop: fop.__name__
)
def test_neighbor_sum(unstructured_case_3d, fop):
v2e_table = unstructured_case_3d.offset_provider["V2E"].table
v2e_table = unstructured_case_3d.offset_provider["V2E"].ndarray

edge_f = cases.allocate(unstructured_case_3d, fop, "edge_f")()

Expand Down