pytorch/test/cpp
Mikhail Zolotukhin 1c0bad25f3 [TensorExpr] Add dtype to class Buf. (#36611)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/36611

Currently Buf represents underlying storage but it didn't have dtype.
That resulted in specifying dtypes in different places and there was no
mechanism to enforce its consistency: e.g. one could've created a kFloat
expression and use a kInt buffer to store its result. Now we're
centralizing where the logic regarding the storage is located and we can
start enforcing semantics rules.

Follow-ups: we can merge Buffer and BufHandle classes as the former is
now a mere wrapper over the latter.

Test Plan: Imported from OSS

Differential Revision: D21027356

Pulled By: ZolotukhinM

fbshipit-source-id: c06aa2c4077fdcde3bb4ca622d324aece79b5a9c
2020-05-05 15:04:37 -07:00
..
api [aten] Pass std::function<> to thread_pool by value, instead of const ref. (#37681) 2020-05-05 08:41:38 -07:00
common
dist_autograd Fix/relax CMake linter rules (#35574) 2020-03-27 16:52:33 -07:00
jit Adding symbolic sizes, contiguity, stride indices (#36101) 2020-05-01 02:01:25 -07:00
rpc Change StorageImpl to track byte count rather than element count (#37776) 2020-05-05 14:20:51 -07:00
tensorexpr [TensorExpr] Add dtype to class Buf. (#36611) 2020-05-05 15:04:37 -07:00
__init__.py