Skip to content

Commit

Permalink
Redefine FBGEMM targets with gpu_cpp_library [10/N] (#3131)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #3131

X-link: facebookresearch/FBGEMM#218

- Redefine `input_combine_*` targets using `gpu_cpp_library`

Reviewed By: spcyppt

Differential Revision: D62611707

fbshipit-source-id: f6ddbb989eaa99b82925e25e1522b8a4718b396b
  • Loading branch information
q10 authored and facebook-github-bot committed Sep 13, 2024
1 parent 1f166ba commit a5d8432
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
5 changes: 2 additions & 3 deletions fbgemm_gpu/src/placeholder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
10 changes: 6 additions & 4 deletions fbgemm_gpu/test/combine/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")


Expand Down

0 comments on commit a5d8432

Please sign in to comment.