Skip to content

Commit

Permalink
add tests, although not passed
Browse files Browse the repository at this point in the history
Signed-off-by: Jinzhe Zeng <[email protected]>
  • Loading branch information
njzjz committed Feb 3, 2024
1 parent 22d1a7e commit a68742d
Show file tree
Hide file tree
Showing 4 changed files with 634 additions and 3 deletions.
8 changes: 6 additions & 2 deletions source/api_cc/src/DeepPotPT.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@ void DeepPotPT::init(const std::string& model,
get_env_nthreads(num_intra_nthreads,
num_inter_nthreads); // need to be fixed as
// DP_INTRA_OP_PARALLELISM_THREADS
at::set_num_interop_threads(num_inter_nthreads);
at::set_num_threads(num_intra_nthreads);
if (num_inter_nthreads) {
at::set_num_interop_threads(num_inter_nthreads);
}
if (num_intra_nthreads) {
at::set_num_threads(num_intra_nthreads);
}

auto rcut_ = module.run_method("get_rcut").toDouble();
rcut = static_cast<double>(rcut_);
Expand Down
Loading

0 comments on commit a68742d

Please sign in to comment.