Skip to content
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

Add OptimType.NONE in SplitTBE (defuse bwd and optim) #1819

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
3 changes: 2 additions & 1 deletion fbgemm_gpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ set(GPU_ONLY_OPTIMIZERS
partial_rowwise_lamb
lars_sgd
rowwise_adagrad_with_weight_decay
approx_rowwise_adagrad_with_weight_decay)
approx_rowwise_adagrad_with_weight_decay
none)

set(DEPRECATED_OPTIMIZERS
approx_sgd
Expand Down
19 changes: 19 additions & 0 deletions fbgemm_gpu/codegen/embedding_backward_code_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1641,6 +1641,23 @@ def backward_dense() -> None:
)


def none_optimizer() -> None:
generate(
optimizer="none",
dense=False,
args=make_args(
[
(INT, "total_hash_size"),
(INT, "total_unique_indices"),
]
),
# Generate only GPU code
has_cpu_support=False,
has_gpu_support=True,
has_vbe_support=False,
)


def gen__init__py() -> None:
template = env.get_template("__init__.template")
src_py = template.render()
Expand Down Expand Up @@ -1670,6 +1687,8 @@ def emb_codegen(
rowwise_adagrad_with_counter()
rowwise_weighted_adagrad()
sgd()
none_optimizer()

gen__init__py()


Expand Down
Loading