Skip to content

Revert D76866940 #4391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions fbgemm_gpu/fbgemm_gpu/utils/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@


def load_torch_module(
unified_path: str,
cuda_path: Optional[str] = None,
hip_path: Optional[str] = None,
mtia_path: Optional[str] = None,
unified_path: str, cuda_path: Optional[str] = None, hip_path: Optional[str] = None
) -> None:
try:
torch.ops.load_library(unified_path)
Expand All @@ -27,16 +24,9 @@ def load_torch_module(
hip_path = f"{unified_path}_hip"
torch.ops.load_library(hip_path)
else:
try:
# pyre-ignore-next-line[21]
import mtia.host_runtime.torch_mtia.dynamic_library # noqa

if mtia_path is not None:
torch.ops.load_library(mtia_path)
except OSError:
if not cuda_path:
cuda_path = f"{unified_path}_cuda"
torch.ops.load_library(cuda_path)
if not cuda_path:
cuda_path = f"{unified_path}_cuda"
torch.ops.load_library(cuda_path)


def load_torch_module_bc(new_path: str, old_path: str) -> None:
Expand Down
Loading