Skip to content

Commit b303b3c

Browse files
committed
[ET][EZ] Print tensor data for Half dtype
Useful for debugging `Half` i.e. `fp16` models. Differential Revision: [D57977366](https://our.internmc.facebook.com/intern/diff/D57977366/) [ghstack-poisoned]
1 parent a4ffb2a commit b303b3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extension/evalue_util/print_evalue.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ void print_tensor(std::ostream& os, exec_aten::Tensor tensor) {
158158
break;
159159

160160
switch (tensor.scalar_type()) {
161-
ET_FORALL_REAL_TYPES_AND(Bool, PRINT_TENSOR_DATA)
161+
ET_FORALL_REAL_TYPES_AND2(Bool, Half, PRINT_TENSOR_DATA)
162162
default:
163163
os << "[<unhandled scalar type " << (int)tensor.scalar_type() << ">]";
164164
}

0 commit comments

Comments
 (0)