Skip to content

Conversation

@Cstandardlib
Copy link
Collaborator

@Cstandardlib Cstandardlib commented Jan 2, 2025

Check whether it works well without post-diag TensorMap now that cg itself uses wrapped psi as Tensor input.

auto psi_tensor = ct::TensorMap(psi.get_pointer(),
                                        ct::DataTypeToEnum<T>::value,
                                        ct::DeviceTypeToEnum<ct_Device>::value,
                                        ct::TensorShape({psi.get_nbands(), psi.get_nbasis()}));
cg.diag(hpsi_func, spsi_func, psi_tensor, eigen_tensor, this->ethr_band, prec_tensor);
ct::TensorMap(psi.get_pointer(), psi_tensor, {psi.get_nbands(), psi.get_nbasis()}).sync(psi_tensor);

@mohanchen mohanchen added the Diago Issues related to diagonalizaiton methods label Jan 3, 2025
@Cstandardlib Cstandardlib changed the title Test PR: Remove TensorMap after cg call Remove TensorMap after cg call Jan 3, 2025
@Cstandardlib Cstandardlib changed the title Remove TensorMap after cg call Remove TensorMap after cg call in HSolverPW Jan 3, 2025
@Cstandardlib
Copy link
Collaborator Author

Seems that it works well without post-diag TensorMap now that cg itself uses wrapped psi as Tensor input, so it is OK to remove this TensorMap operation.

@Cstandardlib
Copy link
Collaborator Author

Tests will be made on DCU to check TensorMap issues.

@Cstandardlib
Copy link
Collaborator Author

Cstandardlib commented Jan 3, 2025

This PR will be closed to verify that cg works well on DCU and reopened then.

@Cstandardlib Cstandardlib reopened this Jan 8, 2025
@Cstandardlib Cstandardlib marked this pull request as ready for review January 8, 2025 14:59
@mohanchen mohanchen merged commit a2ec5d1 into deepmodeling:develop Jan 9, 2025
14 checks passed
Fisherd99 pushed a commit to Fisherd99/abacus-BSE that referenced this pull request Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Diago Issues related to diagonalizaiton methods

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants