Skip to content

Commit

Permalink
#3483 pycuda also imports numpy
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Jul 20, 2022
1 parent d36923f commit 533e165
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions xpra/codecs/cuda_common/cuda_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@
import os
from time import monotonic
from threading import RLock
import pycuda #@UnresolvedImport
from pycuda import driver #@UnresolvedImport

from xpra.codecs.nv_util import numpy_import_lock
from xpra.util import engs, print_nested_dict, envint, csv, first_time
from xpra.os_util import load_binary_file
from xpra.log import Logger

with numpy_import_lock:
import pycuda #@UnresolvedImport
from pycuda import driver #@UnresolvedImport

log = Logger("cuda")

MIN_FREE_MEMORY = envint("XPRA_CUDA_MIN_FREE_MEMORY", 10)
Expand Down
2 changes: 1 addition & 1 deletion xpra/codecs/nvfbc/cuda_image_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# later version. See the file COPYING for details.

from time import monotonic
from pycuda import driver #@UnresolvedImport

from xpra.codecs.nv_util import numpy_import_lock
from xpra.codecs.image_wrapper import ImageWrapper
Expand All @@ -15,6 +14,7 @@

with numpy_import_lock:
import numpy
from pycuda import driver #@UnresolvedImport


class CUDAImageWrapper(ImageWrapper):
Expand Down

0 comments on commit 533e165

Please sign in to comment.