Skip to content

Commit 8873ab2

Browse files
committed
Update on "[ET][EZ] Enable operator<< for Half tensor data"
Useful for debugging `Half` i.e. `fp16` models, when we have `EValue`s that are `Half` dtype and we do the following: ``` std::cout << "===== INPUT =====" << std::endl; for (EValue& v : inputs) { std::cout << v << std::endl; } std::cout << "===== OUTPUT =====" << std::endl; for (EValue& v : outputs) { std::cout << v << std::endl; } ``` ## Before ``` ===== INPUT ===== tensor(sizes=[1, 3, 96, 72], [<unhandled scalar type 5>]) ===== OUTPUT ===== tensor(sizes=[1, 2, 96, 72], [<unhandled scalar type 5>]) ``` ## After ``` ===== INPUT ===== tensor(sizes=[1, 3, 96, 72], [0.279785, 0.271484, 0.364746, ..., 0.150391, 0.836426, 0.019043]) ===== OUTPUT ===== tensor(sizes=[1, 2, 96, 72], [18.2344, -10.0938, 1.35059, ..., -33.6875, 4.07422, -22.5312]) ``` Differential Revision: [D57977366](https://our.internmc.facebook.com/intern/diff/D57977366/) [ghstack-poisoned]
2 parents bef2bb5 + f89090e commit 8873ab2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

backends/vulkan/test/op_tests/cases.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ def get_avg_pool2d_inputs():
165165
]
166166

167167
test_suite = VkTestSuite([tuple(tc) for tc in test_cases])
168+
test_suite.dtypes = ["at::kFloat"]
168169
return test_suite
169170

170171

0 commit comments

Comments
 (0)