Files
pytorch/test/test_namedtensor.py
Richard Zou 83a80d2b31 Add test/test_namedtensor.py (#20168)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20168
ghimport-source-id: 78bd3c4b6bc87c216ce33dba13b61feb87e5fe53

Reviewed By: gchanan

Differential Revision: D15278222

Pulled By: zou3519

fbshipit-source-id: 3bcdb1cb654400350d42464dd9e0d5e0a7116e1e
2019-05-09 09:09:22 -07:00

21 lines
463 B
Python

import unittest
from common_utils import TestCase, run_tests
import torch
def namedtensor_enabled():
return '-DNAMEDTENSOR_ENABLED' in torch.__config__.show()
skipIfNamedTensorDisabled = \
unittest.skipIf(not namedtensor_enabled(),
'PyTorch not compiled with namedtensor support')
class TestNamedTensor(TestCase):
@skipIfNamedTensorDisabled
def test_trivial(self):
pass
if __name__ == '__main__':
run_tests()