From 29bc6eb8e35f89908c736da208d71fed5e6a0ba1 Mon Sep 17 00:00:00 2001 From: Benson Ma Date: Thu, 1 Jun 2023 14:23:29 -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 Reviewed By: csmiler Differential Revision: D45845181 fbshipit-source-id: 2cf5f40f5aceea997a59eb1eef97b27da0fb4a18 --- 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 0c55d00b1..2cc31b1b5 100644 --- a/fbgemm_gpu/CMakeLists.txt +++ b/fbgemm_gpu/CMakeLists.txt @@ -165,7 +165,6 @@ file(GLOB_RECURSE asmjit_sources set(COMMON_OPTIMIZERS adagrad - lars_sgd partial_rowwise_adam partial_rowwise_lamb rowwise_adagrad @@ -179,6 +178,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 0188947f1..d84cde1bb 100644 --- a/fbgemm_gpu/codegen/embedding_backward_code_generator.py +++ b/fbgemm_gpu/codegen/embedding_backward_code_generator.py @@ -1399,7 +1399,7 @@ def lars_sgd() -> None: split_weight_update=split_weight_update, split_post_update="", split_weight_update_cpu=split_weight_update_cpu, - has_cpu_support=True, + has_cpu_support=False, has_gpu_support=True, has_vbe_support=False, )