@@ -1832,9 +1832,10 @@ void DeepPotPTExpt::compute_edges_gpu(double* d_atom_energy,
18321832 " stored in the .pt2 metadata." );
18331833 }
18341834 fparam_tensor =
1835- torch::from_blob (const_cast <double *>(default_fparam_.data ()),
1836- {1 , static_cast <std::int64_t >(default_fparam_.size ())},
1837- torch::TensorOptions ().dtype (torch::kFloat64 ))
1835+ torch::from_blob (
1836+ const_cast <double *>(default_fparam_.data ()),
1837+ {1 , static_cast <std::int64_t >(default_fparam_.size ())},
1838+ torch::TensorOptions ().dtype (torch::kFloat64 ))
18381839 .clone ()
18391840 .to (device);
18401841 } else {
@@ -1862,10 +1863,9 @@ void DeepPotPTExpt::compute_edges_gpu(double* d_atom_energy,
18621863 }
18631864
18641865 // === Step 4. Run the exported model on the device ===
1865- std::vector<torch::Tensor> flat_outputs =
1866- run_model_edges (coord_t , atype_t , edge_index, edge_vec,
1867- edge_scatter_index, edge_mask, fparam_tensor,
1868- aparam_tensor, charge_spin_tensor);
1866+ std::vector<torch::Tensor> flat_outputs = run_model_edges (
1867+ coord_t , atype_t , edge_index, edge_vec, edge_scatter_index, edge_mask,
1868+ fparam_tensor, aparam_tensor, charge_spin_tensor);
18691869 std::map<std::string, torch::Tensor> output_map;
18701870 extract_outputs (output_map, flat_outputs);
18711871
0 commit comments