Motivation

Adapt DiT to Ascend NPU

Modification

Adapt DiT to Ascend NPU

Self-test (Optional)

If modifications to this PR may cause/fix function/accuracy/performance DTSs/issues, a self-inspection record needs to be attached.

BC-breaking (Optional)

If there are compatibility issues, such as dependencies on cann/torch_npu versions, they need to be explained in the PR.

Checklist

Before PR:

  • The new code needs to comply with the Clean Code specification.
  • The PR content is self-checked, and the expression can be clear and the writing standardized

After PR:

  • CLA has been signed and all committers have signed the CLA in this PR.
  • The ci-pipeline is passed, Code Check is passed.