Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: isdanni <leedanni@gmail.com>
  • Loading branch information
isdanni committed May 7, 2024
1 parent 34821ae commit a29a276
Show file tree
Hide file tree
Showing 9 changed files with 209 additions and 2,668 deletions.
2,400 changes: 10 additions & 2,390 deletions docs/Changelog.md

Large diffs are not rendered by default.

424 changes: 181 additions & 243 deletions docs/Operators.md

Large diffs are not rendered by default.

41 changes: 10 additions & 31 deletions docs/TestCoverage.md
Expand Up @@ -6,7 +6,7 @@
* [Overall Test Coverage](#overall-test-coverage)
# Node Test Coverage
## Summary
Node tests have covered 180/193 (93.26%, 5 generators excluded) common operators.
Node tests have covered 179/192 (93.23%, 5 generators excluded) common operators.

Node tests have covered 0/0 (N/A) experimental operators.

Expand Down Expand Up @@ -3773,7 +3773,7 @@ There are 1 test cases, listed as following:
<summary>concat</summary>

```python
test_cases: dict[str, Sequence[Any]] = {
test_cases: Dict[str, Sequence[Any]] = {
"1d": ([1, 2], [3, 4]),
"2d": ([[1, 2], [3, 4]], [[5, 6], [7, 8]]),
"3d": (
Expand Down Expand Up @@ -5449,7 +5449,7 @@ node = onnx.helper.make_node(
# scalar zero point and scale
x = make_tensor("x", TensorProto.INT4, [5], [0, 1, 7, -4, -8])
x_scale = np.float32(2)
x_zero_point = make_tensor("x_zero_point", TensorProto.INT4, (1,), [1])
x_zero_point = make_tensor("zero_point", TensorProto.INT4, (1,), [1])
y = np.array([-2, 0, 12, -10, -18], dtype=np.float32)

expect(
Expand Down Expand Up @@ -5499,7 +5499,7 @@ node = onnx.helper.make_node(
# scalar zero point and scale
x = make_tensor("x", TensorProto.UINT4, [5], [0, 1, 7, 10, 15])
x_scale = np.float32(2)
x_zero_point = make_tensor("x_zero_point", TensorProto.UINT4, (1,), [1])
x_zero_point = make_tensor("zero_point", TensorProto.UINT4, (1,), [1])
y = np.array([-2, 0, 12, 18, 28], dtype=np.float32)

expect(
Expand Down Expand Up @@ -9665,7 +9665,7 @@ node = onnx.helper.make_node(
)

trip_count = np.array(5).astype(np.int64)
seq_empty: list[Any] = []
seq_empty: List[Any] = []
seq_res = [x[: int(i)] for i in x]
cond = np.array(1).astype(bool)
expect(
Expand Down Expand Up @@ -9860,7 +9860,7 @@ node = onnx.helper.make_node(
trip_count = np.array(5).astype(np.int64)
cond = np.array(1).astype(bool)
seq_res = compute_loop_outputs(x, [x0], trip_count)
opt_seq_in: list[Any] = [x0]
opt_seq_in: List[Any] = [x0]
expect(
node,
inputs=[trip_count, cond, opt_seq_in],
Expand Down Expand Up @@ -13955,7 +13955,7 @@ node = onnx.helper.make_node(

x = np.array([0.0, 1.0, 2.0, 100000.0, 200.0]).astype(np.float32)
y_scale = np.float32(2)
y_zero_point = make_tensor("y_zero_point", TensorProto.FLOAT8E4M3FN, [1], [0])
y_zero_point = make_tensor("zero_point", TensorProto.FLOAT8E4M3FN, [1], [0])
y = make_tensor("y", TensorProto.FLOAT8E4M3FN, [5], [0, 0.5, 1, 448, 96])

expect(
Expand All @@ -13979,7 +13979,7 @@ node = onnx.helper.make_node(

x = np.array([0.0, 1.0, 2.0, 100000.0, 200.0]).astype(np.float32)
y_scale = np.float32(2)
y_zero_point = make_tensor("y_zero_point", TensorProto.FLOAT8E5M2, [1], [0.0])
y_zero_point = make_tensor("zero_point", TensorProto.FLOAT8E5M2, [1], [0.0])
y = make_tensor("y", TensorProto.FLOAT8E5M2, [5], [0, 0.5, 1, 49152, 96])

expect(
Expand Down Expand Up @@ -14074,7 +14074,7 @@ x = np.array(

y_scale = np.asarray([2.0, 3.0, 4.0], dtype=np.float32)
y_zero_point = make_tensor(
"y_zero_point", TensorProto.INT4, y_scale.shape, np.ones_like(y_scale)
"zero_point", TensorProto.INT4, y_scale.shape, np.ones_like(y_scale)
)
y = make_tensor(
"y", TensorProto.INT4, x.shape, [1, 2, 3, 5, -8, -6, 3, 4, 4, 5, 5, 7]
Expand Down Expand Up @@ -14188,7 +14188,7 @@ x = np.array(

y_scale = np.asarray([2.0, 3.0, 4.0], dtype=np.float32)
y_zero_point = make_tensor(
"y_zero_point", TensorProto.UINT4, y_scale.shape, np.ones_like(y_scale)
"zero_point", TensorProto.UINT4, y_scale.shape, np.ones_like(y_scale)
)
y = make_tensor(
"y", TensorProto.UINT4, x.shape, [1, 2, 3, 5, -1, -1, 3, 4, 4, 5, 5, 11]
Expand Down Expand Up @@ -22880,27 +22880,6 @@ expect(
</details>


### Swish
There are 1 test cases, listed as following:
<details>
<summary>swish</summary>

```python
node = onnx.helper.make_node(
"Swish",
inputs=["x"],
outputs=["y"],
)

x = np.array([3, 4, 5]).astype(np.float32)
y = swish(x, alpha=1.0)

expect(node, inputs=[x], outputs=[y], name="test_swish")
```

</details>


### Tan
There are 1 test cases, listed as following:
<details>
Expand Down
@@ -1 +1,2 @@
*B x_zero_point
*B
zero_point
@@ -1 +1,2 @@
*B x_zero_point
*B
zero_point
Binary file not shown.
Binary file not shown.
@@ -1 +1,2 @@
*B y_zero_point
*B
zero_point
@@ -1 +1,2 @@
*B y_zero_point
*B
zero_point

0 comments on commit a29a276

Please sign in to comment.