`torch_tensorrt.dynamo.compile` silently drops settings it does not know, so a typo changes the result with no warning
Los mantenedores suelen responder en 3 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- Medio día
- Aptitud para principiantes
- 65/100
Línea de trabajo
Start in torch_tensorrt.dynamo.compile, which takes **kwargs and reads only a few known names, and in the torch_tensorrt.compile wrapper that forwards to it. Run the repro with the misspelled min_blok_size and confirm no _run_on_acc submodule appears. Done when an unknown keyword raises TypeError naming it, while the deprecated names that are still accepted keep their warnings.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What is wrong
torch_tensorrt.dynamo.compile and torch_tensorrt.compile accept any keyword. A setting name they do not know is dropped with no error and no warning. So a misspelled setting, a setting from a newer release, or a setting that only one code path reads, simply does nothing, and the user finds out much later, if at all.
What this blocks
No policy in pytorch/executorch#24353 is blocked by this today.
Earlier, lingbot_vla_v2 lost a setting this way: the export passed, and its program failed only later, when it was loaded without PyTorch.
A fix turns such mistakes into an error at compile time.
Repro
import torch
import torch_tensorrt
class Small(torch.nn.Module):
def forward(self, x):
return torch.relu(x * 2 + 1)
x = torch.randn(4, 8, device="cuda")
program = torch.export.export(Small().cuda(), (x,))
# "min_blok_size" is misspelled on purpose.
trt_gm = torch_tensorrt.dynamo.compile(program, arg_inputs=[x], min_blok_size=1)
print([name for name, _ in trt_gm.named_children()])
# No error and no warning. The default min_block_size (5) is used,
# so the 3-op graph stays in PyTorch: no _run_on_acc submodule.
Actual
No message mentions min_blok_size. The only related message is about the default min_block_size:
WARNING:torch_tensorrt.dynamo._compiler:3 supported operations detected in subgraph containing 3 computational nodes. Skipping this subgraph, since min_block_size was detected to be 5
['_guards_fn']
torch_tensorrt.compile(model, ir="dynamo", inputs=[x], min_blok_size=1) prints the same 2 lines.
Expected
An unknown setting raises TypeError (or at least warns), naming the setting. The few deprecated names that are still accepted on purpose can keep their deprecation warnings.
Versions
torch 2.15.0 (CUDA 13.2), torch_tensorrt 2.15.0, TensorRT 11.4.0.106, Linux x86_64, H100, driver 580.126.09.
What was tried
Reading compile(): it takes **kwargs and reads only debug, truncate_long_and_double, refit, make_refittable and enable_cross_compile_for_windows from it. Everything else is ignored. Related but different: #5030 (a known setting ignored) and #5031 (extra kwarg_inputs ignored).
- Lenguaje dominante
- Python
- Estrellas
- 3k
- Forks
- 421
- Merge medio
- 4 d 7 h
- PR fusionados (30 d)
- 62
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de pytorch/TensorRT
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 3 días
-
🐛 [Bug] torch.fmod returns a tiny value with the wrong sign when the float quotient rounds upPosiblemente ocupada @micwill755 la tomó hace 4 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
pytorch/TensorRT#4860 · 1 asignado ·
Los mantenedores suelen responder en 3 días
-
Removing ptq.hAbiertoStory: Build & Install & Packaging
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
Los mantenedores suelen responder en 3 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 22/100
Los mantenedores suelen responder en 3 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 18/100
Los mantenedores suelen responder en 3 días
Todos los issues de pytorch/TensorRT
Issues similares
-
add entry to blockAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
StevenBlack/hosts#3299 ·
-
`garak --report` overwrites the input report when its name has no ".report"Posiblemente ocupada @0z5a la tomó hoy. Abiertoneeds-triage
Dificultad 2/5 Medio día Aptitud para principiantes 72/100
Los mantenedores suelen responder en 2 días
-
plot_graph crashes when a mesh node has no m2m edgePosiblemente ocupada @tygvi la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
mllam/neural-lam#883 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
future-agi/future-agi#4092 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
transcript analytics: a text whose only protected spans the prose pass redacts is withheld wholeAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
WingedGuardian/GENesis-AGI#4641 ·
Los mantenedores suelen responder en 1 día