Is it possible to call the same cuda context from two host threads

I was wondering if it’s possible to issue calls for the same Cuda context from two host threads.

What would happen if I push the context in two threads and then submit something on it? Does one push pop the other, is it unpredictable (not thread safe) or will the driver schedule the on some first come first serve basis?

Contexts are tied to the thread they are created by, so in general, no. The driver API includes a migration facility that (theoretically at least) would let you pass a context from one thread to another, but even then the context is still bound to a single thread and can’t be used by any thread other than the one it currently is bound to.