skcuda.misc.init_context

skcuda.misc.init_context(dev)[source]

Create a context that will be cleaned up properly.

Create a context on the specified device and register its pop() method with atexit.

Parameters:dev (pycuda.driver.Device) – GPU device.
Returns:ctx – Created context.
Return type:pycuda.driver.Context