# Lengths' argument should be a 1D CPU int64 tensor, but got 1D meta Long tensor

**URL:** <https://dev-discuss.pytorch.org/t/lengths-argument-should-be-a-1d-cpu-int64-tensor-but-got-1d-meta-long-tensor/1315>\
**Category:** compiler\
**Created:** [June 11, 2023, 12:10pm UTC](https://dev-discuss.pytorch.org/t/lengths-argument-should-be-a-1d-cpu-int64-tensor-but-got-1d-meta-long-tensor/1315 "2023-06-11T12:10:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![baraamagdy](https://yyz2.discourse-cdn.com/flex036/user_avatar/dev-discuss.pytorch.org/baraamagdy/32/1200_2.png) [@baraamagdy](https://dev-discuss.pytorch.org/u/baraamagdy)\
**Post date:** [June 11, 2023, 12:10pm UTC](https://dev-discuss.pytorch.org/t/lengths-argument-should-be-a-1d-cpu-int64-tensor-but-got-1d-meta-long-tensor/1315/1 "2023-06-11T12:10:30Z")

</div>

trying to use torch compile with Tacotron model, but I always get that error (‘lengths’ argument should be a 1D CPU int64 tensor, but got 1D meta Long tensor), that fired in [forward function](https://github.com/NVIDIA/tacotron2/blob/master/model.py#L173) when calling x = nn.utils.rnn.pack\_padded\_sequence()  
even when converting input\_lengths to CPU.

---

<div class="post-metadata">

**Author:** ![jgong5](https://yyz2.discourse-cdn.com/flex036/user_avatar/dev-discuss.pytorch.org/jgong5/32/675_2.png) [@jgong5](https://dev-discuss.pytorch.org/u/jgong5)\
**Post date:** [June 12, 2023, 1:15am UTC](https://dev-discuss.pytorch.org/t/lengths-argument-should-be-a-1d-cpu-int64-tensor-but-got-1d-meta-long-tensor/1315/2 "2023-06-12T01:15:11Z")

</div>

I guess it is related to fake tensor tracing support. Would you please file a bug to PyTorch github with a simple reproducer?
