Commit Graph

5 Commits

Author SHA1 Message Date
Michael Ranieri
af9c3a3652 uniform_int_distribution does not support uint8_t (#37260)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37260

List of supported types here:
https://en.cppreference.com/w/cpp/numeric/random/uniform_int_distribution

Test Plan: CircleCI green, test compiles and passes on msvc.

Reviewed By: malfet

Differential Revision: D21237280

fbshipit-source-id: 51b09b87511e35bfe8a57ecd48ed772d587dba9b
2020-04-27 13:09:39 -07:00
Sebastian Messmer
643ca5def2 Replace c10::guts::stuff with std::stuff (#30915)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/30915

Since we now have C++14, we don't need these c10::guts helpers anymore
ghstack-source-id: 95777609

Test Plan: waitforsandcastle

Differential Revision: D18869639

fbshipit-source-id: 97716f932297c64c6e814410ac47b444c33d4e2e
2019-12-16 13:57:19 -08:00
Jerry Zhang
fd0ed2e298 Tensor reinitialization codemod - 4/5 (#15967)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15967

Codemod generated with clangr shard mode, 25 files per diff,
To eliminiate partially initialized Tensor, we split the initialization of local Tensor variables into two steps, first declare un uninitialized Tensor, and
call `ReinitializeTensor` to initialize it.
motivation: https://github.com/pytorch/pytorch/pull/12407

Reviewed By: smessmer

Differential Revision: D13586735

fbshipit-source-id: eae2d79e1107a2e813ce3809e690af4706aaa9ca
2019-01-11 16:41:19 -08:00
Jerry Zhang
8260441b45 Renaming size() to numel() - 1/2
Summary:
Codemod generated with clangr shard mode, 50 files per diff,
clangr code(size->numel): diffusion/FBS/browse/master/fbcode/caffe2/caffe2/fb/codemods/TensorMethodRename.cpp

Reviewed By: ezyang

Differential Revision: D12833710

fbshipit-source-id: aef469b7b6d7715dada593f0f55e5813fbd963ac
2018-10-29 18:01:01 -07:00
Marat Dukhan
9cb4bce847 Open-source Caffe2 Int8 ops (#13065)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/13065

- Open-source Caffe2 Int8 (quantized) operators

Reviewed By: Yangqing

Differential Revision: D10524381

fbshipit-source-id: 6daa153dc247572900c91e37262d033c368b382d
2018-10-25 12:43:00 -07:00