Initialize CUDA context and load module once per engine instance, storing them in a mutex-protected cache to avoid repeated setups. Use cached context/module for kernel launches, creating a fresh stream each call. Adjust grid dimension calculation to consider multiprocessor count.