MCPcopy Create free account
hub / github.com/KnowingNothing/MatmulTutorial / IntegerType

Class IntegerType

cutlass.py/dtype.py:10–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8
9@dataclass
10class IntegerType(DType):
11 unsigned: bool = False
12 bits: int = 0
13
14 def _is(self, unsigned: bool, bits: int):
15 return self.unsigned == unsigned and self.bits == bits
16
17 def is_int4_t(self):
18 return self._is(False, 4)
19
20 def is_int8_t(self):
21 return self._is(False, 8)
22
23 def is_int16_t(self):
24 return self._is(False, 16)
25
26 def is_int32_t(self):
27 return self._is(False, 32)
28
29 def is_int64_t(self):
30 return self._is(False, 64)
31
32 def is_uint4_t(self):
33 return self._is(True, 4)
34
35 def is_uint8_t(self):
36 return self._is(True, 8)
37
38 def is_uint16_t(self):
39 return self._is(True, 16)
40
41 def is_uint32_t(self):
42 return self._is(True, 32)
43
44 def is_uint64_t(self):
45 return self._is(True, 64)
46
47 @classmethod
48 def int4_t(cls):
49 return cls(False, 4)
50
51 @classmethod
52 def int8_t(cls):
53 return cls(False, 8)
54
55 @classmethod
56 def int16_t(cls):
57 return cls(False, 16)
58
59 @classmethod
60 def int32_t(cls):
61 return cls(False, 32)
62
63 @classmethod
64 def int64_t(cls):
65 return cls(False, 64)
66
67 @classmethod

Callers 2

__init__Method · 0.90
__init__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected