Skip to content

PyCUDA ERROR when running example script #1

@wabhijan

Description

@wabhijan

When trying to run any script using this library, I get a pyCUDA error.

pycuda.driver.CompileError: nvcc preprocessing of C:\Users\<username>\AppData\Local\Temp\tmp67wn3cf9.cu failed
[command: nvcc --preprocess -arch sm_86 -m64 -IC:\Users\<username>\AppData\Local\Programs\Python\Python39\lib\site-packages\pycuda\cuda C:\Users\<username>\AppData\Local\Temp\tmp67wn3cf9.cu --compiler-options -EP]
-------------------------------------------------------------------
PyCUDA ERROR: The context stack was not empty upon module cleanup. 
-------------------------------------------------------------------
A context was still active when the context stack was being        
cleaned up. At this point in our execution, CUDA may already       
have been deinitialized, so there is no way we can finish
cleanly. The program will be aborted now.
Use Context.pop() to avoid this problem.
-------------------------------------------------------------------

nvcc --version returns

nvcc: NVIDIA (R) Cuda compiler driver                                                     
Copyright (c) 2005-2023 NVIDIA Corporation                                                                              
Built on Tue_Jun_13_19:42:34_Pacific_Daylight_Time_2023                                                                 
Cuda compilation tools, release 12.2, V12.2.91                                                                          
Build cuda_12.2.r12.2/compiler.32965470_0     

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions