Skip to content

[fbgemm_gpu] Fix PT2 wrapper registrations #3721

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .github/scripts/fbgemm_gpu_install.bash
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ __install_check_operator_registrations () {
else
local test_operators=(
"torch.ops.fbgemm.asynchronous_inclusive_cumsum"
"torch.ops.fbgemm.split_embedding_codegen_lookup_sgd_function_pt2"
)
fi

Expand Down
4 changes: 4 additions & 0 deletions fbgemm_gpu/cmake/TbeTraining.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@ handle_genfiles_rocm(gen_gpu_files_forward_split)
get_tbe_sources_list(static_cpu_files_training)
get_tbe_sources_list(gen_cpu_files_training)
get_tbe_sources_list(gen_gpu_files_training)
get_tbe_sources_list(gen_cpu_files_training_pt2)
get_tbe_sources_list(gen_gpu_files_training_pt2)
get_tbe_sources_list(gen_gpu_files_training_dense)
get_tbe_sources_list(gen_gpu_files_training_split_host)
get_tbe_sources_list(gen_gpu_files_training_gwd)
get_tbe_sources_list(gen_gpu_files_training_vbe)
handle_genfiles_rocm(gen_cpu_files_training)
handle_genfiles_rocm(gen_gpu_files_training)
handle_genfiles_rocm(gen_cpu_files_training_pt2)
handle_genfiles_rocm(gen_gpu_files_training_pt2)
handle_genfiles_rocm(gen_gpu_files_training_dense)
handle_genfiles_rocm(gen_gpu_files_training_split_host)
Expand Down Expand Up @@ -166,6 +168,8 @@ gpu_cpp_library(
SHARED
INCLUDE_DIRS
${fbgemm_sources_include_directories}
CPU_SRCS
${gen_cpu_files_training_pt2}
GPU_SRCS
${gen_gpu_files_training_pt2}
NVCC_FLAGS
Expand Down
22 changes: 11 additions & 11 deletions fbgemm_gpu/cmake/tbe_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,13 @@
static_cpu_files_common = [
"codegen/utils/embedding_bounds_check_host_cpu.cpp",
"codegen/training/forward/embedding_forward_split_cpu.cpp",
"codegen/training/pt2/pt2_autograd_utils.cpp",
]

static_gpu_files_common = [
"codegen/utils/embedding_bounds_check_v1.cu",
"codegen/utils/embedding_bounds_check_v2.cu",
"codegen/utils/embedding_bounds_check_host.cpp",
"codegen/training/pt2/pt2_autograd_utils.cpp",
]

gen_cpu_files_training = (
Expand All @@ -335,17 +335,13 @@
"gen_embedding_backward_split_{}_cpu.cpp".format(optimizer)
for optimizer in ALL_OPTIMIZERS
]
+ [
"gen_embedding_backward_split_{}_pt2_cpu_wrapper.cpp".format(optimizer)
for optimizer in ALL_OPTIMIZERS
]
+ [
"gen_embedding_backward_{}_split_cpu.cpp".format(optimizer)
for optimizer in CPU_OPTIMIZERS
]
)

gen_gpu_files_training_pt2 = (
gen_cpu_files_training_pt2 = (
[
"gen_embedding_split_{}_pt2_autograd.cpp".format(optimizer)
for optimizer in ALL_OPTIMIZERS
Expand All @@ -355,15 +351,19 @@
for optimizer in SSD_OPTIMIZERS
]
+ [
"gen_embedding_backward_split_{}_pt2_cuda_wrapper.cpp".format(optimizer)
"gen_embedding_backward_split_{}_pt2_cpu_wrapper.cpp".format(optimizer)
for optimizer in ALL_OPTIMIZERS
]
+ [
"gen_embedding_backward_ssd_{}_pt2_cuda_wrapper.cpp".format(optimizer)
for optimizer in SSD_OPTIMIZERS
]
)

gen_gpu_files_training_pt2 = [
"gen_embedding_backward_split_{}_pt2_cuda_wrapper.cpp".format(optimizer)
for optimizer in ALL_OPTIMIZERS
] + [
"gen_embedding_backward_ssd_{}_pt2_cuda_wrapper.cpp".format(optimizer)
for optimizer in SSD_OPTIMIZERS
]

gen_gpu_files_training_dense = [
# Dense host and kernel, and forward-quantized host src files
fstring.format(wdesc)
Expand Down