diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index bbbbac9578..02f2993912 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -303,7 +303,7 @@ endif() if(NOT DEEPMD_C_ROOT) if(ENABLE_TENSORFLOW) - add_subdirectory(op/) + add_subdirectory(op/tf/) endif() if(ENABLE_PYTORCH) add_subdirectory(op/pt/) diff --git a/source/api_cc/CMakeLists.txt b/source/api_cc/CMakeLists.txt index 9c9b7ab3d7..10a1dafca2 100644 --- a/source/api_cc/CMakeLists.txt +++ b/source/api_cc/CMakeLists.txt @@ -36,7 +36,7 @@ set_target_properties( ${libname} PROPERTIES INSTALL_RPATH "$ORIGIN;${TensorFlow_LIBRARY_PATH}" INSTALL_RPATH_USE_LINK_PATH TRUE - BUILD_RPATH "$ORIGIN/../op;$ORIGIN/../op/pt") + BUILD_RPATH "$ORIGIN/../op/tf;$ORIGIN/../op/pt") target_compile_definitions(${libname} PRIVATE TF_PRIVATE) if(CMAKE_TESTING_ENABLED) target_link_libraries(${libname} PRIVATE coverage_config) diff --git a/source/op/CMakeLists.txt b/source/op/tf/CMakeLists.txt similarity index 100% rename from source/op/CMakeLists.txt rename to source/op/tf/CMakeLists.txt diff --git a/source/op/add_flt_nvnmd.cc b/source/op/tf/add_flt_nvnmd.cc similarity index 100% rename from source/op/add_flt_nvnmd.cc rename to source/op/tf/add_flt_nvnmd.cc diff --git a/source/op/copy_flt_nvnmd.cc b/source/op/tf/copy_flt_nvnmd.cc similarity index 100% rename from source/op/copy_flt_nvnmd.cc rename to source/op/tf/copy_flt_nvnmd.cc diff --git a/source/op/custom_op.cc b/source/op/tf/custom_op.cc similarity index 100% rename from source/op/custom_op.cc rename to source/op/tf/custom_op.cc diff --git a/source/op/custom_op.h b/source/op/tf/custom_op.h similarity index 100% rename from source/op/custom_op.h rename to source/op/tf/custom_op.h diff --git a/source/op/descrpt.cc b/source/op/tf/descrpt.cc similarity index 100% rename from source/op/descrpt.cc rename to source/op/tf/descrpt.cc diff --git a/source/op/descrpt_se_a_ef.cc b/source/op/tf/descrpt_se_a_ef.cc similarity index 100% rename from source/op/descrpt_se_a_ef.cc rename to source/op/tf/descrpt_se_a_ef.cc diff --git a/source/op/descrpt_se_a_ef_para.cc b/source/op/tf/descrpt_se_a_ef_para.cc similarity index 100% rename from source/op/descrpt_se_a_ef_para.cc rename to source/op/tf/descrpt_se_a_ef_para.cc diff --git a/source/op/descrpt_se_a_ef_vert.cc b/source/op/tf/descrpt_se_a_ef_vert.cc similarity index 100% rename from source/op/descrpt_se_a_ef_vert.cc rename to source/op/tf/descrpt_se_a_ef_vert.cc diff --git a/source/op/descrpt_se_a_mask.cc b/source/op/tf/descrpt_se_a_mask.cc similarity index 100% rename from source/op/descrpt_se_a_mask.cc rename to source/op/tf/descrpt_se_a_mask.cc diff --git a/source/op/dotmul_flt_nvnmd.cc b/source/op/tf/dotmul_flt_nvnmd.cc similarity index 100% rename from source/op/dotmul_flt_nvnmd.cc rename to source/op/tf/dotmul_flt_nvnmd.cc diff --git a/source/op/ewald_recp.cc b/source/op/tf/ewald_recp.cc similarity index 100% rename from source/op/ewald_recp.cc rename to source/op/tf/ewald_recp.cc diff --git a/source/op/flt_nvnmd.cc b/source/op/tf/flt_nvnmd.cc similarity index 100% rename from source/op/flt_nvnmd.cc rename to source/op/tf/flt_nvnmd.cc diff --git a/source/op/gelu_multi_device.cc b/source/op/tf/gelu_multi_device.cc similarity index 100% rename from source/op/gelu_multi_device.cc rename to source/op/tf/gelu_multi_device.cc diff --git a/source/op/map_aparam.cc b/source/op/tf/map_aparam.cc similarity index 100% rename from source/op/map_aparam.cc rename to source/op/tf/map_aparam.cc diff --git a/source/op/map_flt_nvnmd.cc b/source/op/tf/map_flt_nvnmd.cc similarity index 100% rename from source/op/map_flt_nvnmd.cc rename to source/op/tf/map_flt_nvnmd.cc diff --git a/source/op/matmul_fitnet_nvnmd.cc b/source/op/tf/matmul_fitnet_nvnmd.cc similarity index 100% rename from source/op/matmul_fitnet_nvnmd.cc rename to source/op/tf/matmul_fitnet_nvnmd.cc diff --git a/source/op/matmul_flt2fix_nvnmd.cc b/source/op/tf/matmul_flt2fix_nvnmd.cc similarity index 100% rename from source/op/matmul_flt2fix_nvnmd.cc rename to source/op/tf/matmul_flt2fix_nvnmd.cc diff --git a/source/op/matmul_flt_nvnmd.cc b/source/op/tf/matmul_flt_nvnmd.cc similarity index 100% rename from source/op/matmul_flt_nvnmd.cc rename to source/op/tf/matmul_flt_nvnmd.cc diff --git a/source/op/mul_flt_nvnmd.cc b/source/op/tf/mul_flt_nvnmd.cc similarity index 100% rename from source/op/mul_flt_nvnmd.cc rename to source/op/tf/mul_flt_nvnmd.cc diff --git a/source/op/neighbor_stat.cc b/source/op/tf/neighbor_stat.cc similarity index 100% rename from source/op/neighbor_stat.cc rename to source/op/tf/neighbor_stat.cc diff --git a/source/op/optimizer/parallel.cc b/source/op/tf/optimizer/parallel.cc similarity index 100% rename from source/op/optimizer/parallel.cc rename to source/op/tf/optimizer/parallel.cc diff --git a/source/op/optimizer/parallel.h b/source/op/tf/optimizer/parallel.h similarity index 100% rename from source/op/optimizer/parallel.h rename to source/op/tf/optimizer/parallel.h diff --git a/source/op/pair_tab.cc b/source/op/tf/pair_tab.cc similarity index 100% rename from source/op/pair_tab.cc rename to source/op/tf/pair_tab.cc diff --git a/source/op/pairwise.cc b/source/op/tf/pairwise.cc similarity index 100% rename from source/op/pairwise.cc rename to source/op/tf/pairwise.cc diff --git a/source/op/prod_env_mat_multi_device.cc b/source/op/tf/prod_env_mat_multi_device.cc similarity index 100% rename from source/op/prod_env_mat_multi_device.cc rename to source/op/tf/prod_env_mat_multi_device.cc diff --git a/source/op/prod_env_mat_multi_device_nvnmd.cc b/source/op/tf/prod_env_mat_multi_device_nvnmd.cc similarity index 100% rename from source/op/prod_env_mat_multi_device_nvnmd.cc rename to source/op/tf/prod_env_mat_multi_device_nvnmd.cc diff --git a/source/op/prod_force.cc b/source/op/tf/prod_force.cc similarity index 100% rename from source/op/prod_force.cc rename to source/op/tf/prod_force.cc diff --git a/source/op/prod_force_grad.cc b/source/op/tf/prod_force_grad.cc similarity index 100% rename from source/op/prod_force_grad.cc rename to source/op/tf/prod_force_grad.cc diff --git a/source/op/prod_force_grad_multi_device.cc b/source/op/tf/prod_force_grad_multi_device.cc similarity index 100% rename from source/op/prod_force_grad_multi_device.cc rename to source/op/tf/prod_force_grad_multi_device.cc diff --git a/source/op/prod_force_multi_device.cc b/source/op/tf/prod_force_multi_device.cc similarity index 100% rename from source/op/prod_force_multi_device.cc rename to source/op/tf/prod_force_multi_device.cc diff --git a/source/op/prod_force_se_a_grad.cc b/source/op/tf/prod_force_se_a_grad.cc similarity index 100% rename from source/op/prod_force_se_a_grad.cc rename to source/op/tf/prod_force_se_a_grad.cc diff --git a/source/op/prod_force_se_a_mask.cc b/source/op/tf/prod_force_se_a_mask.cc similarity index 100% rename from source/op/prod_force_se_a_mask.cc rename to source/op/tf/prod_force_se_a_mask.cc diff --git a/source/op/prod_force_se_a_mask_grad.cc b/source/op/tf/prod_force_se_a_mask_grad.cc similarity index 100% rename from source/op/prod_force_se_a_mask_grad.cc rename to source/op/tf/prod_force_se_a_mask_grad.cc diff --git a/source/op/prod_force_se_r_grad.cc b/source/op/tf/prod_force_se_r_grad.cc similarity index 100% rename from source/op/prod_force_se_r_grad.cc rename to source/op/tf/prod_force_se_r_grad.cc diff --git a/source/op/prod_virial.cc b/source/op/tf/prod_virial.cc similarity index 100% rename from source/op/prod_virial.cc rename to source/op/tf/prod_virial.cc diff --git a/source/op/prod_virial_grad.cc b/source/op/tf/prod_virial_grad.cc similarity index 100% rename from source/op/prod_virial_grad.cc rename to source/op/tf/prod_virial_grad.cc diff --git a/source/op/prod_virial_grad_multi_device.cc b/source/op/tf/prod_virial_grad_multi_device.cc similarity index 100% rename from source/op/prod_virial_grad_multi_device.cc rename to source/op/tf/prod_virial_grad_multi_device.cc diff --git a/source/op/prod_virial_multi_device.cc b/source/op/tf/prod_virial_multi_device.cc similarity index 100% rename from source/op/prod_virial_multi_device.cc rename to source/op/tf/prod_virial_multi_device.cc diff --git a/source/op/prod_virial_se_a_grad.cc b/source/op/tf/prod_virial_se_a_grad.cc similarity index 100% rename from source/op/prod_virial_se_a_grad.cc rename to source/op/tf/prod_virial_se_a_grad.cc diff --git a/source/op/prod_virial_se_r_grad.cc b/source/op/tf/prod_virial_se_r_grad.cc similarity index 100% rename from source/op/prod_virial_se_r_grad.cc rename to source/op/tf/prod_virial_se_r_grad.cc diff --git a/source/op/quantize_nvnmd.cc b/source/op/tf/quantize_nvnmd.cc similarity index 100% rename from source/op/quantize_nvnmd.cc rename to source/op/tf/quantize_nvnmd.cc diff --git a/source/op/readme b/source/op/tf/readme similarity index 100% rename from source/op/readme rename to source/op/tf/readme diff --git a/source/op/soft_min.cc b/source/op/tf/soft_min.cc similarity index 100% rename from source/op/soft_min.cc rename to source/op/tf/soft_min.cc diff --git a/source/op/soft_min_force.cc b/source/op/tf/soft_min_force.cc similarity index 100% rename from source/op/soft_min_force.cc rename to source/op/tf/soft_min_force.cc diff --git a/source/op/soft_min_force_grad.cc b/source/op/tf/soft_min_force_grad.cc similarity index 100% rename from source/op/soft_min_force_grad.cc rename to source/op/tf/soft_min_force_grad.cc diff --git a/source/op/soft_min_virial.cc b/source/op/tf/soft_min_virial.cc similarity index 100% rename from source/op/soft_min_virial.cc rename to source/op/tf/soft_min_virial.cc diff --git a/source/op/soft_min_virial_grad.cc b/source/op/tf/soft_min_virial_grad.cc similarity index 100% rename from source/op/soft_min_virial_grad.cc rename to source/op/tf/soft_min_virial_grad.cc diff --git a/source/op/tabulate_multi_device.cc b/source/op/tf/tabulate_multi_device.cc similarity index 100% rename from source/op/tabulate_multi_device.cc rename to source/op/tf/tabulate_multi_device.cc diff --git a/source/op/tanh4_flt_nvnmd.cc b/source/op/tf/tanh4_flt_nvnmd.cc similarity index 100% rename from source/op/tanh4_flt_nvnmd.cc rename to source/op/tf/tanh4_flt_nvnmd.cc diff --git a/source/op/unaggregated_grad.cc b/source/op/tf/unaggregated_grad.cc similarity index 100% rename from source/op/unaggregated_grad.cc rename to source/op/tf/unaggregated_grad.cc