import os os.environ.setdefault("CUBLAS_WORKSPACE_CONFIG", ":4096:8") # must precede cuBLAS init for deterministic inference