From 5eaf879a8f472e902cadfc04b7d91d44bdf5d2ac Mon Sep 17 00:00:00 2001
From: OuYang Yu <xuanjiuye@gmail.com>
Date: Tue, 28 Jul 2020 19:11:32 +0800
Subject: [PATCH] Rename folder job_completer to job_rewriter (#3308)

Co-authored-by: Li Xinqi <lixinqi2010@gmail.com>
---
 oneflow/core/job/compiler.cpp                      |  2 +-
 oneflow/core/job/job_build_and_infer_ctx.cpp       |  4 ++--
 .../{job_completer => job_rewriter}/acc_grad.cpp   |  2 +-
 .../{job_completer => job_rewriter}/adam_optm.cpp  |  2 +-
 .../add_keep_header_only_op_conf.cpp               |  2 +-
 .../add_keep_header_only_op_conf.h                 |  6 +++---
 .../add_lbi_diff_watcher.cpp                       |  2 +-
 .../auto_learning_rate.cpp                         |  2 +-
 .../auto_mixed_precision.cpp                       |  4 ++--
 .../auto_mixed_precision_lists.cpp                 |  2 +-
 .../auto_mixed_precision_lists.h                   |  6 +++---
 .../auto_train_step.cpp                            |  2 +-
 .../{job_completer => job_rewriter}/autograd.cpp   |  4 ++--
 .../{job_completer => job_rewriter}/autograd.h     |  6 +++---
 .../{job_completer => job_rewriter}/autotick.cpp   |  2 +-
 .../{job_completer => job_rewriter}/autotick.h     |  6 +++---
 .../broadcast_to_compatible_with_grad.cpp          |  2 +-
 .../{job_completer => job_rewriter}/clone_grad.cpp |  2 +-
 .../{job_completer => job_rewriter}/clone_grad.h   |  8 ++++----
 .../complete_ofrecord_decoder.cpp                  |  2 +-
 .../decode_random_autotick.cpp                     |  2 +-
 .../device_tick_autotick.cpp                       |  2 +-
 .../distribute_grad.cpp                            |  2 +-
 ...arallel_cast_before_widening_type_cast_pass.cpp |  2 +-
 ...dump_time_shape_and_blob_parallel_conf_pass.cpp |  2 +-
 .../dump_variable_info_pass.cpp                    |  2 +-
 .../dynamic_reshape_grad.cpp                       |  2 +-
 .../foreign_input_autotick.cpp                     |  2 +-
 .../generate_backward_and_optimizer_op_confs.cpp   |  6 +++---
 .../group_boxing_by_dst_parallel.cpp               |  2 +-
 .../group_boxing_by_dst_parallel.h                 |  6 +++---
 .../identity_grad.cpp                              |  2 +-
 .../indexed_slices_optimizer_rewrite_pass.cpp      |  2 +-
 .../input_autotick.cpp                             |  2 +-
 .../job_completer.cpp                              | 14 +++++++-------
 .../job_completer.h                                |  6 +++---
 .../{job_completer => job_rewriter}/lars_optm.cpp  |  2 +-
 .../lazy_adam_optm.cpp                             |  2 +-
 .../momentum_optm.cpp                              |  2 +-
 .../{job_completer => job_rewriter}/naive_optm.cpp |  2 +-
 .../non_distributed_optimizer_pass.cpp             |  2 +-
 .../op_graph_pass.cpp                              |  2 +-
 .../op_graph_pass.h                                |  6 +++---
 .../{job_completer => job_rewriter}/optimizer.cpp  |  2 +-
 .../{job_completer => job_rewriter}/optimizer.h    |  6 +++---
 .../parallel_cast_grad.cpp                         |  2 +-
 .../{job_completer => job_rewriter}/prelu_grad.cpp |  2 +-
 .../prune_cast_to_static_shape_op_pass.cpp         |  2 +-
 .../prune_parallel_cast_op_pass.cpp                |  2 +-
 .../record_load_autotick.cpp                       |  2 +-
 .../repeat_grad.cpp                                |  2 +-
 .../rmsprop_optm.cpp                               |  2 +-
 .../set_default_variable_conf.cpp                  |  2 +-
 .../sigmoid_cross_entropy_grad.cpp                 |  2 +-
 .../source_user_op_auto_tick.cpp                   |  2 +-
 .../tick_autotick.cpp                              |  2 +-
 .../tie_up_chain_headers.cpp                       |  4 ++--
 .../tuple_identity_grad.cpp                        |  2 +-
 .../{job_completer => job_rewriter}/user_grad.cpp  |  2 +-
 .../variable_autotick.cpp                          |  2 +-
 .../variable_grad.cpp                              |  2 +-
 .../xrt_compilation.h                              |  0
 62 files changed, 92 insertions(+), 92 deletions(-)
 rename oneflow/core/{job_completer => job_rewriter}/acc_grad.cpp (96%)
 rename oneflow/core/{job_completer => job_rewriter}/adam_optm.cpp (98%)
 rename oneflow/core/{job_completer => job_rewriter}/add_keep_header_only_op_conf.cpp (98%)
 rename oneflow/core/{job_completer => job_rewriter}/add_keep_header_only_op_conf.h (81%)
 rename oneflow/core/{job_completer => job_rewriter}/add_lbi_diff_watcher.cpp (97%)
 rename oneflow/core/{job_completer => job_rewriter}/auto_learning_rate.cpp (98%)
 rename oneflow/core/{job_completer => job_rewriter}/auto_mixed_precision.cpp (99%)
 rename oneflow/core/{job_completer => job_rewriter}/auto_mixed_precision_lists.cpp (96%)
 rename oneflow/core/{job_completer => job_rewriter}/auto_mixed_precision_lists.h (83%)
 rename oneflow/core/{job_completer => job_rewriter}/auto_train_step.cpp (98%)
 rename oneflow/core/{job_completer => job_rewriter}/autograd.cpp (99%)
 rename oneflow/core/{job_completer => job_rewriter}/autograd.h (96%)
 rename oneflow/core/{job_completer => job_rewriter}/autotick.cpp (99%)
 rename oneflow/core/{job_completer => job_rewriter}/autotick.h (92%)
 rename oneflow/core/{job_completer => job_rewriter}/broadcast_to_compatible_with_grad.cpp (97%)
 rename oneflow/core/{job_completer => job_rewriter}/clone_grad.cpp (98%)
 rename oneflow/core/{job_completer => job_rewriter}/clone_grad.h (82%)
 rename oneflow/core/{job_completer => job_rewriter}/complete_ofrecord_decoder.cpp (99%)
 rename oneflow/core/{job_completer => job_rewriter}/decode_random_autotick.cpp (96%)
 rename oneflow/core/{job_completer => job_rewriter}/device_tick_autotick.cpp (96%)
 rename oneflow/core/{job_completer => job_rewriter}/distribute_grad.cpp (99%)
 rename oneflow/core/{job_completer => job_rewriter}/do_parallel_cast_before_widening_type_cast_pass.cpp (98%)
 rename oneflow/core/{job_completer => job_rewriter}/dump_time_shape_and_blob_parallel_conf_pass.cpp (96%)
 rename oneflow/core/{job_completer => job_rewriter}/dump_variable_info_pass.cpp (98%)
 rename oneflow/core/{job_completer => job_rewriter}/dynamic_reshape_grad.cpp (97%)
 rename oneflow/core/{job_completer => job_rewriter}/foreign_input_autotick.cpp (96%)
 rename oneflow/core/{job_completer => job_rewriter}/generate_backward_and_optimizer_op_confs.cpp (97%)
 rename oneflow/core/{job_completer => job_rewriter}/group_boxing_by_dst_parallel.cpp (98%)
 rename oneflow/core/{job_completer => job_rewriter}/group_boxing_by_dst_parallel.h (79%)
 rename oneflow/core/{job_completer => job_rewriter}/identity_grad.cpp (98%)
 rename oneflow/core/{job_completer => job_rewriter}/indexed_slices_optimizer_rewrite_pass.cpp (99%)
 rename oneflow/core/{job_completer => job_rewriter}/input_autotick.cpp (95%)
 rename oneflow/core/{job_completer => job_rewriter}/job_completer.cpp (91%)
 rename oneflow/core/{job_completer => job_rewriter}/job_completer.h (85%)
 rename oneflow/core/{job_completer => job_rewriter}/lars_optm.cpp (97%)
 rename oneflow/core/{job_completer => job_rewriter}/lazy_adam_optm.cpp (98%)
 rename oneflow/core/{job_completer => job_rewriter}/momentum_optm.cpp (98%)
 rename oneflow/core/{job_completer => job_rewriter}/naive_optm.cpp (96%)
 rename oneflow/core/{job_completer => job_rewriter}/non_distributed_optimizer_pass.cpp (99%)
 rename oneflow/core/{job_completer => job_rewriter}/op_graph_pass.cpp (96%)
 rename oneflow/core/{job_completer => job_rewriter}/op_graph_pass.h (91%)
 rename oneflow/core/{job_completer => job_rewriter}/optimizer.cpp (99%)
 rename oneflow/core/{job_completer => job_rewriter}/optimizer.h (92%)
 rename oneflow/core/{job_completer => job_rewriter}/parallel_cast_grad.cpp (97%)
 rename oneflow/core/{job_completer => job_rewriter}/prelu_grad.cpp (98%)
 rename oneflow/core/{job_completer => job_rewriter}/prune_cast_to_static_shape_op_pass.cpp (98%)
 rename oneflow/core/{job_completer => job_rewriter}/prune_parallel_cast_op_pass.cpp (98%)
 rename oneflow/core/{job_completer => job_rewriter}/record_load_autotick.cpp (96%)
 rename oneflow/core/{job_completer => job_rewriter}/repeat_grad.cpp (96%)
 rename oneflow/core/{job_completer => job_rewriter}/rmsprop_optm.cpp (96%)
 rename oneflow/core/{job_completer => job_rewriter}/set_default_variable_conf.cpp (98%)
 rename oneflow/core/{job_completer => job_rewriter}/sigmoid_cross_entropy_grad.cpp (97%)
 rename oneflow/core/{job_completer => job_rewriter}/source_user_op_auto_tick.cpp (96%)
 rename oneflow/core/{job_completer => job_rewriter}/tick_autotick.cpp (95%)
 rename oneflow/core/{job_completer => job_rewriter}/tie_up_chain_headers.cpp (98%)
 rename oneflow/core/{job_completer => job_rewriter}/tuple_identity_grad.cpp (95%)
 rename oneflow/core/{job_completer => job_rewriter}/user_grad.cpp (97%)
 rename oneflow/core/{job_completer => job_rewriter}/variable_autotick.cpp (96%)
 rename oneflow/core/{job_completer => job_rewriter}/variable_grad.cpp (94%)
 rename oneflow/core/{job_completer => job_rewriter}/xrt_compilation.h (100%)

diff --git a/oneflow/core/job/compiler.cpp b/oneflow/core/job/compiler.cpp
index 64fb0f6af..f4a117163 100644
--- a/oneflow/core/job/compiler.cpp
+++ b/oneflow/core/job/compiler.cpp
@@ -17,7 +17,7 @@ limitations under the License.
 #include "oneflow/core/job/global_for.h"
 #include "oneflow/core/persistence/tee_persistent_log_stream.h"
 #include "oneflow/core/graph/op_graph.h"
-#include "oneflow/core/job_completer/job_completer.h"
+#include "oneflow/core/job_rewriter/job_completer.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job/job_build_and_infer_ctx.cpp b/oneflow/core/job/job_build_and_infer_ctx.cpp
index 41cbef480..e12f6fe86 100644
--- a/oneflow/core/job/job_build_and_infer_ctx.cpp
+++ b/oneflow/core/job/job_build_and_infer_ctx.cpp
@@ -14,8 +14,8 @@ See the License for the specific language governing permissions and
 limitations under the License.
 */
 #include "oneflow/core/job/job_build_and_infer_ctx.h"
-#include "oneflow/core/job_completer/op_graph_pass.h"
-#include "oneflow/core/job_completer/autograd.h"
+#include "oneflow/core/job_rewriter/op_graph_pass.h"
+#include "oneflow/core/job_rewriter/autograd.h"
 #include "oneflow/core/framework/config_def.h"
 #include "oneflow/core/common/protobuf.h"
 #include "oneflow/core/job/mirrored_sig_infer_hint.h"
diff --git a/oneflow/core/job_completer/acc_grad.cpp b/oneflow/core/job_rewriter/acc_grad.cpp
similarity index 96%
rename from oneflow/core/job_completer/acc_grad.cpp
rename to oneflow/core/job_rewriter/acc_grad.cpp
index ebe70ceb9..43a7f9e2e 100644
--- a/oneflow/core/job_completer/acc_grad.cpp
+++ b/oneflow/core/job_rewriter/acc_grad.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/autograd.h"
+#include "oneflow/core/job_rewriter/autograd.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job_completer/adam_optm.cpp b/oneflow/core/job_rewriter/adam_optm.cpp
similarity index 98%
rename from oneflow/core/job_completer/adam_optm.cpp
rename to oneflow/core/job_rewriter/adam_optm.cpp
index dc5780c5a..f89e78a48 100644
--- a/oneflow/core/job_completer/adam_optm.cpp
+++ b/oneflow/core/job_rewriter/adam_optm.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/optimizer.h"
+#include "oneflow/core/job_rewriter/optimizer.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job_completer/add_keep_header_only_op_conf.cpp b/oneflow/core/job_rewriter/add_keep_header_only_op_conf.cpp
similarity index 98%
rename from oneflow/core/job_completer/add_keep_header_only_op_conf.cpp
rename to oneflow/core/job_rewriter/add_keep_header_only_op_conf.cpp
index 955627307..24f6a4480 100644
--- a/oneflow/core/job_completer/add_keep_header_only_op_conf.cpp
+++ b/oneflow/core/job_rewriter/add_keep_header_only_op_conf.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/add_keep_header_only_op_conf.h"
+#include "oneflow/core/job_rewriter/add_keep_header_only_op_conf.h"
 #include "oneflow/core/job/job_desc.h"
 
 namespace oneflow {
diff --git a/oneflow/core/job_completer/add_keep_header_only_op_conf.h b/oneflow/core/job_rewriter/add_keep_header_only_op_conf.h
similarity index 81%
rename from oneflow/core/job_completer/add_keep_header_only_op_conf.h
rename to oneflow/core/job_rewriter/add_keep_header_only_op_conf.h
index 80ef25a00..82a263b82 100644
--- a/oneflow/core/job_completer/add_keep_header_only_op_conf.h
+++ b/oneflow/core/job_rewriter/add_keep_header_only_op_conf.h
@@ -13,8 +13,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#ifndef ONEFLOW_CORE_JOB_COMPLETER_ADD_KEEP_HEADER_ONLY_H_
-#define ONEFLOW_CORE_JOB_COMPLETER_ADD_KEEP_HEADER_ONLY_H_
+#ifndef ONEFLOW_CORE_JOB_REWRITER_ADD_KEEP_HEADER_ONLY_H_
+#define ONEFLOW_CORE_JOB_REWRITER_ADD_KEEP_HEADER_ONLY_H_
 
 #include "oneflow/core/graph/op_graph.h"
 
@@ -27,4 +27,4 @@ void AddKeepHeaderOnlyOp(const OpGraph& op_graph, JobBuilder* job_builder);
 
 }  // namespace oneflow
 
-#endif  // ONEFLOW_CORE_JOB_COMPLETER_ADD_KEEP_HEADER_ONLY_H_
+#endif  // ONEFLOW_CORE_JOB_REWRITER_ADD_KEEP_HEADER_ONLY_H_
diff --git a/oneflow/core/job_completer/add_lbi_diff_watcher.cpp b/oneflow/core/job_rewriter/add_lbi_diff_watcher.cpp
similarity index 97%
rename from oneflow/core/job_completer/add_lbi_diff_watcher.cpp
rename to oneflow/core/job_rewriter/add_lbi_diff_watcher.cpp
index 477d541af..8ae6a7183 100644
--- a/oneflow/core/job_completer/add_lbi_diff_watcher.cpp
+++ b/oneflow/core/job_rewriter/add_lbi_diff_watcher.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/op_graph_pass.h"
+#include "oneflow/core/job_rewriter/op_graph_pass.h"
 #include "oneflow/core/job/lbi_diff_watcher_info.pb.h"
 #include "oneflow/core/operator/operator.h"
 
diff --git a/oneflow/core/job_completer/auto_learning_rate.cpp b/oneflow/core/job_rewriter/auto_learning_rate.cpp
similarity index 98%
rename from oneflow/core/job_completer/auto_learning_rate.cpp
rename to oneflow/core/job_rewriter/auto_learning_rate.cpp
index 5d97f7a2c..5e0c7ae40 100644
--- a/oneflow/core/job_completer/auto_learning_rate.cpp
+++ b/oneflow/core/job_rewriter/auto_learning_rate.cpp
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 */
 #include "oneflow/core/common/util.h"
-#include "oneflow/core/job_completer/op_graph_pass.h"
+#include "oneflow/core/job_rewriter/op_graph_pass.h"
 #include "oneflow/core/job/job.pb.h"
 #include "oneflow/core/framework/framework.h"
 
diff --git a/oneflow/core/job_completer/auto_mixed_precision.cpp b/oneflow/core/job_rewriter/auto_mixed_precision.cpp
similarity index 99%
rename from oneflow/core/job_completer/auto_mixed_precision.cpp
rename to oneflow/core/job_rewriter/auto_mixed_precision.cpp
index 6216eee39..a648b1956 100644
--- a/oneflow/core/job_completer/auto_mixed_precision.cpp
+++ b/oneflow/core/job_rewriter/auto_mixed_precision.cpp
@@ -13,13 +13,13 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/auto_mixed_precision_lists.h"
+#include "oneflow/core/job_rewriter/auto_mixed_precision_lists.h"
 
 #include <algorithm>
 
 #include "oneflow/core/device/cuda_util.h"
 #include "oneflow/core/framework/framework.h"
-#include "oneflow/core/job_completer/op_graph_pass.h"
+#include "oneflow/core/job_rewriter/op_graph_pass.h"
 #include "oneflow/core/job/job_desc.h"
 
 namespace oneflow {
diff --git a/oneflow/core/job_completer/auto_mixed_precision_lists.cpp b/oneflow/core/job_rewriter/auto_mixed_precision_lists.cpp
similarity index 96%
rename from oneflow/core/job_completer/auto_mixed_precision_lists.cpp
rename to oneflow/core/job_rewriter/auto_mixed_precision_lists.cpp
index ff38cf210..d7997474f 100644
--- a/oneflow/core/job_completer/auto_mixed_precision_lists.cpp
+++ b/oneflow/core/job_rewriter/auto_mixed_precision_lists.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/auto_mixed_precision_lists.h"
+#include "oneflow/core/job_rewriter/auto_mixed_precision_lists.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job_completer/auto_mixed_precision_lists.h b/oneflow/core/job_rewriter/auto_mixed_precision_lists.h
similarity index 83%
rename from oneflow/core/job_completer/auto_mixed_precision_lists.h
rename to oneflow/core/job_rewriter/auto_mixed_precision_lists.h
index 579f0da40..0fe3fcb4c 100644
--- a/oneflow/core/job_completer/auto_mixed_precision_lists.h
+++ b/oneflow/core/job_rewriter/auto_mixed_precision_lists.h
@@ -13,8 +13,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#ifndef ONEFLOW_CORE_JOB_COMPLETER_AUTO_MIXED_PRECISION_LISTS_H_
-#define ONEFLOW_CORE_JOB_COMPLETER_AUTO_MIXED_PRECISION_LISTS_H_
+#ifndef ONEFLOW_CORE_JOB_REWRITER_AUTO_MIXED_PRECISION_LISTS_H_
+#define ONEFLOW_CORE_JOB_REWRITER_AUTO_MIXED_PRECISION_LISTS_H_
 
 #include "oneflow/core/common/util.h"
 #include "oneflow/core/operator/op_conf_util.h"
@@ -34,4 +34,4 @@ class AutoMixedPrecisionLists final {
 
 }  // namespace oneflow
 
-#endif  // ONEFLOW_CORE_JOB_COMPLETER_AUTO_MIXED_PRECISION_LISTS_H_
+#endif  // ONEFLOW_CORE_JOB_REWRITER_AUTO_MIXED_PRECISION_LISTS_H_
diff --git a/oneflow/core/job_completer/auto_train_step.cpp b/oneflow/core/job_rewriter/auto_train_step.cpp
similarity index 98%
rename from oneflow/core/job_completer/auto_train_step.cpp
rename to oneflow/core/job_rewriter/auto_train_step.cpp
index e6e4f99f5..c4b7538b2 100644
--- a/oneflow/core/job_completer/auto_train_step.cpp
+++ b/oneflow/core/job_rewriter/auto_train_step.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/op_graph_pass.h"
+#include "oneflow/core/job_rewriter/op_graph_pass.h"
 #include "oneflow/core/job/job.pb.h"
 #include "oneflow/core/job/foreign_callback.h"
 #include "oneflow/core/framework/framework.h"
diff --git a/oneflow/core/job_completer/autograd.cpp b/oneflow/core/job_rewriter/autograd.cpp
similarity index 99%
rename from oneflow/core/job_completer/autograd.cpp
rename to oneflow/core/job_rewriter/autograd.cpp
index 459869a1a..32e6fc017 100644
--- a/oneflow/core/job_completer/autograd.cpp
+++ b/oneflow/core/job_rewriter/autograd.cpp
@@ -13,10 +13,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/autograd.h"
+#include "oneflow/core/job_rewriter/autograd.h"
 #include "oneflow/core/job/job_builder.h"
 #include "oneflow/core/job/foreign_callback.h"
-#include "oneflow/core/job_completer/clone_grad.h"
+#include "oneflow/core/job_rewriter/clone_grad.h"
 #include "oneflow/core/operator/variable_op.h"
 #include "oneflow/core/register/op_blob_arg.pb.h"
 #include "oneflow/core/common/protobuf.h"
diff --git a/oneflow/core/job_completer/autograd.h b/oneflow/core/job_rewriter/autograd.h
similarity index 96%
rename from oneflow/core/job_completer/autograd.h
rename to oneflow/core/job_rewriter/autograd.h
index f0984b254..b67e0c9ad 100644
--- a/oneflow/core/job_completer/autograd.h
+++ b/oneflow/core/job_rewriter/autograd.h
@@ -13,8 +13,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#ifndef ONEFLOW_CORE_JOB_COMPLETER_AUTOGRAD_H_
-#define ONEFLOW_CORE_JOB_COMPLETER_AUTOGRAD_H_
+#ifndef ONEFLOW_CORE_JOB_REWRITER_AUTOGRAD_H_
+#define ONEFLOW_CORE_JOB_REWRITER_AUTOGRAD_H_
 
 #include "oneflow/core/job/job_desc.h"
 #include "oneflow/core/operator/operator.h"
@@ -69,4 +69,4 @@ class GenerateBackwardOpConfWrapperStruct final {
 
 }  // namespace oneflow
 
-#endif  // ONEFLOW_CORE_JOB_COMPLETER_AUTOGRAD_H_
+#endif  // ONEFLOW_CORE_JOB_REWRITER_AUTOGRAD_H_
diff --git a/oneflow/core/job_completer/autotick.cpp b/oneflow/core/job_rewriter/autotick.cpp
similarity index 99%
rename from oneflow/core/job_completer/autotick.cpp
rename to oneflow/core/job_rewriter/autotick.cpp
index b82e8d7c6..13332db45 100644
--- a/oneflow/core/job_completer/autotick.cpp
+++ b/oneflow/core/job_rewriter/autotick.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/autotick.h"
+#include "oneflow/core/job_rewriter/autotick.h"
 #include "oneflow/core/job/job_builder.h"
 #include "oneflow/core/job/critical_section_desc.h"
 #include "oneflow/core/common/protobuf.h"
diff --git a/oneflow/core/job_completer/autotick.h b/oneflow/core/job_rewriter/autotick.h
similarity index 92%
rename from oneflow/core/job_completer/autotick.h
rename to oneflow/core/job_rewriter/autotick.h
index b9ce0dbf5..8dbfc1c51 100644
--- a/oneflow/core/job_completer/autotick.h
+++ b/oneflow/core/job_rewriter/autotick.h
@@ -13,8 +13,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#ifndef ONEFLOW_CORE_JOB_COMPLETER_AUTOTICK_H_
-#define ONEFLOW_CORE_JOB_COMPLETER_AUTOTICK_H_
+#ifndef ONEFLOW_CORE_JOB_REWRITER_AUTOTICK_H_
+#define ONEFLOW_CORE_JOB_REWRITER_AUTOTICK_H_
 
 #include "oneflow/core/job/job_desc.h"
 #include "oneflow/core/operator/operator.h"
@@ -49,4 +49,4 @@ class MutOpConTickInputHelper {
 
 }  // namespace oneflow
 
-#endif  // ONEFLOW_CORE_JOB_COMPLETER_AUTOTICK_H_
+#endif  // ONEFLOW_CORE_JOB_REWRITER_AUTOTICK_H_
diff --git a/oneflow/core/job_completer/broadcast_to_compatible_with_grad.cpp b/oneflow/core/job_rewriter/broadcast_to_compatible_with_grad.cpp
similarity index 97%
rename from oneflow/core/job_completer/broadcast_to_compatible_with_grad.cpp
rename to oneflow/core/job_rewriter/broadcast_to_compatible_with_grad.cpp
index 143452c55..4814e6b58 100644
--- a/oneflow/core/job_completer/broadcast_to_compatible_with_grad.cpp
+++ b/oneflow/core/job_rewriter/broadcast_to_compatible_with_grad.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/autograd.h"
+#include "oneflow/core/job_rewriter/autograd.h"
 #include "oneflow/core/common/shape_view.h"
 #include "oneflow/core/framework/framework.h"
 
diff --git a/oneflow/core/job_completer/clone_grad.cpp b/oneflow/core/job_rewriter/clone_grad.cpp
similarity index 98%
rename from oneflow/core/job_completer/clone_grad.cpp
rename to oneflow/core/job_rewriter/clone_grad.cpp
index fdc51ef55..b14ae2a19 100644
--- a/oneflow/core/job_completer/clone_grad.cpp
+++ b/oneflow/core/job_rewriter/clone_grad.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/clone_grad.h"
+#include "oneflow/core/job_rewriter/clone_grad.h"
 #include "oneflow/core/framework/framework.h"
 
 namespace oneflow {
diff --git a/oneflow/core/job_completer/clone_grad.h b/oneflow/core/job_rewriter/clone_grad.h
similarity index 82%
rename from oneflow/core/job_completer/clone_grad.h
rename to oneflow/core/job_rewriter/clone_grad.h
index ac910f499..a96d9561a 100644
--- a/oneflow/core/job_completer/clone_grad.h
+++ b/oneflow/core/job_rewriter/clone_grad.h
@@ -13,10 +13,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#ifndef ONEFLOW_CORE_JOB_COMPLETER_CLONE_GRAD_H_
-#define ONEFLOW_CORE_JOB_COMPLETER_CLONE_GRAD_H_
+#ifndef ONEFLOW_CORE_JOB_REWRITER_CLONE_GRAD_H_
+#define ONEFLOW_CORE_JOB_REWRITER_CLONE_GRAD_H_
 
-#include "oneflow/core/job_completer/autograd.h"
+#include "oneflow/core/job_rewriter/autograd.h"
 
 namespace oneflow {
 
@@ -26,4 +26,4 @@ void GenerateCloneGradOpIfNeed(const OpNode& op_node, JobBuilder* job_builder,
                                HashMap<OpBlobArg, LogicalBlobId>* out_oba2clone_bw_add_out_lbi);
 }
 
-#endif  // ONEFLOW_CORE_JOB_COMPLETER_CLONE_GRAD_H_
+#endif  // ONEFLOW_CORE_JOB_REWRITER_CLONE_GRAD_H_
diff --git a/oneflow/core/job_completer/complete_ofrecord_decoder.cpp b/oneflow/core/job_rewriter/complete_ofrecord_decoder.cpp
similarity index 99%
rename from oneflow/core/job_completer/complete_ofrecord_decoder.cpp
rename to oneflow/core/job_rewriter/complete_ofrecord_decoder.cpp
index 0258f55cc..ba74f63e1 100644
--- a/oneflow/core/job_completer/complete_ofrecord_decoder.cpp
+++ b/oneflow/core/job_rewriter/complete_ofrecord_decoder.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/op_graph_pass.h"
+#include "oneflow/core/job_rewriter/op_graph_pass.h"
 #include "oneflow/core/job/job_builder.h"
 #include "oneflow/core/operator/operator.h"
 #include "oneflow/core/job/parallel_desc.h"
diff --git a/oneflow/core/job_completer/decode_random_autotick.cpp b/oneflow/core/job_rewriter/decode_random_autotick.cpp
similarity index 96%
rename from oneflow/core/job_completer/decode_random_autotick.cpp
rename to oneflow/core/job_rewriter/decode_random_autotick.cpp
index 95a49bf1a..ec4d94b61 100644
--- a/oneflow/core/job_completer/decode_random_autotick.cpp
+++ b/oneflow/core/job_rewriter/decode_random_autotick.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/autotick.h"
+#include "oneflow/core/job_rewriter/autotick.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job_completer/device_tick_autotick.cpp b/oneflow/core/job_rewriter/device_tick_autotick.cpp
similarity index 96%
rename from oneflow/core/job_completer/device_tick_autotick.cpp
rename to oneflow/core/job_rewriter/device_tick_autotick.cpp
index 511db09a1..fa4ae6734 100644
--- a/oneflow/core/job_completer/device_tick_autotick.cpp
+++ b/oneflow/core/job_rewriter/device_tick_autotick.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/autotick.h"
+#include "oneflow/core/job_rewriter/autotick.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job_completer/distribute_grad.cpp b/oneflow/core/job_rewriter/distribute_grad.cpp
similarity index 99%
rename from oneflow/core/job_completer/distribute_grad.cpp
rename to oneflow/core/job_rewriter/distribute_grad.cpp
index b776a0f16..66e2dffac 100644
--- a/oneflow/core/job_completer/distribute_grad.cpp
+++ b/oneflow/core/job_rewriter/distribute_grad.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/autograd.h"
+#include "oneflow/core/job_rewriter/autograd.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job_completer/do_parallel_cast_before_widening_type_cast_pass.cpp b/oneflow/core/job_rewriter/do_parallel_cast_before_widening_type_cast_pass.cpp
similarity index 98%
rename from oneflow/core/job_completer/do_parallel_cast_before_widening_type_cast_pass.cpp
rename to oneflow/core/job_rewriter/do_parallel_cast_before_widening_type_cast_pass.cpp
index cc77e3b01..ee1e05fd9 100644
--- a/oneflow/core/job_completer/do_parallel_cast_before_widening_type_cast_pass.cpp
+++ b/oneflow/core/job_rewriter/do_parallel_cast_before_widening_type_cast_pass.cpp
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 */
 #include "oneflow/core/framework/user_op_conf.h"
-#include "oneflow/core/job_completer/op_graph_pass.h"
+#include "oneflow/core/job_rewriter/op_graph_pass.h"
 #include "oneflow/core/register/runtime_blob_desc.h"
 
 namespace oneflow {
diff --git a/oneflow/core/job_completer/dump_time_shape_and_blob_parallel_conf_pass.cpp b/oneflow/core/job_rewriter/dump_time_shape_and_blob_parallel_conf_pass.cpp
similarity index 96%
rename from oneflow/core/job_completer/dump_time_shape_and_blob_parallel_conf_pass.cpp
rename to oneflow/core/job_rewriter/dump_time_shape_and_blob_parallel_conf_pass.cpp
index 91ed967f3..1721ac063 100644
--- a/oneflow/core/job_completer/dump_time_shape_and_blob_parallel_conf_pass.cpp
+++ b/oneflow/core/job_rewriter/dump_time_shape_and_blob_parallel_conf_pass.cpp
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 */
 #include "oneflow/core/common/util.h"
-#include "oneflow/core/job_completer/op_graph_pass.h"
+#include "oneflow/core/job_rewriter/op_graph_pass.h"
 #include "oneflow/core/job/job.pb.h"
 
 namespace oneflow {
diff --git a/oneflow/core/job_completer/dump_variable_info_pass.cpp b/oneflow/core/job_rewriter/dump_variable_info_pass.cpp
similarity index 98%
rename from oneflow/core/job_completer/dump_variable_info_pass.cpp
rename to oneflow/core/job_rewriter/dump_variable_info_pass.cpp
index fd79e6c5e..12a2bfe47 100644
--- a/oneflow/core/job_completer/dump_variable_info_pass.cpp
+++ b/oneflow/core/job_rewriter/dump_variable_info_pass.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/op_graph_pass.h"
+#include "oneflow/core/job_rewriter/op_graph_pass.h"
 #include "oneflow/core/job/global_for.h"
 
 namespace oneflow {
diff --git a/oneflow/core/job_completer/dynamic_reshape_grad.cpp b/oneflow/core/job_rewriter/dynamic_reshape_grad.cpp
similarity index 97%
rename from oneflow/core/job_completer/dynamic_reshape_grad.cpp
rename to oneflow/core/job_rewriter/dynamic_reshape_grad.cpp
index f8c691531..f7e1bc5e1 100644
--- a/oneflow/core/job_completer/dynamic_reshape_grad.cpp
+++ b/oneflow/core/job_rewriter/dynamic_reshape_grad.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/autograd.h"
+#include "oneflow/core/job_rewriter/autograd.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job_completer/foreign_input_autotick.cpp b/oneflow/core/job_rewriter/foreign_input_autotick.cpp
similarity index 96%
rename from oneflow/core/job_completer/foreign_input_autotick.cpp
rename to oneflow/core/job_rewriter/foreign_input_autotick.cpp
index d88f7083d..305d88b99 100644
--- a/oneflow/core/job_completer/foreign_input_autotick.cpp
+++ b/oneflow/core/job_rewriter/foreign_input_autotick.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/autotick.h"
+#include "oneflow/core/job_rewriter/autotick.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job_completer/generate_backward_and_optimizer_op_confs.cpp b/oneflow/core/job_rewriter/generate_backward_and_optimizer_op_confs.cpp
similarity index 97%
rename from oneflow/core/job_completer/generate_backward_and_optimizer_op_confs.cpp
rename to oneflow/core/job_rewriter/generate_backward_and_optimizer_op_confs.cpp
index eee2272de..f2f135153 100644
--- a/oneflow/core/job_completer/generate_backward_and_optimizer_op_confs.cpp
+++ b/oneflow/core/job_rewriter/generate_backward_and_optimizer_op_confs.cpp
@@ -13,9 +13,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/op_graph_pass.h"
-#include "oneflow/core/job_completer/autograd.h"
-#include "oneflow/core/job_completer/optimizer.h"
+#include "oneflow/core/job_rewriter/op_graph_pass.h"
+#include "oneflow/core/job_rewriter/autograd.h"
+#include "oneflow/core/job_rewriter/optimizer.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job_completer/group_boxing_by_dst_parallel.cpp b/oneflow/core/job_rewriter/group_boxing_by_dst_parallel.cpp
similarity index 98%
rename from oneflow/core/job_completer/group_boxing_by_dst_parallel.cpp
rename to oneflow/core/job_rewriter/group_boxing_by_dst_parallel.cpp
index 941d16974..e05fe66d1 100644
--- a/oneflow/core/job_completer/group_boxing_by_dst_parallel.cpp
+++ b/oneflow/core/job_rewriter/group_boxing_by_dst_parallel.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/group_boxing_by_dst_parallel.h"
+#include "oneflow/core/job_rewriter/group_boxing_by_dst_parallel.h"
 #include "oneflow/core/job/job_desc.h"
 #include "oneflow/core/common/protobuf.h"
 
diff --git a/oneflow/core/job_completer/group_boxing_by_dst_parallel.h b/oneflow/core/job_rewriter/group_boxing_by_dst_parallel.h
similarity index 79%
rename from oneflow/core/job_completer/group_boxing_by_dst_parallel.h
rename to oneflow/core/job_rewriter/group_boxing_by_dst_parallel.h
index 546c3dfd8..910a891b2 100644
--- a/oneflow/core/job_completer/group_boxing_by_dst_parallel.h
+++ b/oneflow/core/job_rewriter/group_boxing_by_dst_parallel.h
@@ -13,8 +13,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#ifndef ONEFLOW_CORE_JOB_COMPLETER_GROUP_BOXING_BY_DST_PARALLEL_H_
-#define ONEFLOW_CORE_JOB_COMPLETER_GROUP_BOXING_BY_DST_PARALLEL_H_
+#ifndef ONEFLOW_CORE_JOB_REWRITER_GROUP_BOXING_BY_DST_PARALLEL_H_
+#define ONEFLOW_CORE_JOB_REWRITER_GROUP_BOXING_BY_DST_PARALLEL_H_
 
 #include "oneflow/core/graph/op_graph.h"
 
@@ -27,4 +27,4 @@ void GroupBoxingByDstParallel(const OpGraph& op_graph, JobBuilder* job_builder);
 
 }  // namespace oneflow
 
-#endif  // ONEFLOW_CORE_JOB_COMPLETER_GROUP_BOXING_BY_DST_PARALLEL_H_
+#endif  // ONEFLOW_CORE_JOB_REWRITER_GROUP_BOXING_BY_DST_PARALLEL_H_
diff --git a/oneflow/core/job_completer/identity_grad.cpp b/oneflow/core/job_rewriter/identity_grad.cpp
similarity index 98%
rename from oneflow/core/job_completer/identity_grad.cpp
rename to oneflow/core/job_rewriter/identity_grad.cpp
index 0e2d6309b..5ec79464f 100644
--- a/oneflow/core/job_completer/identity_grad.cpp
+++ b/oneflow/core/job_rewriter/identity_grad.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/autograd.h"
+#include "oneflow/core/job_rewriter/autograd.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job_completer/indexed_slices_optimizer_rewrite_pass.cpp b/oneflow/core/job_rewriter/indexed_slices_optimizer_rewrite_pass.cpp
similarity index 99%
rename from oneflow/core/job_completer/indexed_slices_optimizer_rewrite_pass.cpp
rename to oneflow/core/job_rewriter/indexed_slices_optimizer_rewrite_pass.cpp
index b1a083edf..bc3db3fce 100644
--- a/oneflow/core/job_completer/indexed_slices_optimizer_rewrite_pass.cpp
+++ b/oneflow/core/job_rewriter/indexed_slices_optimizer_rewrite_pass.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/op_graph_pass.h"
+#include "oneflow/core/job_rewriter/op_graph_pass.h"
 #include "oneflow/core/framework/framework.h"
 
 namespace oneflow {
diff --git a/oneflow/core/job_completer/input_autotick.cpp b/oneflow/core/job_rewriter/input_autotick.cpp
similarity index 95%
rename from oneflow/core/job_completer/input_autotick.cpp
rename to oneflow/core/job_rewriter/input_autotick.cpp
index b24cce4e5..58d631ef2 100644
--- a/oneflow/core/job_completer/input_autotick.cpp
+++ b/oneflow/core/job_rewriter/input_autotick.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/autotick.h"
+#include "oneflow/core/job_rewriter/autotick.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job_completer/job_completer.cpp b/oneflow/core/job_rewriter/job_completer.cpp
similarity index 91%
rename from oneflow/core/job_completer/job_completer.cpp
rename to oneflow/core/job_rewriter/job_completer.cpp
index e419a1749..02121c517 100644
--- a/oneflow/core/job_completer/job_completer.cpp
+++ b/oneflow/core/job_rewriter/job_completer.cpp
@@ -13,15 +13,15 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/job_completer.h"
-#include "oneflow/core/job_completer/op_graph_pass.h"
-#include "oneflow/core/job_completer/autograd.h"
-#include "oneflow/core/job_completer/autotick.h"
-#include "oneflow/core/job_completer/add_keep_header_only_op_conf.h"
+#include "oneflow/core/job_rewriter/job_completer.h"
+#include "oneflow/core/job_rewriter/op_graph_pass.h"
+#include "oneflow/core/job_rewriter/autograd.h"
+#include "oneflow/core/job_rewriter/autotick.h"
+#include "oneflow/core/job_rewriter/add_keep_header_only_op_conf.h"
 #include "oneflow/core/job/job_desc.h"
-#include "oneflow/core/job_completer/group_boxing_by_dst_parallel.h"
+#include "oneflow/core/job_rewriter/group_boxing_by_dst_parallel.h"
 #include "oneflow/core/framework/config_def.h"
-#include "oneflow/core/job_completer/xrt_compilation.h"
+#include "oneflow/core/job_rewriter/xrt_compilation.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job_completer/job_completer.h b/oneflow/core/job_rewriter/job_completer.h
similarity index 85%
rename from oneflow/core/job_completer/job_completer.h
rename to oneflow/core/job_rewriter/job_completer.h
index 78e452da2..b63952645 100644
--- a/oneflow/core/job_completer/job_completer.h
+++ b/oneflow/core/job_rewriter/job_completer.h
@@ -13,8 +13,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#ifndef ONEFLOW_CORE_JOB_COMPLETER_JOB_COMPLETER_H_
-#define ONEFLOW_CORE_JOB_COMPLETER_JOB_COMPLETER_H_
+#ifndef ONEFLOW_CORE_JOB_REWRITER_JOB_COMPLETER_H_
+#define ONEFLOW_CORE_JOB_REWRITER_JOB_COMPLETER_H_
 
 #include "oneflow/core/common/util.h"
 #include "oneflow/core/job/job_desc.h"
@@ -33,4 +33,4 @@ class JobCompleter final {
 
 }  // namespace oneflow
 
-#endif  // ONEFLOW_CORE_JOB_COMPLETER_JOB_COMPLETER_H_
+#endif  // ONEFLOW_CORE_JOB_REWRITER_JOB_COMPLETER_H_
diff --git a/oneflow/core/job_completer/lars_optm.cpp b/oneflow/core/job_rewriter/lars_optm.cpp
similarity index 97%
rename from oneflow/core/job_completer/lars_optm.cpp
rename to oneflow/core/job_rewriter/lars_optm.cpp
index dcd68a197..c2b55c0e8 100644
--- a/oneflow/core/job_completer/lars_optm.cpp
+++ b/oneflow/core/job_rewriter/lars_optm.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/optimizer.h"
+#include "oneflow/core/job_rewriter/optimizer.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job_completer/lazy_adam_optm.cpp b/oneflow/core/job_rewriter/lazy_adam_optm.cpp
similarity index 98%
rename from oneflow/core/job_completer/lazy_adam_optm.cpp
rename to oneflow/core/job_rewriter/lazy_adam_optm.cpp
index d1754ff43..9c87b70e6 100644
--- a/oneflow/core/job_completer/lazy_adam_optm.cpp
+++ b/oneflow/core/job_rewriter/lazy_adam_optm.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/optimizer.h"
+#include "oneflow/core/job_rewriter/optimizer.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job_completer/momentum_optm.cpp b/oneflow/core/job_rewriter/momentum_optm.cpp
similarity index 98%
rename from oneflow/core/job_completer/momentum_optm.cpp
rename to oneflow/core/job_rewriter/momentum_optm.cpp
index eecaff408..5e1c26c7b 100644
--- a/oneflow/core/job_completer/momentum_optm.cpp
+++ b/oneflow/core/job_rewriter/momentum_optm.cpp
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 */
 #include "oneflow/core/common/str_util.h"
-#include "oneflow/core/job_completer/optimizer.h"
+#include "oneflow/core/job_rewriter/optimizer.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job_completer/naive_optm.cpp b/oneflow/core/job_rewriter/naive_optm.cpp
similarity index 96%
rename from oneflow/core/job_completer/naive_optm.cpp
rename to oneflow/core/job_rewriter/naive_optm.cpp
index abb2d3d75..bfa7b286e 100644
--- a/oneflow/core/job_completer/naive_optm.cpp
+++ b/oneflow/core/job_rewriter/naive_optm.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/optimizer.h"
+#include "oneflow/core/job_rewriter/optimizer.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job_completer/non_distributed_optimizer_pass.cpp b/oneflow/core/job_rewriter/non_distributed_optimizer_pass.cpp
similarity index 99%
rename from oneflow/core/job_completer/non_distributed_optimizer_pass.cpp
rename to oneflow/core/job_rewriter/non_distributed_optimizer_pass.cpp
index 1b331d2dc..c1b7b50f0 100644
--- a/oneflow/core/job_completer/non_distributed_optimizer_pass.cpp
+++ b/oneflow/core/job_rewriter/non_distributed_optimizer_pass.cpp
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 */
 #include "oneflow/core/common/util.h"
-#include "oneflow/core/job_completer/op_graph_pass.h"
+#include "oneflow/core/job_rewriter/op_graph_pass.h"
 #include "oneflow/core/graph/op_graph.h"
 #include "oneflow/core/job/job_desc.h"
 
diff --git a/oneflow/core/job_completer/op_graph_pass.cpp b/oneflow/core/job_rewriter/op_graph_pass.cpp
similarity index 96%
rename from oneflow/core/job_completer/op_graph_pass.cpp
rename to oneflow/core/job_rewriter/op_graph_pass.cpp
index eb996d22f..b159eb3ed 100644
--- a/oneflow/core/job_completer/op_graph_pass.cpp
+++ b/oneflow/core/job_rewriter/op_graph_pass.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/op_graph_pass.h"
+#include "oneflow/core/job_rewriter/op_graph_pass.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job_completer/op_graph_pass.h b/oneflow/core/job_rewriter/op_graph_pass.h
similarity index 91%
rename from oneflow/core/job_completer/op_graph_pass.h
rename to oneflow/core/job_rewriter/op_graph_pass.h
index 50aa1380f..c1b9f2155 100644
--- a/oneflow/core/job_completer/op_graph_pass.h
+++ b/oneflow/core/job_rewriter/op_graph_pass.h
@@ -13,8 +13,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#ifndef ONEFLOW_CORE_JOB_COMPLETER_OP_GRAPH_PASS_H_
-#define ONEFLOW_CORE_JOB_COMPLETER_OP_GRAPH_PASS_H_
+#ifndef ONEFLOW_CORE_JOB_REWRITER_OP_GRAPH_PASS_H_
+#define ONEFLOW_CORE_JOB_REWRITER_OP_GRAPH_PASS_H_
 
 #include "oneflow/core/graph/op_graph.h"
 #include "oneflow/core/job/job_builder.h"
@@ -56,4 +56,4 @@ const OpGraphPass& FunctionPass(const std::string& pass_name);
 
 }  // namespace oneflow
 
-#endif  // ONEFLOW_CORE_JOB_COMPLETER_OP_GRAPH_PASS_H_
+#endif  // ONEFLOW_CORE_JOB_REWRITER_OP_GRAPH_PASS_H_
diff --git a/oneflow/core/job_completer/optimizer.cpp b/oneflow/core/job_rewriter/optimizer.cpp
similarity index 99%
rename from oneflow/core/job_completer/optimizer.cpp
rename to oneflow/core/job_rewriter/optimizer.cpp
index b3c7604aa..66a950c2c 100644
--- a/oneflow/core/job_completer/optimizer.cpp
+++ b/oneflow/core/job_rewriter/optimizer.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/optimizer.h"
+#include "oneflow/core/job_rewriter/optimizer.h"
 #include <re2/re2.h>
 
 namespace oneflow {
diff --git a/oneflow/core/job_completer/optimizer.h b/oneflow/core/job_rewriter/optimizer.h
similarity index 92%
rename from oneflow/core/job_completer/optimizer.h
rename to oneflow/core/job_rewriter/optimizer.h
index f8cd52e28..b4d261e06 100644
--- a/oneflow/core/job_completer/optimizer.h
+++ b/oneflow/core/job_rewriter/optimizer.h
@@ -13,8 +13,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#ifndef ONEFLOW_CORE_JOB_COMPLETER_OPTIMIZER_H_
-#define ONEFLOW_CORE_JOB_COMPLETER_OPTIMIZER_H_
+#ifndef ONEFLOW_CORE_JOB_REWRITER_OPTIMIZER_H_
+#define ONEFLOW_CORE_JOB_REWRITER_OPTIMIZER_H_
 
 #include "oneflow/core/graph/op_graph.h"
 #include "oneflow/core/operator/variable_op.h"
@@ -46,4 +46,4 @@ class GenerateOptimizerOpConfWrapperStruct final {
 
 }  // namespace oneflow
 
-#endif  // ONEFLOW_CORE_JOB_COMPLETER_OPTIMIZER_H_
+#endif  // ONEFLOW_CORE_JOB_REWRITER_OPTIMIZER_H_
diff --git a/oneflow/core/job_completer/parallel_cast_grad.cpp b/oneflow/core/job_rewriter/parallel_cast_grad.cpp
similarity index 97%
rename from oneflow/core/job_completer/parallel_cast_grad.cpp
rename to oneflow/core/job_rewriter/parallel_cast_grad.cpp
index dde64d9e1..f18d0f1fd 100644
--- a/oneflow/core/job_completer/parallel_cast_grad.cpp
+++ b/oneflow/core/job_rewriter/parallel_cast_grad.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/autograd.h"
+#include "oneflow/core/job_rewriter/autograd.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job_completer/prelu_grad.cpp b/oneflow/core/job_rewriter/prelu_grad.cpp
similarity index 98%
rename from oneflow/core/job_completer/prelu_grad.cpp
rename to oneflow/core/job_rewriter/prelu_grad.cpp
index d126df4cc..ee70a8c20 100644
--- a/oneflow/core/job_completer/prelu_grad.cpp
+++ b/oneflow/core/job_rewriter/prelu_grad.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/autograd.h"
+#include "oneflow/core/job_rewriter/autograd.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job_completer/prune_cast_to_static_shape_op_pass.cpp b/oneflow/core/job_rewriter/prune_cast_to_static_shape_op_pass.cpp
similarity index 98%
rename from oneflow/core/job_completer/prune_cast_to_static_shape_op_pass.cpp
rename to oneflow/core/job_rewriter/prune_cast_to_static_shape_op_pass.cpp
index dfd334b6a..903d16d4c 100644
--- a/oneflow/core/job_completer/prune_cast_to_static_shape_op_pass.cpp
+++ b/oneflow/core/job_rewriter/prune_cast_to_static_shape_op_pass.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/op_graph_pass.h"
+#include "oneflow/core/job_rewriter/op_graph_pass.h"
 #include "oneflow/core/register/runtime_blob_desc.h"
 
 namespace oneflow {
diff --git a/oneflow/core/job_completer/prune_parallel_cast_op_pass.cpp b/oneflow/core/job_rewriter/prune_parallel_cast_op_pass.cpp
similarity index 98%
rename from oneflow/core/job_completer/prune_parallel_cast_op_pass.cpp
rename to oneflow/core/job_rewriter/prune_parallel_cast_op_pass.cpp
index 2656520b8..c994c37b0 100644
--- a/oneflow/core/job_completer/prune_parallel_cast_op_pass.cpp
+++ b/oneflow/core/job_rewriter/prune_parallel_cast_op_pass.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/op_graph_pass.h"
+#include "oneflow/core/job_rewriter/op_graph_pass.h"
 #include "oneflow/core/register/runtime_blob_desc.h"
 
 namespace oneflow {
diff --git a/oneflow/core/job_completer/record_load_autotick.cpp b/oneflow/core/job_rewriter/record_load_autotick.cpp
similarity index 96%
rename from oneflow/core/job_completer/record_load_autotick.cpp
rename to oneflow/core/job_rewriter/record_load_autotick.cpp
index 4e4002b93..ee42e7843 100644
--- a/oneflow/core/job_completer/record_load_autotick.cpp
+++ b/oneflow/core/job_rewriter/record_load_autotick.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/autotick.h"
+#include "oneflow/core/job_rewriter/autotick.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job_completer/repeat_grad.cpp b/oneflow/core/job_rewriter/repeat_grad.cpp
similarity index 96%
rename from oneflow/core/job_completer/repeat_grad.cpp
rename to oneflow/core/job_rewriter/repeat_grad.cpp
index 109c97fd5..8c35717a3 100644
--- a/oneflow/core/job_completer/repeat_grad.cpp
+++ b/oneflow/core/job_rewriter/repeat_grad.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/autograd.h"
+#include "oneflow/core/job_rewriter/autograd.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job_completer/rmsprop_optm.cpp b/oneflow/core/job_rewriter/rmsprop_optm.cpp
similarity index 96%
rename from oneflow/core/job_completer/rmsprop_optm.cpp
rename to oneflow/core/job_rewriter/rmsprop_optm.cpp
index 159730383..b15d38a7c 100644
--- a/oneflow/core/job_completer/rmsprop_optm.cpp
+++ b/oneflow/core/job_rewriter/rmsprop_optm.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/optimizer.h"
+#include "oneflow/core/job_rewriter/optimizer.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job_completer/set_default_variable_conf.cpp b/oneflow/core/job_rewriter/set_default_variable_conf.cpp
similarity index 98%
rename from oneflow/core/job_completer/set_default_variable_conf.cpp
rename to oneflow/core/job_rewriter/set_default_variable_conf.cpp
index caa64b3b2..78a9b4c7c 100644
--- a/oneflow/core/job_completer/set_default_variable_conf.cpp
+++ b/oneflow/core/job_rewriter/set_default_variable_conf.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/op_graph_pass.h"
+#include "oneflow/core/job_rewriter/op_graph_pass.h"
 #include "oneflow/core/job/job_builder.h"
 #include "oneflow/core/job/job_set_compile_ctx.h"
 
diff --git a/oneflow/core/job_completer/sigmoid_cross_entropy_grad.cpp b/oneflow/core/job_rewriter/sigmoid_cross_entropy_grad.cpp
similarity index 97%
rename from oneflow/core/job_completer/sigmoid_cross_entropy_grad.cpp
rename to oneflow/core/job_rewriter/sigmoid_cross_entropy_grad.cpp
index 5a402b3b9..ab353056b 100644
--- a/oneflow/core/job_completer/sigmoid_cross_entropy_grad.cpp
+++ b/oneflow/core/job_rewriter/sigmoid_cross_entropy_grad.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/autograd.h"
+#include "oneflow/core/job_rewriter/autograd.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job_completer/source_user_op_auto_tick.cpp b/oneflow/core/job_rewriter/source_user_op_auto_tick.cpp
similarity index 96%
rename from oneflow/core/job_completer/source_user_op_auto_tick.cpp
rename to oneflow/core/job_rewriter/source_user_op_auto_tick.cpp
index b437e28d1..a335c8f48 100644
--- a/oneflow/core/job_completer/source_user_op_auto_tick.cpp
+++ b/oneflow/core/job_rewriter/source_user_op_auto_tick.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/autotick.h"
+#include "oneflow/core/job_rewriter/autotick.h"
 #include "oneflow/core/framework/user_op_registry_manager.h"
 
 namespace oneflow {
diff --git a/oneflow/core/job_completer/tick_autotick.cpp b/oneflow/core/job_rewriter/tick_autotick.cpp
similarity index 95%
rename from oneflow/core/job_completer/tick_autotick.cpp
rename to oneflow/core/job_rewriter/tick_autotick.cpp
index ad27b6273..ac293aa75 100644
--- a/oneflow/core/job_completer/tick_autotick.cpp
+++ b/oneflow/core/job_rewriter/tick_autotick.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/autotick.h"
+#include "oneflow/core/job_rewriter/autotick.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job_completer/tie_up_chain_headers.cpp b/oneflow/core/job_rewriter/tie_up_chain_headers.cpp
similarity index 98%
rename from oneflow/core/job_completer/tie_up_chain_headers.cpp
rename to oneflow/core/job_rewriter/tie_up_chain_headers.cpp
index a03743c8d..b61d06efd 100644
--- a/oneflow/core/job_completer/tie_up_chain_headers.cpp
+++ b/oneflow/core/job_rewriter/tie_up_chain_headers.cpp
@@ -13,9 +13,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/op_graph_pass.h"
+#include "oneflow/core/job_rewriter/op_graph_pass.h"
 #include "oneflow/core/framework/config_def.h"
-#include "oneflow/core/job_completer/autograd.h"
+#include "oneflow/core/job_rewriter/autograd.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job_completer/tuple_identity_grad.cpp b/oneflow/core/job_rewriter/tuple_identity_grad.cpp
similarity index 95%
rename from oneflow/core/job_completer/tuple_identity_grad.cpp
rename to oneflow/core/job_rewriter/tuple_identity_grad.cpp
index 221d3d8f8..3713b0b48 100644
--- a/oneflow/core/job_completer/tuple_identity_grad.cpp
+++ b/oneflow/core/job_rewriter/tuple_identity_grad.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/autograd.h"
+#include "oneflow/core/job_rewriter/autograd.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job_completer/user_grad.cpp b/oneflow/core/job_rewriter/user_grad.cpp
similarity index 97%
rename from oneflow/core/job_completer/user_grad.cpp
rename to oneflow/core/job_rewriter/user_grad.cpp
index d12fd3e6d..ff4721e36 100644
--- a/oneflow/core/job_completer/user_grad.cpp
+++ b/oneflow/core/job_rewriter/user_grad.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/autograd.h"
+#include "oneflow/core/job_rewriter/autograd.h"
 #include "oneflow/core/framework/user_op_registry_manager.h"
 #include "oneflow/core/framework/user_op_conf.h"
 
diff --git a/oneflow/core/job_completer/variable_autotick.cpp b/oneflow/core/job_rewriter/variable_autotick.cpp
similarity index 96%
rename from oneflow/core/job_completer/variable_autotick.cpp
rename to oneflow/core/job_rewriter/variable_autotick.cpp
index 6ab311a28..fadb7769c 100644
--- a/oneflow/core/job_completer/variable_autotick.cpp
+++ b/oneflow/core/job_rewriter/variable_autotick.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/autotick.h"
+#include "oneflow/core/job_rewriter/autotick.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job_completer/variable_grad.cpp b/oneflow/core/job_rewriter/variable_grad.cpp
similarity index 94%
rename from oneflow/core/job_completer/variable_grad.cpp
rename to oneflow/core/job_rewriter/variable_grad.cpp
index 09cc994d8..112aacc21 100644
--- a/oneflow/core/job_completer/variable_grad.cpp
+++ b/oneflow/core/job_rewriter/variable_grad.cpp
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-#include "oneflow/core/job_completer/autograd.h"
+#include "oneflow/core/job_rewriter/autograd.h"
 
 namespace oneflow {
 
diff --git a/oneflow/core/job_completer/xrt_compilation.h b/oneflow/core/job_rewriter/xrt_compilation.h
similarity index 100%
rename from oneflow/core/job_completer/xrt_compilation.h
rename to oneflow/core/job_rewriter/xrt_compilation.h
-- 
GitLab