Skip to content

Commit

Permalink
Add back pycuda.autoinit to test_pt_onnx_trt (pytorch#51106)
Browse files Browse the repository at this point in the history
Summary:
Fixes pytorch#51105 by adding back the `import pycuda.autoinit`.

Pull Request resolved: pytorch#51106

Reviewed By: mingzhe09088

Differential Revision: D26086808

Pulled By: heitorschueroff

fbshipit-source-id: 88d98796c87a44cedaa1f6666e9f71a424293641
  • Loading branch information
ptrblck authored and facebook-github-bot committed Jan 27, 2021
1 parent 1935880 commit 7b85adf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions caffe2/python/trt/test_pt_onnx_trt.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
import torchvision.models as models

import pycuda.driver as cuda
# This import causes pycuda to automatically manage CUDA context creation and cleanup.
import pycuda.autoinit

import tensorrt as trt
TRT_LOGGER = trt.Logger(trt.Logger.WARNING)
Expand Down

0 comments on commit 7b85adf

Please sign in to comment.