• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1file(GLOB_RECURSE _FL_SRC_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cc")
2
3if(NOT ENABLE_CPU OR WIN32)
4    list(REMOVE_ITEM _FL_SRC_FILES "server/kernel/apply_momentum_kernel.cc")
5    list(REMOVE_ITEM _FL_SRC_FILES "server/kernel/aggregation_kernel_factory.cc")
6    list(REMOVE_ITEM _FL_SRC_FILES "server/kernel/dense_grad_accum_kernel.cc")
7    list(REMOVE_ITEM _FL_SRC_FILES "server/kernel/fed_avg_kernel.cc")
8    list(REMOVE_ITEM _FL_SRC_FILES "server/kernel/sgd_kernel.cc")
9    list(REMOVE_ITEM _FL_SRC_FILES "server/kernel/optimizer_kernel_factory.cc")
10    list(REMOVE_ITEM _FL_SRC_FILES "server/kernel/round/round_kernel_factory.cc")
11    list(REMOVE_ITEM _FL_SRC_FILES "server/kernel/round/round_kernel.cc")
12    list(REMOVE_ITEM _FL_SRC_FILES "server/kernel/round/start_fl_job_kernel.cc")
13    list(REMOVE_ITEM _FL_SRC_FILES "server/kernel/round/update_model_kernel.cc")
14    list(REMOVE_ITEM _FL_SRC_FILES "server/kernel/round/get_model_kernel.cc")
15    list(REMOVE_ITEM _FL_SRC_FILES "server/kernel/round/pull_weight_kernel.cc")
16    list(REMOVE_ITEM _FL_SRC_FILES "server/kernel/round/push_weight_kernel.cc")
17    list(REMOVE_ITEM _FL_SRC_FILES "server/kernel/round/client_list_kernel.cc")
18    list(REMOVE_ITEM _FL_SRC_FILES "server/kernel/round/exchange_keys_kernel.cc")
19    list(REMOVE_ITEM _FL_SRC_FILES "server/kernel/round/get_keys_kernel.cc")
20    list(REMOVE_ITEM _FL_SRC_FILES "server/kernel/round/get_secrets_kernel.cc")
21    list(REMOVE_ITEM _FL_SRC_FILES "server/kernel/round/reconstruct_secrets_kernel.cc")
22    list(REMOVE_ITEM _FL_SRC_FILES "server/kernel/round/share_secrets_kernel.cc")
23    list(REMOVE_ITEM _FL_SRC_FILES "server/kernel/round/push_metrics_kernel.cc")
24    list(REMOVE_ITEM _FL_SRC_FILES "server/kernel/params_info.cc")
25    list(REMOVE_ITEM _FL_SRC_FILES "server/consistent_hash_ring.cc")
26    list(REMOVE_ITEM _FL_SRC_FILES "server/iteration_timer.cc")
27    list(REMOVE_ITEM _FL_SRC_FILES "server/local_meta_store.cc")
28    list(REMOVE_ITEM _FL_SRC_FILES "server/memory_register.cc")
29    list(REMOVE_ITEM _FL_SRC_FILES "server/parameter_aggregator.cc")
30    list(REMOVE_ITEM _FL_SRC_FILES "server/executor.cc")
31    list(REMOVE_ITEM _FL_SRC_FILES "server/collective_ops_impl.cc")
32    list(REMOVE_ITEM _FL_SRC_FILES "server/distributed_count_service.cc")
33    list(REMOVE_ITEM _FL_SRC_FILES "server/distributed_metadata_store.cc")
34    list(REMOVE_ITEM _FL_SRC_FILES "server/iteration.cc")
35    list(REMOVE_ITEM _FL_SRC_FILES "server/model_store.cc")
36    list(REMOVE_ITEM _FL_SRC_FILES "server/round.cc")
37    list(REMOVE_ITEM _FL_SRC_FILES "server/server.cc")
38    list(REMOVE_ITEM _FL_SRC_FILES "server/iteration_metrics.cc")
39    list(REMOVE_ITEM _FL_SRC_FILES "worker/fl_worker.cc")
40    list(REMOVE_ITEM _FL_SRC_FILES "armour/secure_protocol/encrypt.cc")
41    list(REMOVE_ITEM _FL_SRC_FILES "armour/secure_protocol/key_agreement.cc")
42    list(REMOVE_ITEM _FL_SRC_FILES "armour/secure_protocol/masking.cc")
43    list(REMOVE_ITEM _FL_SRC_FILES "armour/secure_protocol/secret_sharing.cc")
44    list(REMOVE_ITEM _FL_SRC_FILES "armour/cipher/cipher_init.cc")
45    list(REMOVE_ITEM _FL_SRC_FILES "armour/cipher/cipher_keys.cc")
46    list(REMOVE_ITEM _FL_SRC_FILES "armour/cipher/cipher_meta_storage.cc")
47    list(REMOVE_ITEM _FL_SRC_FILES "armour/cipher/cipher_reconstruct.cc")
48    list(REMOVE_ITEM _FL_SRC_FILES "armour/cipher/cipher_shares.cc")
49    list(REMOVE_ITEM _FL_SRC_FILES "armour/cipher/cipher_unmask.cc")
50endif()
51
52list(LENGTH _FL_SRC_FILES fl_file_num)
53if(NOT fl_file_num EQUAL 0)
54    set_property(SOURCE ${_FL_SRC_FILES} PROPERTY COMPILE_DEFINITIONS SUBMODULE_ID=mindspore::SubModuleId::SM_FL)
55    add_library(_mindspore_fl_obj OBJECT ${_FL_SRC_FILES})
56    target_link_libraries(_mindspore_fl_obj mindspore::flatbuffers)
57endif()
58