Skip to content

Commit e959cda

Browse files
committed
feat(atenlib): typing module
ghstack-source-id: 8174a22 Pull Request resolved: microsoft/onnxscript#233
1 parent 7c346d7 commit e959cda

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License.
4+
# --------------------------------------------------------------------------
5+
6+
"""Typings for function definitions."""
7+
8+
from __future__ import annotations
9+
10+
from typing import TypeVar, Union
11+
12+
from onnxscript import DOUBLE, FLOAT, FLOAT16, INT8, INT16, INT32, INT64
13+
14+
FloatType = Union[FLOAT16, FLOAT, DOUBLE]
15+
IntType = Union[INT8, INT16, INT32, INT64]
16+
17+
TFloat = TypeVar("TFloat", bound=FloatType)
18+
TInt = TypeVar("TInt", bound=IntType)

0 commit comments

Comments
 (0)