Richard Zou
b4b51ed5ec
Implement tensor.size(Dimname), tensor.stride(Dimname)
...
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/22989
Test Plan: Imported from OSS
Differential Revision: D16364437
Pulled By: zou3519
fbshipit-source-id: 393a93fecac27b5d3b1a7f7692590d8fd5e95a5d
2019-07-22 13:11:59 -07:00
Richard Zou
662fe699c5
Named inference rules for some initializer fns
...
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/22972
Test Plan:
- [namedtensor ci]
Imported from OSS
Differential Revision: D16342782
Pulled By: zou3519
fbshipit-source-id: 25277688ab51e1e98af0e19aeb9c79399171d2fb
2019-07-18 10:04:29 -07:00
Richard Zou
57cec0a720
Named inference rules for split/chunk
...
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/22971
Test Plan: Imported from OSS
Differential Revision: D16342783
Pulled By: zou3519
fbshipit-source-id: 379edc8eb2f45a82ee8a6320f8285f8f81ea0b1b
2019-07-18 10:04:25 -07:00
Hong Xu
693871ded3
Rename macros and build options NAMEDTENSOR_ENABLED to BUILD_NAMEDTENSOR ( #22360 )
...
Summary:
Currently the build system accepts USE_NAMEDTENSOR from the environment
variable and turns it into NAMEDTENSOR_ENABLED when passing to CMake.
This discrepancy does not seem necessary and complicates the build
system. The naming of this build option is also semantically incorrect
("BUILD_" vis-a-vis "USE_"). This commit eradicate this issue before it
is made into a stable release.
The support of NO_NAMEDTENSOR is also removed, since PyTorch has been
quite inconsistent about "NO_*" build options.
---
Note: All environment variables with their names starting with `BUILD_` are currently automatically passed to CMake with no need of an additional wrapper.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/22360
Differential Revision: D16074509
Pulled By: zou3519
fbshipit-source-id: dc316287e26192118f3c99b945454bc50535b2ae
2019-07-02 11:46:13 -07:00
Richard Zou
f894ef7263
Add smoke test for information fn/method/attrs to test_namedtensor
...
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/22341
Test Plan:
- `python test/test_namedtensor.py -v` [namedtensor ci]
gh-metadata: pytorch pytorch 22341 gh/zou3519/66/head
Imported from OSS
Differential Revision: D16053440
Pulled By: zou3519
fbshipit-source-id: 400f2e1c136cd7db4346a42b58813e42595ca755
2019-07-01 07:24:54 -07:00
Richard Zou
496e35f76b
More named inference rules for pointwise unary ops
...
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/22308
Test Plan:
- `python test/test_namedtensor.py -v` [namedtensor ci]
gh-metadata: pytorch pytorch 22308 gh/zou3519/65/head
Imported from OSS
Differential Revision: D16053441
Pulled By: zou3519
fbshipit-source-id: 2e8d4cc11d7a711d2b789752a316a11fffc0996e
2019-07-01 07:24:51 -07:00
Richard Zou
177b8bf6e7
Named inference rule for more pointwise ops. ( #22268 )
...
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/22268
ghimport-source-id: c722f9fbb3fc529c872dcccbf58ba1a8c5fcda8e
Test Plan:
- `python test/test_namedtensor.py -v` [namedtensor ci]
Imported from OSS
Differential Revision: D16030549
Pulled By: zou3519
fbshipit-source-id: 5cbb2c8626335a32a22ed8079245a5faa7cf553f
2019-06-27 12:49:36 -07:00
Richard Zou
7732b1a604
Enable named inference for some unary pointwise ops ( #22267 )
...
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/22267
ghimport-source-id: 1566df9a20712cada6ea1209e000c5ff757daa14
Test Plan: Imported from OSS
Differential Revision: D16030550
Pulled By: zou3519
fbshipit-source-id: 183ca1d14dc0fb6f1ee6e114b48c2703c61e11ce
2019-06-27 12:49:32 -07:00
Richard Zou
6386e4d244
Named inference rule for abs. ( #22151 )
...
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/22151
ghimport-source-id: 54c1726b578ac162af817f78df6f540b764e46e3
Test Plan:
- `python test/test_namedtensor.py` [namedtensor ci]
Imported from OSS
Differential Revision: D15970326
Pulled By: zou3519
fbshipit-source-id: 4ea25f0a73bbc24b604d3ded2027eeb4ce800de0
2019-06-27 12:49:25 -07:00
Richard Zou
4bc89bd5a6
Implement tensor.select(Dimname,int) ( #21795 )
...
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/21795
ghimport-source-id: d13af6078a47de1d6045cfbb7d278c378fe734fe
Test Plan: Imported from OSS
Differential Revision: D15833457
Pulled By: zou3519
fbshipit-source-id: fa52aff25ce0e12f31da3eef83ea948b4f7a5d9f
2019-06-21 16:16:45 -07:00
Richard Zou
1aa16d356e
named inference rule for tensor.select ( #21752 )
...
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/21752
ghimport-source-id: 95e17087b8c29c9bd88003ae225cb7329d0b67e6
Test Plan:
- `python test/test_namedtensor.py` [namedtensor ci]
gh-metadata: pytorch pytorch 21752 gh/zou3519/50/head
Imported from OSS
Differential Revision: D15833453
Pulled By: zou3519
fbshipit-source-id: 7b51e4137e54712aa9c6274a9e6bb48ab7191b8d
2019-06-17 13:12:49 -07:00
Richard Zou
2b23fac8da
Disallow creation of tensors with duplicate names ( #21781 )
...
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/21781
ghimport-source-id: d77e0c97fe0104b4b29571fd5828967399d34fb1
Test Plan:
- `python test/test_namedtensor.py -v` [namedtensor ci]
gh-metadata: pytorch pytorch 21781 gh/zou3519/51/head
Imported from OSS
Differential Revision: D15833454
Pulled By: zou3519
fbshipit-source-id: fca4de83fba4bced615ec3cbd4ce4c441ddfcaf2
2019-06-17 09:59:50 -07:00
Richard Zou
0d6eb209e6
Expose torch.empty(sizes, *, names, ...) to Python ( #21648 )
...
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/21648
ghimport-source-id: 583f155c8ee95967d2f8b9d8df27d94b9e725694
Differential Revision: D15804482
Pulled By: zou3519
fbshipit-source-id: f86520dda479100be2a752e4db8a902167413a83
2019-06-14 11:52:47 -07:00
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