Skip to content

Conversation

@ricardoV94
Copy link
Member

@ricardoV94 ricardoV94 commented Dec 5, 2025

Spinoff from #811

Closes #1507

Also added a somewhat semantically related commit for an Alloc failure inside a Blockwise

@ricardoV94 ricardoV94 added bug Something isn't working numba OpFromGraph labels Dec 5, 2025
for v in chain.from_iterable(s for s in input_shapes if s is not None):
# Import input_shape nodes, as for some graphs ShapeFeature assumes these were seen before
if (node := v.owner) is not None:
fgraph.import_node(node, import_missing=True)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ShapeFeature is quite picky about having seen some variables. It may even count as bug but I don't want to open that can of worms.

Anyway OpFromGraph uses this helper for infer_shape, and the way Blockwise triggers it when it has an OFG inside, would end up triggering an error.

scalar_shape = {create_tuple_string(shape_var_item_names)}
{check_runtime_broadcast_src}
res = np.empty(scalar_shape, dtype=val.dtype)
res = np.empty(scalar_shape, dtype=np.{dtype})
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would fail for scalar valued alloc due to numba/numba#10358

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working numba OpFromGraph

Projects

None yet

Development

Successfully merging this pull request may close these issues.

numba_funcify_Elemwise can end up with parent_node in its kwargs when vectorizing OpFromGraph

1 participant