Skip to content
Snippets Groups Projects
Commit 5f1c3a31 authored by Yaman Umuroglu's avatar Yaman Umuroglu
Browse files

[DataType] add finer-granularity integer types and (u)int64

parent a8022b66
No related branches found
No related tags found
No related merge requests found
......@@ -50,17 +50,69 @@ class DataType(Enum):
UINT2 = auto()
UINT3 = auto()
UINT4 = auto()
UINT5 = auto()
UINT6 = auto()
UINT7 = auto()
UINT8 = auto()
UINT9 = auto()
UINT10 = auto()
UINT11 = auto()
UINT12 = auto()
UINT13 = auto()
UINT14 = auto()
UINT15 = auto()
UINT16 = auto()
UINT17 = auto()
UINT18 = auto()
UINT19 = auto()
UINT20 = auto()
UINT21 = auto()
UINT22 = auto()
UINT23 = auto()
UINT24 = auto()
UINT25 = auto()
UINT26 = auto()
UINT27 = auto()
UINT28 = auto()
UINT29 = auto()
UINT30 = auto()
UINT31 = auto()
UINT32 = auto()
UINT64 = auto()
BIPOLAR = auto()
TERNARY = auto()
INT2 = auto()
INT3 = auto()
INT4 = auto()
INT5 = auto()
INT6 = auto()
INT7 = auto()
INT8 = auto()
INT9 = auto()
INT10 = auto()
INT11 = auto()
INT12 = auto()
INT13 = auto()
INT14 = auto()
INT15 = auto()
INT16 = auto()
INT17 = auto()
INT18 = auto()
INT19 = auto()
INT20 = auto()
INT21 = auto()
INT22 = auto()
INT23 = auto()
INT24 = auto()
INT25 = auto()
INT26 = auto()
INT27 = auto()
INT28 = auto()
INT29 = auto()
INT30 = auto()
INT31 = auto()
INT32 = auto()
INT64 = auto()
FLOAT32 = auto()
def bitwidth(self):
......
......@@ -123,6 +123,7 @@ def test_convert_to_hls_layers_tfc_w1a1():
# do forward pass in PyTorch/Brevitas
expected = tfc.forward(input_tensor).detach().numpy()
assert np.isclose(produced, expected, atol=1e-3).all()
os.remove(export_onnx_path)
@pytest.mark.vivado
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment