mirror of
https://github.com/openai/CLIP.git
synced 2026-11-05 01:37:26 +00:00
[GH-ISSUE #367] openai/clip-vit-large-patch14 cannot be traced with torch_tensorrt.compile #320
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openai/CLIP#320
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kct22aws on GitHub (Jun 3, 2023).
Original GitHub issue: https://github.com/openai/CLIP/issues/367
I am able to trace the model with
torch.jit.trace, and I know the shape of input tensors. I don't think I am using any tensors outside the GPU, but I keep getting the error msg when trying to trace this model with tensorRT:Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!
Below is my code:
I am using one Nvidia A10G GPU card which is in AWS g5.2xl instance.
@kct22aws commented on GitHub (Jun 3, 2023):
My code works for other models. So is it because your model somehow has some intermediate tensors being mapped to CPU?