[CI] [ROCm] Bugfix device environment issue (#1984)
Signed-off-by: tjtanaa <tunjian.tan@embeddedllm.com>
This commit is contained in:
1 parent
fc5e8f825e
commit
c85acb1773
5 files changed
+32
-5
No files matched your search
@@ -113,6 +113,18 @@ class OmniPlatform(Platform):
|
||||
def supports_cpu_offload(cls) -> bool:
|
||||
return True
|
||||
|
||||
@classmethod
|
||||
def set_device_control_env_var(cls, devices: str | int | None) -> None:
|
||||
import os
|
||||
|
||||
os.environ[cls.device_control_env_var] = devices
|
||||
|
||||
@classmethod
|
||||
def unset_device_control_env_var(cls) -> None:
|
||||
import os
|
||||
|
||||
os.environ.pop(cls.device_control_env_var, None)
|
||||
|
||||
|
||||
class UnspecifiedOmniPlatform(OmniPlatform):
|
||||
_omni_enum = OmniPlatformEnum.UNSPECIFIED
|
||||
|
||||
Reference in new issue
Block a user