mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
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
21 lines
463 B
Python
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()
|