Fix directml again now that I understand what the command line is doing

This commit is contained in:
doctorpangloss 2024-02-08 10:17:49 -08:00
parent 09838ed604
commit 3367362cec
2 changed files with 2 additions and 1 deletions

View File

@ -119,6 +119,7 @@ parser.add_argument("--plausible-analytics-domain", required=False,
help="Specifies the domain name for analytics events.")
parser.add_argument("--analytics-use-identity-provider", action="store_true",
help="Uses platform identifiers for unique visitor analytics.")
if options.args_parsing:
args, _ = parser.parse_known_args()
else:

View File

@ -37,7 +37,7 @@ if args.deterministic:
torch.use_deterministic_algorithms(True, warn_only=True)
directml_enabled = False
if args.directml:
if args.directml is not None:
import torch_directml
directml_enabled = True
device_index = args.directml