Skip to content

Commit

Permalink
fix logic for default PYTORCH_ROCM_ARCH
Browse files Browse the repository at this point in the history
  • Loading branch information
ashao committed Sep 19, 2024
1 parent 6388ab2 commit 0af872b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions smartsim/_core/_install/redisaiBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,17 +155,17 @@ def build(self) -> None:
cmake_command = self._rai_cmake_cmd()
build_command = self._rai_build_cmd

if self.platform.device.is_rocm():
if self.platform.device.is_rocm() and "torch" in self.mlpackages:
pytorch_rocm_arch = os.environ.get("PYTORCH_ROCM_ARCH")
if pytorch_rocm_arch is not None:
if not pytorch_rocm_arch:
logger.info(
f"PYTORCH_ROCM_ARCH not set. Defaulting to '{_SUPPORTED_ROCM_ARCH}'"
)
os.environ["PYTORCH_ROCM_ARCH"] = _SUPPORTED_ROCM_ARCH
if pytorch_rocm_arch != _SUPPORTED_ROCM_ARCH:
elif pytorch_rocm_arch != _SUPPORTED_ROCM_ARCH:
logger.warning(
f"PYTORCH_ROCM_ARCH is not {_SUPPORTED_ROCM_ARCH} which is the\n"
"only officially supported architecture. This may work\n"
f"PYTORCH_ROCM_ARCH is not {_SUPPORTED_ROCM_ARCH} which is the "
"only officially supported architecture. This may still work "
"if you are supplying your own version of libtensorflow."
)

Expand Down

0 comments on commit 0af872b

Please sign in to comment.