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

✨[Feature] + 🐛 [Bug] Allow ITensor biases in aten.convolution converters #1954

Closed
gs-olive opened this issue May 25, 2023 · 2 comments · Fixed by #1972
Closed

✨[Feature] + 🐛 [Bug] Allow ITensor biases in aten.convolution converters #1954

gs-olive opened this issue May 25, 2023 · 2 comments · Fixed by #1972
Assignees
Labels

Comments

@gs-olive
Copy link
Collaborator

Context

Currently, aten.convolution converters do not support ITensor biases, which can cause test failures in CI (example), as the new Dynamo compile path primarily uses ITensor objects for general tensors throughout computation.

# and bias being ITensor is not supported in TensorRT api
# right now
if kwargs["bias"] is not None and not isinstance(kwargs["bias"], torch.Tensor):
raise RuntimeError(
f"linear {name} has bias of type {type(kwargs['bias'])}, Expect Optional[Tensor]"
)
bias = to_numpy(kwargs["bias"]) # type: ignore[arg-type]

Proposed Solution

Allow ITensor biases for aten.convolution ops in the same way that the kernel weights can be ITensor objects. See IConvolutionLayer for further information on TensorRT convolution layers.

@gs-olive gs-olive changed the title ✨[Feature] Allow ITensor biases in aten.convolution converters ✨[Feature] + 🐛 [Bug] Allow ITensor biases in aten.convolution converters May 25, 2023
@gs-olive gs-olive self-assigned this May 30, 2023
@frank-wei
Copy link
Contributor

QQ, what is the ITensor here?

@gs-olive
Copy link
Collaborator Author

gs-olive commented Jun 9, 2023

The ITensor is a TRTTensor representing the bias term in the convolution. It arises in a few Dynamo export/compile cases where the bias tensor is registered as an input to a subgraph during functionalization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants