Fix: Allow trainer to accept CUDAAccelerator instance as accelerator with FSDP strategy (#20964)
* Add test for FSDP with CUDAAccelerator instance
* update error message
* update the test
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>