-
Notifications
You must be signed in to change notification settings - Fork 356
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
❓ [Question] operator being decomposed rather than being converted when a corresponding converter exists? #2665
Labels
question
Further information is requested
Comments
The same for aten.leaky_relu. import torch
import torch.nn as nn
import torch_tensorrt
class MyModule(nn.Module):
def __init__(self):
super().__init__()
self.m = nn.LeakyReLU()
def forward(self, x):
return self.m(x)
model = MyModule().eval().cuda().half()
inputs = [torch.randn((1, 3, 4, 4), dtype=torch.half, device="cuda")]
optimized_model = torch_tensorrt.compile(
model,
ir="dynamo",
inputs=inputs,
enabled_precisions={torch.half},
debug=True,
min_block_size=1,
)
|
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch_tensorrt
class MyModule(nn.Module):
def __init__(self):
super().__init__()
def forward(self, x):
return F.interpolate(x, scale_factor=2, mode="bilinear", align_corners=True)
model = MyModule().eval().cuda().half()
inputs = [
torch.randn((1, 3, 128, 128), dtype=torch.half, device="cuda"),
]
optimized_model = torch_tensorrt.compile(
model,
ir="dynamo",
inputs=inputs,
enabled_precisions={torch.half},
debug=True,
min_block_size=1,
)
|
HolyWu
changed the title
❓ [Question] grid_sampler_2d converter doesn't get used?
❓ [Question] operator being decomposed rather than being converted when a corresponding converter exists?
Mar 3, 2024
This was referenced Mar 10, 2024
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
❓ Question
From the debug log below, it seems that the
aten.grid_sampler_2d
operator gets decomposed into several lower-level operators. But isn't there a corresponding converter which should be used?What you have already tried
Environment
conda
,pip
,libtorch
, source): pipThe text was updated successfully, but these errors were encountered: