SIGN IN SIGN UP

Aten _To_Copy (#6055)

Summary:
Pull Request resolved: https://github.com/pytorch/executorch/pull/6055

Implement aten._to_copy. Currently we are only interested in fp32 <-> fp16 conversions, but it should theoritically support other dtype conversions too. I noticed an issue with int conversions so limited it to just fp32 and fp16 for now.

Note: Most driver implementations of fp16 cast does not "round up" the result, therefore there might be 1 bit difference between vulkan output and cpu torch.to. Explained in greater detail in the comments.

Reviewed By: SS-JIA

Differential Revision: D64080303

fbshipit-source-id: d019fae8269a2ea53991f5e6f81a3fe209ee09d0
A
Abhishek Chandra committed
a6c69a1ebdb2bad025d5c429e003be9968efd8da
Parent: 8957dc8
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 10/14/2024, 7:58:52 PM