Skip to content

Floor untraceable values in getShapes/getDTypes to ⊤ instead of throwing #620

Description

@khatchad

When a value number cannot be traced (empty points-to set and no recoverable property chain), TensorGenerator throws IllegalArgumentException: Empty points-to set and could not trace properties for value number ... rather than flooring to ⊤:

  • TensorGenerator.java:931 (in the shape path).
  • TensorGenerator.java:1967 (in the dtype path).

This is the same crash-floor anti-pattern as #611 and #612, one level deeper: any caller that probes the shape/dtype of an unmodeled or content-dependent value aborts the whole analysis. Surfaced while attempting #619, where probing a tf.eye batch_shape tensor (a tf.constant(json.loads(...)), and tf.shape(x)) threw here and collapsed the otherwise-floored tf.eye result from ⊤ to ⊥.

Fix

Replace each throw with a ⊤ floor (null shapes / EnumSet.of(DType.UNKNOWN) dtypes), per the lattice conventions in CONTRIBUTING.md, with an unresolvable-value regression test. This unblocks safe shape/dtype probing (e.g. the #619 batch-rank recovery).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions