From 24d00ea855e6472614afa7a5994e6ea54b62752a Mon Sep 17 00:00:00 2001 From: Jack-Khuu Date: Tue, 1 Oct 2024 11:30:53 -0700 Subject: [PATCH] Only show MPS Compile Warning if compile is attempted (#1245) --- torchchat/cli/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchchat/cli/cli.py b/torchchat/cli/cli.py index e4b97db0f..1d624c6c4 100644 --- a/torchchat/cli/cli.py +++ b/torchchat/cli/cli.py @@ -494,7 +494,7 @@ def arg_init(args): ) if "mps" in args.device: - if hasattr(args, "compile") and hasattr(args, "compile_prefill"): + if getattr(args, "compile", False) or getattr(args, "compile_prefill", False): print( "Warning: compilation is not available with device MPS, ignoring option to engage compilation" )