Skip to content

Commit f4dbb6b

Browse files
committed
[reland] Add int1 to int7 dtypes
Summary: Similar to #117208, we want to add int1 to int7 for edge use cases for weight quantization Test Plan: python test/test_quantization.py -k test_uint4_int4_dtype Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 9979fb52ef74c78a1c1f024bb1697ed51c008954 Pull Request resolved: #137928
1 parent 86631ec commit f4dbb6b

File tree

5 files changed

+87
-29
lines changed

5 files changed

+87
-29
lines changed

aten/src/ATen/DLConvertor.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ DLDataType getDLDataType(const Tensor& t) {
2222
case ScalarType::UInt64:
2323
dtype.code = DLDataTypeCode::kDLUInt;
2424
break;
25+
case ScalarType::Int1:
26+
case ScalarType::Int2:
27+
case ScalarType::Int3:
28+
case ScalarType::Int4:
29+
case ScalarType::Int5:
30+
case ScalarType::Int6:
31+
case ScalarType::Int7:
2532
case ScalarType::Char:
2633
dtype.code = DLDataTypeCode::kDLInt;
2734
break;

0 commit comments

Comments
 (0)