nd4j-backends/nd4j-backend-impls/nd4j-cuda/src/main/java/org/nd4j/linalg/jcublas/ops/executioner/CudaGridExecutioner.java
@Override
    public void flushQueueBlocking() {
        flushQueue();

        //    logger.info("Blocking flush");n

        ((CudaContext) AtomicAllocator.getInstance().getDeviceContext().getContext()).syncOldStream();
        ((CudaContext) AtomicAllocator.getInstance().getDeviceContext().getContext()).syncSpecialStream();
    }
@Override
    public void flushQueueBlocking() {
        flushQueue();

        //    logger.info("Blocking flush");n

        ((CudaContext) AtomicAllocator.getInstance().getDeviceContext().getContext()).syncOldStream();
        ((CudaContext) AtomicAllocator.getInstance().getDeviceContext().getContext()).syncSpecialStream();
    }
This method forces all currently enqueued ops to be executed immediately

PLEASE NOTE: This call is always blocking, until all queued operations are finished