Skip to content

Add back pycuda.autoinit to test_pt_onnx_trt#51106

Closed
ptrblck wants to merge 1 commit intopytorch:masterfrom
ptrblck:pycuda_autoinit
Closed

Add back pycuda.autoinit to test_pt_onnx_trt#51106
ptrblck wants to merge 1 commit intopytorch:masterfrom
ptrblck:pycuda_autoinit

Conversation

@ptrblck
Copy link
Copy Markdown
Collaborator

@ptrblck ptrblck commented Jan 26, 2021

Fixes #51105 by adding back the import pycuda.autoinit.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

facebook-github-bot commented Jan 26, 2021

💊 CI failures summary and remediations

As of commit 2491984 (more details on the Dr. CI page):


💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 26, 2021

Codecov Report

Merging #51106 (2491984) into master (e843974) will decrease coverage by 0.19%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #51106      +/-   ##
==========================================
- Coverage   80.76%   80.57%   -0.20%     
==========================================
  Files        1927     1927              
  Lines      210373   210373              
==========================================
- Hits       169914   169505     -409     
- Misses      40459    40868     +409     

@heitorschueroff heitorschueroff self-requested a review January 26, 2021 19:39
@heitorschueroff heitorschueroff added module: cuda Related to torch.cuda, and CUDA support in general triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels Jan 26, 2021
Copy link
Copy Markdown
Contributor

@heitorschueroff heitorschueroff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ptrblck Thanks for the fix. Out of curiosity, why did we remove this import to begin with?

@ptrblck
Copy link
Copy Markdown
Collaborator Author

ptrblck commented Jan 26, 2021

I think in #49980 an automatic tool was used to remove unused imports.
Since the import of pycuda.autoinit itself does the work, I think this line of code was killed accidentally.

The used cmd was:

./python/libcst/libcst codemod remove_unused_imports.RemoveUnusedImportsWithGlean --no-format caffe2/

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@heitorschueroff has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@heitorschueroff
Copy link
Copy Markdown
Contributor

I think in #49980 an automatic tool was used to remove unused imports.
Since the import of pycuda.autoinit itself does the work, I think this line of code was killed accidentally.

The used cmd was:

./python/libcst/libcst codemod remove_unused_imports.RemoveUnusedImportsWithGlean --no-format caffe2/

I see, thanks for clarifying.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@heitorschueroff merged this pull request in 7b85adf.

laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed Merged module: cuda Related to torch.cuda, and CUDA support in general open source triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_pt_onnx_trt fails after removing pycuda.autoinit in #49980

4 participants