Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [Bug] Inputs not correctly passed to ts_convert_method_to_trt_engine function #3259

Open
KumoLiu opened this issue Oct 23, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@KumoLiu
Copy link

KumoLiu commented Oct 23, 2024

Bug Description

In v2.5:

inputs=arg_inputs,

In v2.4:

inputs=inputs,

Inputs not correctly passed tots_convert_method_to_trt_engine function

Error logs

[2024-10-22T18:51:33.597Z]     engine_bytes = torch_tensorrt.convert_method_to_trt_engine(

[2024-10-22T18:51:33.598Z]   File "/usr/local/lib/python3.10/dist-packages/torch_tensorrt/_compile.py", line 355, in convert_method_to_trt_engine

[2024-10-22T18:51:33.598Z]     serialized_engine: bytes = ts_convert_method_to_trt_engine(

[2024-10-22T18:51:33.598Z]   File "/usr/local/lib/python3.10/dist-packages/torch_tensorrt/ts/_compiler.py", line 270, in convert_method_to_trt_engine

[2024-10-22T18:51:33.598Z]     module._c, method_name, _parse_compile_spec(compile_spec)

[2024-10-22T18:51:33.598Z]   File "/usr/local/lib/python3.10/dist-packages/torch_tensorrt/ts/_compile_spec.py", line 225, in _parse_compile_spec

[2024-10-22T18:51:33.598Z]     elif compile_spec["input_signature"] is not None:

[2024-10-22T18:51:33.598Z] KeyError: 'input_signature'

Environment

PyTorch version: 2.5.0+cu124
Is debug build: False
CUDA used to build PyTorch: 12.4
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.4 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect
CMake version: version 3.30.2
Libc version: glibc-2.35

Python version: 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0] (64-bit runtime)
Python platform: Linux-5.15.0-122-generic-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: 12.6.20
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: 
GPU 0: NVIDIA GeForce RTX 3090 Ti
GPU 1: NVIDIA GeForce RTX 3090 Ti

Nvidia driver version: 535.183.01

CPU:
Architecture:                         x86_64
CPU op-mode(s):                       32-bit, 64-bit
Address sizes:                        46 bits physical, 48 bits virtual
Byte Order:                           Little Endian
CPU(s):                               20
On-line CPU(s) list:                  0-19
Vendor ID:                            GenuineIntel
Model name:                           12th Gen Intel(R) Core(TM) i7-12700K
CPU family:                           6
Model:                                151
Thread(s) per core:                   2
Core(s) per socket:                   12
Socket(s):                            1
Stepping:                             2
CPU max MHz:                          5000.0000
CPU min MHz:                          800.0000
BogoMIPS:                             7219.20
Flags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault cat_l2 invpcid_single cdp_l2 ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdt_a rdseed adx smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect avx_vnni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req umip pku ospke waitpkg gfni vaes vpclmulqdq tme rdpid movdiri movdir64b fsrm md_clear serialize pconfig arch_lbr flush_l1d arch_capabilities
Virtualization:                       VT-x
L1d cache:                            512 KiB (12 instances)
L1i cache:                            512 KiB (12 instances)
L2 cache:                             12 MiB (9 instances)
L3 cache:                             25 MiB (1 instance)
NUMA node(s):                         1
NUMA node0 CPU(s):                    0-19
Vulnerability Gather data sampling:   Not affected
Vulnerability Itlb multihit:          Not affected
Vulnerability L1tf:                   Not affected
Vulnerability Mds:                    Not affected
Vulnerability Meltdown:               Not affected
Vulnerability Mmio stale data:        Not affected
Vulnerability Reg file data sampling: Mitigation; Clear Register File
Vulnerability Retbleed:               Not affected
Vulnerability Spec rstack overflow:   Not affected
Vulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:             Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S
Vulnerability Srbds:                  Not affected
Vulnerability Tsx async abort:        Not affected

Versions of relevant libraries:
[pip3] flake8==7.1.1
[pip3] flake8-bugbear==24.2.6
[pip3] flake8-comprehensions==3.15.0
[pip3] mypy==1.11.2
[pip3] mypy-extensions==1.0.0
[pip3] numpy==1.24.4
[pip3] nvidia-cublas-cu12==12.4.5.8
[pip3] nvidia-cuda-cupti-cu12==12.4.127
[pip3] nvidia-cuda-nvrtc-cu12==12.4.127
[pip3] nvidia-cuda-runtime-cu12==12.4.127
[pip3] nvidia-cudnn-cu12==9.1.0.70
[pip3] nvidia-cudnn-frontend==1.5.2
[pip3] nvidia-cufft-cu12==11.2.1.3
[pip3] nvidia-curand-cu12==10.3.5.147
[pip3] nvidia-cusolver-cu12==11.6.1.9
[pip3] nvidia-cusparse-cu12==12.3.1.170
[pip3] nvidia-nccl-cu12==2.21.5
[pip3] nvidia-nvjitlink-cu12==12.4.127
[pip3] nvidia-nvtx-cu12==12.4.127
[pip3] nvtx==0.2.5
[pip3] onnx==1.16.0
[pip3] onnx-graphsurgeon==0.5.2
[pip3] onnxruntime==1.19.2
[pip3] optree==0.12.1
[pip3] pynvjitlink==0.2.3
[pip3] pytorch-ignite==0.4.11
[pip3] pytorch-triton==3.0.0+dedb7bdf3
[pip3] torch==2.5.0
[pip3] torch_tensorrt==2.5.0
[pip3] torchvision==0.20.0a0
[pip3] triton==3.1.0
[conda] Could not collect
@lanluo-nvidia
Copy link
Collaborator

lanluo-nvidia commented Oct 23, 2024

@KumoLiu
The PR for the fix is raised
meanwhile please use arg_inputs instead of inputs for convert_method_to_trt_engine function() as a workaround.
please do let me know if the workaround does not work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants