Hello folks, i am working on Image to Image translation task. I trained I2SB model. I want to optimize with TensorRT so i follow instruction on given this page. When run compile i get error.
RuntimeError: View operation returned a tensor that is the same as the input base tensor. This is no longer allowed; you must explicitly create a new tensor (e.g., using .detach()). As a user, you could have made a mistake implementing __torch_dispatch__ or a Python operator decomposition or meta registration; if that's not the case, please report a bug to PyTorch or the backend you are using.
Is there anyone who struggle with same this problem ? I am wondering your solution.
the code compile code :
batch = next(iter(dataloader))
model = torch_tensorrt.compile(runner.net,ir='dynamo',inputs=batch, enabled_precisions= { torch_tensorrt.dtype.half})