Skip to content

Commit

Permalink
fix: Transfer calibration data to gpu when it is not a batch
Browse files Browse the repository at this point in the history
Signed-off-by: Dheeraj Peri <[email protected]>
  • Loading branch information
peri044 committed Jun 29, 2021
1 parent a032c3a commit 23739cb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions py/trtorch/ptq.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ def get_batch(self, names):
# Treat the first element as input and others as targets.
if isinstance(batch, list):
batch = batch[0].to(self.device)
else:
batch = batch.to(self.device)
return [batch.data_ptr()]


Expand Down

0 comments on commit 23739cb

Please sign in to comment.