# State of symbolic shapes branch

**URL:** <https://dev-discuss.pytorch.org/t/state-of-symbolic-shapes-branch/777>\
**Category:** compiler\
**Created:** [September 19, 2022, 5:32pm UTC](https://dev-discuss.pytorch.org/t/state-of-symbolic-shapes-branch/777 "2022-09-19T17:32:53Z")\
**Posts on this page:** 1\
**Showing post:** 29

<div class="post-metadata">

**Author:** ![nunoplopes](https://avatars.discourse-cdn.com/v4/letter/n/ee59a6/32.png) [@nunoplopes](https://dev-discuss.pytorch.org/u/nunoplopes)\
**Post date:** [December 27, 2022, 2:02pm UTC](https://dev-discuss.pytorch.org/t/state-of-symbolic-shapes-branch/777/29 "2022-12-27T14:02:24Z")

</div>

Thank you!

Just a couple more crashes (I know, I’m a magnet for them…):

```python
def fn(a):
    b = a * a
    if b.sum():
        return a
    return b

print(fn(torch.tensor([1.0, 2.0])))
traced_f = make_fx(fn, tracing_mode="symbolic")(torch.tensor([1.0, 2.0]))
print(traced_f)

# RuntimeError: tried to get Double out of SymFloat

```

If using this instead:

```python
def fn(a):
    b = a * a
    if b.sum() >= 1:
        return a
    return b

# NotImplementedError: local_scalar_dense/item NYI for torch.bool

```

I’ve attempted to fix it by patching fake tensor’s `local_scalar_dense`:

```python
    elif is_integer_dtype(arg.dtype) or is_boolean_dtype(arg.dtype):
        return fake_mode.shape_env.create_unbacked_symint()

```

But no luck; still crashes (`tried to get Long out of SymInt`).

---

_[View the full topic](https://dev-discuss.pytorch.org/t/state-of-symbolic-shapes-branch/777)._
