Shared gpu on cpu

Why do you want to condition on this too? The goal of this flag is to unpickle CudaNdarraySharedVariable as a TensorSharedVariable. Why do you want this to depend of device? The value of device isn't saved in the pickle. Is it the one defined by the user in the new process.

Did you pickle the shared variable or the value of the shared variable (call get_value()?)