Skip to content

Commit 28c2ab6

Browse files
swolchokfacebook-github-bot
authored andcommitted
add BFloat16 to aten_bridge (pytorch#5519)
Summary: Pull Request resolved: pytorch#5519 Discovered these were missing while trying to use the following diff. ghstack-source-id: 243867517 exported-using-ghexport Reviewed By: digantdesai Differential Revision: D63147276 fbshipit-source-id: bf75fb0fe452e2e68a34271ca1250cdb90657e5a
1 parent badd76e commit 28c2ab6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

extension/aten_util/aten_bridge.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ torch::executor::ScalarType torch_to_executorch_scalar_type(
7373
return torch::executor::ScalarType::Short;
7474
case c10::ScalarType::Half:
7575
return torch::executor::ScalarType::Half;
76+
case c10::ScalarType::BFloat16:
77+
return torch::executor::ScalarType::BFloat16;
7678
case c10::ScalarType::Int:
7779
return torch::executor::ScalarType::Int;
7880
case c10::ScalarType::Float:
@@ -103,6 +105,8 @@ c10::ScalarType executorch_to_torch_scalar_type(
103105
return c10::ScalarType::Short;
104106
case torch::executor::ScalarType::Half:
105107
return c10::ScalarType::Half;
108+
case torch::executor::ScalarType::BFloat16:
109+
return c10::ScalarType::BFloat16;
106110
case torch::executor::ScalarType::Int:
107111
return c10::ScalarType::Int;
108112
case torch::executor::ScalarType::Float:

0 commit comments

Comments
 (0)