<
8000
div class="gh-header-show ">
[FX]
[FX] concrete_args
unpacking erroneously carries over type annotations
#81902
Labels
Uh oh!
There was an error while loading. Please reload this page.
🐛 Describe the bug
import torch
import torch.fx
from typing import List
def foo(x : torch.Tensor, y : torch.Tensor, l : List[torch.Tensor]):
return torch.cat([x, y] + l)
concrete_args = {'l': [torch.fx._symbolic_trace.PH] * 10}
traced = torch.fx.symbolic_trace(foo, concrete_args=concrete_args)
When you print out the code, that it's trying to exec, you get:
This points to this line of codegen:
pytorch/torch/fx/graph.py
Line 546 in 1a71b83
which uses this
free_vars
:pytorch/torch/fx/graph.py
Line 417 in 1a71b83
Versions
Collecting environment information...
PyTorch version: 1.13.0a0+git08b9544
Is debug build: False
CUDA used to build PyTorch: 11.1
ROCM used to build PyTorch: N/A
OS: Ubuntu 18.04.5 LTS (x86_64)
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Clang version: 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
CMake version: version 3.19.6
Libc version: glibc-2.27
Python version: 3.9.5 (default, Jun 4 2021, 12:28:51) [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-5.4.0-1051-aws-x86_64-with-glibc2.27
Is CUDA available: False
CUDA runtime version: 11.1.105
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Probably one of the following:
/usr/local/cuda-10.1/targets/x86_64-linux/lib/libcudnn.so.7.6.5
/usr/local/cuda-10.2/targets/x86_64-linux/lib/libcudnn.so.7.6.5
/usr/local/cuda-11.0/targets/x86_64-linux/lib/libcudnn.so.8.0.5
/usr/local/cuda-11.0/targets/x86_64-linux/lib/libcudnn_adv_infer.so.8.0.5
/usr/local/cuda-11.0/targets/x86_64-linux/lib/libcudnn_adv_train.so.8.0.5
/usr/local/cuda-11.0/targets/x86_64-linux/lib/libcudnn_cnn_infer.so.8.0.5
/usr/local/cuda-11.0/targets/x86_64-linux/lib/libcudnn_cnn_train.so.8.0.5
/usr/local/cuda-11.0/targets/x86_64-linux/lib/libcudnn_ops_infer.so.8.0.5
/usr/local/cuda-11.0/targets/x86_64-linux/lib/libcudnn_ops_train.so.8.0.5
/usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn.so.8.0.5
/usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_adv_infer.so.8.0.5
/usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_adv_train.so.8.0.5
/usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_cnn_infer.so.8.0.5
/usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_cnn_train.so.8.0.5
/usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_ops_infer.so.8.0.5
/usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_ops_train.so.8.0.5
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
Versions of relevant libraries:
[pip3] functorch==0.3.0a0+347334c
[pip3] mypy==0.812
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.21.2
[pip3] torch==1.13.0a0+git08b9544
[pip3] torchdynamo==0.2.0
[pip3] torchtext==0.9.0a0+4de31fc
[pip3] torchvision==0.12.0a0+3e79d14
[conda] blas 1.0 mkl
[conda] functorch 0.3.0a0+347334c dev_0
[conda] mkl 2021.3.0 h06a4308_520
[conda] mkl-include 2021.3.0 h06a4308_520
[conda] mkl-service 2.4.0 py39h7f8727e_0
[conda] mkl_fft 1.3.1 py39hd3c417c_0
[conda] mkl_random 1.2.2 py39h51133e4_0
[conda] numpy 1.21.2 py39h20f2e39_0
[conda] numpy-base 1.21.2 py39h79a1101_0
[conda] torch 1.13.0a0+git08b9544 dev_0
[conda] torchdynamo 0.2.0 dev_0
[conda] torchtext 0.9.0a0+4de31fc pypi_0 pypi
[conda] torchvision 0.12.0a0+3e79d14 dev_0
cc @ezyang @SherlockNoMad
The text was updated successfully, but these errors were encountered: