launch: environment names keep their case in --set (IGC_..., ZES_...)
This commit is contained in:
1 parent
4fbd0b3fcb
commit
b3ff0c2ebf
2 files changed
+4
-1
No files matched your search
@@ -196,7 +196,7 @@ def check_context(s: LaunchSettings, *, max_fit_tokens: int | None = None) -> li
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------- advanced settings
|
||||
|
||||
_ENV_NAME = re.compile(r"^[A-Z][A-Z0-9_]*$")
|
||||
_ENV_NAME = re.compile(r"^(?=[A-Za-z0-9_]*[A-Z])[A-Za-z_][A-Za-z0-9_]*$") # any name with a capital letter: STRATA_X, IGC_EnableDPEmulation, ZES_ENABLE_SYSMAN
|
||||
_FLAG_NAME = re.compile(r"^[a-z][a-z0-9-]*$")
|
||||
|
||||
|
||||
|
||||
@@ -58,6 +58,9 @@ class SettingsRules(unittest.TestCase):
|
||||
self.assertEqual(S.split_setting("--kv-grow"), ("--kv-grow", ""))
|
||||
self.assertEqual(S.split_setting("STRATA_PIN_BY_NEED=1"), ("STRATA_PIN_BY_NEED", "1"))
|
||||
self.assertEqual(S.split_setting("expert_cache=auto"), ("--expert-cache", "auto"))
|
||||
self.assertEqual(S.split_setting("IGC_EnableDPEmulation=1"), ("IGC_EnableDPEmulation", "1")) # environment names keep their case
|
||||
self.assertEqual(S.split_setting("ONEAPI_DEVICE_SELECTOR=level_zero:gpu"), ("ONEAPI_DEVICE_SELECTOR", "level_zero:gpu"))
|
||||
self.assertEqual(S.split_setting("--prefill=4096"), ("--prefill", "4096"))
|
||||
with self.assertRaises(ValueError):
|
||||
S.split_setting("no spaces allowed=1")
|
||||
|
||||
|
||||
Reference in new issue
Block a user