Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pt): keep mapping not none during lmp steps when nghost == 0 #4209

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions source/api_cc/include/DeepPotPT.h
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ class DeepPotPT : public DeepPotBase {
int do_message_passing; // 1:dpa2 model 0:others
bool gpu_enabled;
at::Tensor firstneigh_tensor;
c10::optional<torch::Tensor> mapping_tensor;
torch::Dict<std::string, torch::Tensor> comm_dict;
/**
* @brief Translate PyTorch exceptions to the DeePMD-kit exception.
Expand Down
1 change: 0 additions & 1 deletion source/api_cc/src/DeepPotPT.cc
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ void DeepPotPT::compute(ENERGYVTYPE& ener,
std::vector<std::int64_t> atype_64(datype.begin(), datype.end());
at::Tensor atype_Tensor =
torch::from_blob(atype_64.data(), {1, nall_real}, int_option).to(device);
c10::optional<torch::Tensor> mapping_tensor;
if (ago == 0) {
nlist_data.copy_from_nlist(lmp_list);
nlist_data.shuffle_exclude_empty(fwd_map);
Expand Down