Import pycuda.autoinit() works infinitely

Can’t inizialize cuda, when i’m trying to run

import pycuda.autoinit()


import pycuda.driver as cuda

programm works inifinite.

The problem begin to occure after restarting machine, i didn’t install anything.

1 Like

I’m facing similar issues. I’m using an AGX Xavier, Jetpack 4.4.1.

import pycuda.driver as cuda

works but following doesn’t work

import pycuda.autoinit

pycuda is being used for tensorRT model definition so if pycuda.autoinit is removed the last line of the following code block doesn’t work either.

logger = trt.Logger(trt.Logger.WARNING)
runtime = trt.Runtime(logger)
with open(f"{model_name}", "rb") as f:
    model_trt =
self.model_trt = runtime.deserialize_cuda_engine(model_trt)
ctx = self.model_trt.create_execution_context()