-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IR] Add torch tensor support for ir.Tensor #1951
base: main
Are you sure you want to change the base?
Conversation
❌ 13 Tests Failed:
View the full list of 3 ❄️ flaky tests
To view more test analytics, go to the Test Analytics Dashboard |
elif str(type(value)) == "<class 'torch.Tensor'>": | ||
# NOTE: We use str(type(...)) and do not import torch for type checking | ||
# as it creates overhead during import | ||
return tensor_adapters.TorchTensor(value, name=name, doc_string=doc_string) |
Check failure
Code scanning / lintrunner
MYPY/arg-type Error
|
||
class ConvenienceTest(unittest.TestCase): | ||
def test_tensor_accepts_torch_tensor(self): | ||
import torch as some_random_name |
Check notice
Code scanning / lintrunner
PYLINT/C0415 Note
See import-outside-toplevel. To disable, use # pylint: disable=import-outside-toplevel
Users can now do