Function DP_DeepSpinComputeCanonicalGraphGPU

Function DP_DeepSpinComputeCanonicalGraphGPU#

Function Documentation#

void DP_DeepSpinComputeCanonicalGraphGPU(DP_DeepSpin *dp, double *d_atom_energy, double *d_force, double *d_force_mag, double *d_atom_virial, const int64_t *d_atype, const uint32_t *d_source, const float *d_edge_vec, const int64_t *d_destination_row_ptr, const int64_t *d_source_row_ptr, const uint32_t *d_source_order, const float *d_spin, int nloc, int nall_nodes, int64_t edge_storage)#

Evaluate a compact canonical graph on the model device with a DP spin model.

Since

API version 30

Parameters:
  • dp[in] The DP spin model to use.

  • d_atom_energy[out] Per-local-atom energy, shape (nloc).

  • d_force[out] Per-node force, shape (nall_nodes, 3).

  • d_force_mag[out] Per-node magnetic force, shape (nall_nodes, 3).

  • d_atom_virial[out] Per-node virial, shape (nall_nodes, 9).

  • d_atype[in] Per-node atom types, shape (nall_nodes).

  • d_source[in] Source node per edge storage slot.

  • d_edge_vec[in] FP32 edge vectors, shape (edge_storage, 3).

  • d_destination_row_ptr[in] Destination CSR offsets.

  • d_source_row_ptr[in] Source CSR offsets.

  • d_source_order[in] Source-grouped edge storage positions.

  • d_spin[in] FP32 per-node magnetic moment, shape (nall_nodes, 3); halo rows carry their owner’s moment.

  • nloc[in] Number of owned local nodes.

  • nall_nodes[in] Total local-plus-halo node count.

  • edge_storage[in] Number of edge storage slots.