pytorch / pytorch

Tensors and Dynamic neural networks in Python with strong GPU acceleration
https://pytorch.org
Other
84.38k stars 22.73k forks source link

THPVariable_Check(list_elem) INTERNAL ASSERT FAILED #127518

Open limengfei3675 opened 5 months ago

limengfei3675 commented 5 months ago

🐛 Describe the bug

We are converting the pth weights of a TransFusion model into an onnx file, where we replace operators that are not supported by onnx with equivalent functions. The following error has occurred: RuntimeError: THPVariable-Check (list_elem) INTERNATIONAL ASSERT FAILED at "/Pytorch/torch/csrc/jit/passes/onnx/shape_type-information. cpp": 657, please report a bug to PyTorch . Please give me some help.

Versions

Collecting environment information... PyTorch version: 1.8.0+cu111 Is debug build: False CUDA used to build PyTorch: 11.1 ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.6 LTS (x86_64) GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.3) 9.4.0 Clang version: Could not collect CMake version: version 3.20.5 Libc version: glibc-2.31

Python version: 3.8.19 (default, Mar 20 2024, 19:58:24) [GCC 11.2.0] (64-bit runtime) Python platform: Linux-5.15.0-105-generic-x86_64-with-glibc2.17 Is CUDA available: True CUDA runtime version: 11.1.105 GPU models and configuration: GPU 0: NVIDIA GeForce RTX 4060 Ti Nvidia driver version: 535.146.02 cuDNN version: Could not collect HIP runtime version: N/A MIOpen runtime version: N/A

Versions of relevant libraries: [pip] numpy==1.24.4 [pip] torch==1.8.0+cu111 [pip] torchaudio==0.8.0 [pip] torchvision==0.9.0+cu111 [conda] blas 1.0 mkl
[conda] cudatoolkit 11.1.1 ha002fc5_10 conda-forge [conda] ffmpeg 4.3 hf484d3e_0 pytorch [conda] mkl 2021.4.0 h06a4308_640
[conda] mkl-service 2.4.0 py38h95df7f1_0 conda-forge [conda] mkl_fft 1.3.1 py38h8666266_1 conda-forge [conda] mkl_random 1.2.2 py38h1abd341_0 conda-forge [conda] numpy 1.24.4 pypi_0 pypi [conda] torch 1.8.0+cu111 pypi_0 pypi [conda] torchaudio 0.8.0 pypi_0 pypi [conda] torchvision 0.9.0+cu111 pypi_0 pypi

justinchuby commented 5 months ago

Could you provide a script to reproduce the issue? We also recommend using a PyTorch version that is the latest. We are not able to support any older version of pytorch.