pytorch/test/cpp
Luca Wehrstedt 9aa1461a68 Make wrapPropagateTLSState more generic (#57634)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/57634

`wrapPropagateTLSState` was restricting its argument to be an argument-less function, and I need to relax this for later work.

Also, it was requiring its argument to be converted to `std::function`, and also returned a `std::function`. Each creation of a `std::function` could cause a heap allocation. It's not particularly expensive, but here we can easily avoid it by having `wrapPropagateTLSState` directly operate on generic callables (thus, possibly, raw lambdas).
ghstack-source-id: 128295264

Test Plan: CI

Reviewed By: ilia-cher

Differential Revision: D28178782

fbshipit-source-id: d657f5751514974518606dd4fc4175e805dcb90a
2021-05-07 03:58:08 -07:00
..
api Add missing return statement from 57057 (#57669) 2021-05-05 16:13:35 -07:00
common
dist_autograd Forbid trailing whitespace (#53406) 2021-03-05 17:22:55 -08:00
jit Make wrapPropagateTLSState more generic (#57634) 2021-05-07 03:58:08 -07:00
lite_interpreter_runtime Revert D27958477: [PyTorch][Edge] Add v4 and v5 models and remove unused model 2021-04-23 14:42:01 -07:00
rpc Use Devices instead of DeviceIndexes in TensorPipe agent (#57294) 2021-05-01 16:12:55 -07:00
tensorexpr [NNC] Add support for computing conv with dynamic shapes (#57514) 2021-05-06 01:08:25 -07:00
__init__.py remediation of S205607 2020-07-17 17:19:47 -07:00