NeMo icon indicating copy to clipboard operation
NeMo copied to clipboard

Import pycuda.autoprimaryctx or pycuda.autoinit to init pycuda execut…

Open liji-nv opened this issue 3 years ago • 3 comments

…ion environment

Signed-off-by: Jin Li [email protected]

What does this PR do ?

Import pycuda.autoprimaryctx or pycuda.autoinit to init pycuda execution environment to fix "invalid device context - no currently active context?" issue

Collection: [Note which collection this PR will affect]

Changelog

  • Add specific line by line info of high level changes in this PR.

Usage

  • You can potentially add a usage example below
# Add a code snippet demonstrating how to use this 

Before your PR is "Ready for review"

Pre checks:

  • [x] Make sure you read and followed Contributor guidelines
  • [ ] Did you write any new necessary tests?
  • [ ] Did you add or update any necessary documentation?
  • [ ] Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
    • [ ] Reviewer: Does the PR have correct import guards for all optional libraries?

PR Type:

  • [ ] New Feature
  • [x] Bugfix
  • [ ] Documentation

If you haven't finished some of the above items you can still open "Draft" PR.

Who can review?

Anyone in the community is free to review the PR once the checks have passed. Contributor guidelines contains specific people who can review PRs to various areas.

Additional Information

  • Related to # (issue)

liji-nv avatar Sep 20 '22 07:09 liji-nv

This pull request introduces 2 alerts when merging 28f9a5fd466d49d786c8cd37fe16e154c4d5a19f into f1825bc4b724b78c2d6ca392b616e8dc9a8cde04 - view on LGTM.com

new alerts:

  • 2 for Unused import

lgtm-com[bot] avatar Sep 20 '22 08:09 lgtm-com[bot]

What if pycuda isnt installed at all?

titu1994 avatar Sep 21 '22 00:09 titu1994

What if pycuda isnt installed at all?

@titu1994 This example cannot run without pycuda if I understand correctly.

liji-nv avatar Sep 21 '22 03:09 liji-nv

This pull request introduces 2 alerts when merging 3b07c28c2c73196873099ccdec315b9590c8d298 into ed0282214f6f78fb21c1c18e0400a2f5ae4ec5b0 - view on LGTM.com

new alerts:

  • 2 for Unused import

lgtm-com[bot] avatar Sep 22 '22 21:09 lgtm-com[bot]