diff --git a/fbgemm_gpu/src/placeholder.cpp b/fbgemm_gpu/src/placeholder.cpp index 16d443485..82cf3aa52 100644 --- a/fbgemm_gpu/src/placeholder.cpp +++ b/fbgemm_gpu/src/placeholder.cpp @@ -6,7 +6,6 @@ * LICENSE file in the root directory of this source tree. */ -/* - This is placeholder code to force compilation and generation of .so file. -*/ +/// This is a placeholder source file that is used to force compilation and +/// generation of an .SO file. namespace fbgemm_gpu {} diff --git a/fbgemm_gpu/test/combine/common.py b/fbgemm_gpu/test/combine/common.py index a25d7cc9f..75c8bb529 100644 --- a/fbgemm_gpu/test/combine/common.py +++ b/fbgemm_gpu/test/combine/common.py @@ -11,14 +11,16 @@ import fbgemm_gpu import torch +from fbgemm_gpu.utils.loader import load_torch_module + # pyre-fixme[16]: Module `fbgemm_gpu` has no attribute `open_source`. open_source: bool = getattr(fbgemm_gpu, "open_source", False) if not open_source: - if torch.version.hip: - torch.ops.load_library("//deeplearning/fbgemm/fbgemm_gpu:input_combine_hip") - else: - torch.ops.load_library("//deeplearning/fbgemm/fbgemm_gpu:input_combine") + load_torch_module( + "//deeplearning/fbgemm/fbgemm_gpu:input_combine", + hip_path="//deeplearning/fbgemm/fbgemm_gpu:input_combine_hip", + ) torch.ops.load_library("//deeplearning/fbgemm/fbgemm_gpu:input_combine_cpu")