Skip to content

Conversation

@apbose
Copy link
Collaborator

@apbose apbose commented Nov 6, 2025

This PR addresses the case of empty tensor in torchTRT based on https://docs.nvidia.com/deeplearning/tensorrt/latest/inference-library/advanced.html#empty-tensors, and also focuses on concat operation edge case involving empty tensor

TODO: Might have to separate the case of concat from this PR, in the case when torch.Tensor([]) and a rank greater tensor are concatenated, which is a valid case in pytorch but not TRT.

This addressed #3865. Corresponding HF transformers issue raised - huggingface/transformers#42027 where empty tensor should not come in the first place

@apbose apbose self-assigned this Nov 6, 2025
@meta-cla meta-cla bot added the cla signed label Nov 6, 2025
@apbose apbose marked this pull request as draft November 6, 2025 21:51
@github-actions github-actions bot added component: tests Issues re: Tests component: conversion Issues re: Conversion stage component: core Issues re: The core compiler component: api [Python] Issues re: Python API component: runtime component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths labels Nov 6, 2025
@github-actions github-actions bot requested a review from peri044 November 6, 2025 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed component: api [Python] Issues re: Python API component: conversion Issues re: Conversion stage component: core Issues re: The core compiler component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths component: runtime component: tests Issues re: Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants