Skip to content

Commit

Permalink
Redefine FBGEMM targets with split_embeddings_utils [1/N] (pytorch#3049)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#3049

X-link: facebookresearch/FBGEMM#146

- Redefine `split_embeddings_utils`, `embedding_ops_common`, and `index_select_ops` targets with `gpu_cpp_library()`

Reviewed By: duduyi2013

Differential Revision: D61889098

fbshipit-source-id: 7c6fae12a5e2bccf382d7746bf510b6b812a3ba5
  • Loading branch information
q10 authored and facebook-github-bot committed Aug 29, 2024
1 parent c41d676 commit 076dad3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

#include "fbgemm_gpu/embedding_backward_template_helpers.cuh"
#include "fbgemm_gpu/utils/tensor_accessor.h"
#include "fbgemm_gpu/split_embeddings_utils.cuh"
#include "fbgemm_gpu/sparse_ops.h"
#include "fbgemm_gpu/split_embeddings_utils.cuh"
#include "fbgemm_gpu/utils/ops_utils.h"

using Tensor = at::Tensor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
{%- set locs_or_addrs_idx = "row_idx" if ssd else "cache_idx" %}

#include "fbgemm_gpu/embedding_forward_template_helpers.cuh"
#include "fbgemm_gpu/split_embeddings_cache_cuda.cuh"

using Tensor = at::Tensor;
using namespace fbgemm_gpu;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@
{%- if not is_index_select %}
////////////////////////////////////////////////////////////////////////////////
// Required for op registrations
#include "fbgemm_gpu/utils/ops_utils.h"
////////////////////////////////////////////////////////////////////////////////
#include "fbgemm_gpu/utils/ops_utils.h"
{%- endif %}
#include "fbgemm_gpu/embedding_forward_template_helpers.cuh"
#include "fbgemm_gpu/split_embeddings_cache_cuda.cuh"

using Tensor = at::Tensor;
using namespace fbgemm_gpu;

////////////////////////////////////////////////////////////////////////////////
// External Function Declarations
////////////////////////////////////////////////////////////////////////////////
Expand Down
4 changes: 1 addition & 3 deletions fbgemm_gpu/fbgemm_gpu/sparse_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@
torch.ops.load_library(
"//deeplearning/fbgemm/fbgemm_gpu/codegen:embedding_ops_hip"
)
torch.ops.load_library(
"//deeplearning/fbgemm/fbgemm_gpu/codegen:index_select_ops_hip"
)

else:
torch.ops.load_library("//deeplearning/fbgemm/fbgemm_gpu:sparse_ops")
torch.ops.load_library(
Expand Down

0 comments on commit 076dad3

Please sign in to comment.