Repository: pytorch
Issue: Port CPU_tensor_apply functions to TensorIterator (umbrella issue)
Labels: triaged,better-engineering,module: CPU_tensor_apply

- [x] Implement `cpu_serial_kernel` and `cpu_serial_kernel_vec` for TensorIterator #24472
- [ ] #24479 Migrate CPU_tensor_apply to TensorIterator in aten/src/ATen/native/Normalization.cpp:173
    https://github.com/pytorch/pytorch/blob/eabfca3577ea85df2d68bdf747c62dd4a5fff5cf/aten/src/ATen/native/Normalization.cpp#L173
- [ ] #24480 Migrate CPU_tensor_apply to TensorIterator in aten/src/ATen/native/Normalization.cpp:205
    https://github.com/pytorch/pytorch/blob/eabfca3577ea85df2d68bdf747c62dd4a5fff5cf/aten/src/ATen/native/Normalization.cpp#L205
- [ ] #24481 Migrate CPU_tensor_apply to TensorIterator in aten/src/ATen/native/Normalization.cpp:213
    https://github.com/pytorch/pytorch/blob/eabfca3577ea85df2d68bdf747c62dd4a5fff5cf/aten/src/ATen/native/Normalization.cpp#L213
- [ ] #24482 Migrate CPU_tensor_apply to TensorIterator in aten/src/ATen/native/Normalization.cpp:284
    https://github.com/pytorch/pytorch/blob/eabfca3577ea85df2d68bdf747c62dd4a5fff5cf/aten/src/ATen/native/Normalization.cpp#L284
- [ ] #24483 Migrate CPU_tensor_apply to TensorIterator in aten/src/ATen/native/Normalization.cpp:290
    https://github.com/pytorch/pytorch/blob/eabfca3577ea85df2d68bdf747c62dd4a5fff5cf/aten/src/ATen/native/Normalization.cpp#L290
- [ ] #24484 Migrate CPU_tensor_apply to TensorIterator in aten/src/ATen/native/Normalization.cpp:305
    https://github.com/pytorch/pytorch/blob/eabfca3577ea85df2d68bdf747c62dd4a5fff5cf/aten/src/ATen/native/Normalization.cpp#L305
- [ ] #24485 Migrate CPU_tensor_apply to TensorIterator in aten/src/ATen/native/Normalization.cpp:310
    https://github.com/pytorch/pytorch/blob/eabfca3577ea85df2d68bdf747c62dd4a5fff5cf/aten/src/ATen/native/Normalization.cpp#L310
- [ ] #24486 Migrate CPU_tensor_apply to TensorIterator in aten/src/ATen/native/Normalization.cpp:318
    https://github.com/pytorch/pytorch/blob/eabfca3577ea85df2d68bdf747c62dd4a5fff5cf/aten/src/ATen/native/Normalization.cpp#L318
- [ ] #24487 Migrate CPU_tensor_apply to TensorIterator in aten/src/ATen/native/Loss.cpp:80
    https://github.com/pytorch/pytorch/blob/eabfca3577ea85df2d68bdf747c62dd4a5fff5cf/aten/src/ATen/native/Loss.cpp#L80
- [ ] #24488 Migrate CPU_tensor_apply to TensorIterator in aten/src/ATen/native/Distributions.cpp:142
    https://github.com/pytorch/pytorch/blob/eabfca3577ea85df2d68bdf747c62dd4a5fff5cf/aten/src/ATen/native/Distributions.cpp#L142
- [ ] #24489 Migrate CPU_tensor_apply to TensorIterator in aten/src/ATen/native/Distributions.cpp:151
    https://github.com/pytorch/pytorch/blob/eabfca3577ea85df2d68bdf747c62dd4a5fff5cf/aten/src/ATen/native/Distributions.cpp#L151
- [ ] #24490 Migrate CPU_tensor_apply to TensorIterator in aten/src/ATen/native/Distributions.cpp:176
    https://github.com/pytorch/pytorch/blob/eabfca3577ea85df2d68bdf747c62dd4a5fff5cf/aten/src/ATen/native/Distributions.cpp#L176
- [ ] #24491 Migrate CPU_tensor_apply to TensorIterator in aten/src/ATen/native/Distributions.cpp:189
    https://github.com/pytorch/pytorch/blob/eabfca3577ea85df2d68bdf747c62dd4a5fff5cf/aten/src/ATen/native/Distributions.cpp#L189
- [ ] #24492 Migrate CPU_tensor_apply to TensorIterator in aten/src/ATen/native/Distributions.cpp:201
    https://github.com/pytorch/pytorch/blob/eabfca3577ea85df2d68bdf747c62dd4a5fff5cf/aten/src/ATen/native/Distributions.cpp#L201
- [ ] #24493 Migrate CPU_tensor_apply to TensorIterator in aten/src/ATen/native/Distributions.cpp:220
    https://github.com/pytorch/pytorch/blob/eabfca3577ea85df2d68bdf747c62dd4a5fff5cf/aten/src/ATen/native/Distributions.cpp#L220
- [ ] #24494 Migrate CPU_tensor_apply to TensorIterator in aten/src/ATen/native/Distributions.cpp:235
    https://github.com/pytorch/pytorch/blob/eabfca3577ea85df2d68bdf747c62dd4a5fff5cf/aten/src/ATen/native/Distributions.cpp#L235
- [ ] #24495 Migrate CPU_tensor_apply to TensorIterator in aten/src/ATen/native/Distributions.cpp:266
    https://github.com/pytorch/pytorch/blob/eabfca3577ea85df2d68bdf747c62dd4a5fff5cf/aten/src/ATen/native/Distributions.cpp#L266
- [ ] #24496 Migrate CPU_tensor_apply to TensorIterator in aten/src/ATen/native/Distributions.cpp:286
    https://github.com/pytorch/pytorch/blob/eabfca3577ea85df2d68bdf747c62dd4a5fff5cf/aten/src/ATen/native/Distributions.cpp#L286
- [x] #24497 Migrate CPU_tensor_apply to TensorIterator in aten/src/ATen/native/TensorCompare.cpp:18
    https://github.com/pytorch/pytorch/blob/eabfca3577ea85df2d68bdf747c62dd4a5fff5cf/aten/src/ATen/native/TensorCompare.cpp#L18
- [ ] #24498 Migrate CPU_tensor_apply to TensorIterator in aten/src/ATen/native/TensorCompare.cpp:30
    https://github.com/pytorch/pytorch/blob/eabfca3577ea85df2d68bdf747c62dd4a5fff5cf/aten/src/ATen/native/TensorCompare.cpp#L30

- [ ] Remove `aten/src/ATen/CPUApplyUtils.h`, `torch/include/ATen/CPUApplyUtils.h` and `aten/src/ATen/test/apply_utils_test.cpp`