cupyx.allow_synchronize

cupyx.allow_synchronize(allow)[source]

Allows or disallows device synchronization temporarily in the current thread.

If device synchronization is detected, cupyx.DeviceSynchronized will be raised.

Note that there can be false negatives and positives. Device synchronization outside CuPy will not be detected.