From 6c244b335b75c660609231d9101130b520d0c94d Mon Sep 17 00:00:00 2001 From: Sarunya Pumma Date: Mon, 15 May 2023 10:22:10 -0700 Subject: [PATCH] Remove CPU support for lars_sgd (#1774) Summary: Pull Request resolved: https://github.com/pytorch/FBGEMM/pull/1774 This diff is a part of FBGEMM TBE optimizer deprecation plan (see https://github.com/pytorch/FBGEMM/discussions/1727) Changes include: - Setting `has_cpu_support` of `lars_sgd` to `False` in the code gen script - Updating `codegen/TARGETS` and `CMakeLists.txt` See D45835048 for how the changes affect the code generation Differential Revision: D45845181 fbshipit-source-id: 5cd2e497ab021b32d85a58207c6dd14e69cef03a --- fbgemm_gpu/CMakeLists.txt | 2 +- fbgemm_gpu/codegen/embedding_backward_code_generator.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fbgemm_gpu/CMakeLists.txt b/fbgemm_gpu/CMakeLists.txt index 23d27e7736..c571841f0e 100644 --- a/fbgemm_gpu/CMakeLists.txt +++ b/fbgemm_gpu/CMakeLists.txt @@ -161,7 +161,6 @@ file(GLOB_RECURSE asmjit_sources set(COMMON_OPTIMIZERS adagrad - lars_sgd partial_rowwise_adam partial_rowwise_lamb rowwise_adagrad @@ -175,6 +174,7 @@ set(CPU_ONLY_OPTIMIZERS "") set(GPU_ONLY_OPTIMIZERS adam lamb + lars_sgd rowwise_adagrad_with_weight_decay approx_rowwise_adagrad_with_weight_decay) diff --git a/fbgemm_gpu/codegen/embedding_backward_code_generator.py b/fbgemm_gpu/codegen/embedding_backward_code_generator.py index 9f3cfdac6a..4148c29d4b 100644 --- a/fbgemm_gpu/codegen/embedding_backward_code_generator.py +++ b/fbgemm_gpu/codegen/embedding_backward_code_generator.py @@ -1324,7 +1324,7 @@ def lars_sgd() -> None: split_precomputation=split_precomputation, split_weight_update=split_weight_update, split_weight_update_cpu=split_weight_update_cpu, - has_cpu_support=True, + has_cpu_support=False, has_gpu_support=True, )