mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Revert "Fix usage of forwarding references (#161094)"
This reverts commit 1ebd70d0c0d562d3be9abdee2a21906584af7d99. Reverted https://github.com/pytorch/pytorch/pull/161094 on behalf of https://github.com/jeanschmidt due to checking if revert will fix https://github.com/pytorch/pytorch/actions/runs/17470601839/job/49621447581 ([comment](https://github.com/pytorch/pytorch/pull/161094#issuecomment-3255541480))
This commit is contained in:
@ -374,7 +374,7 @@ static inline std::vector<c10::IValue> makeStack(Inputs&&... inputs) {
|
||||
template <class... Args>
|
||||
static inline std::vector<c10::IValue> callOpByHandle(
|
||||
const c10::OperatorHandle& op,
|
||||
Args&&... args) {
|
||||
Args... args) {
|
||||
auto stack = makeStack(std::forward<Args>(args)...);
|
||||
c10::Dispatcher::singleton().callBoxed(op, &stack);
|
||||
return stack;
|
||||
@ -384,7 +384,7 @@ template <class... Args>
|
||||
static inline std::vector<c10::IValue> callOpByName(
|
||||
const char* func_name,
|
||||
const char* overload_name,
|
||||
Args&&... args) {
|
||||
Args... args) {
|
||||
const std::optional<c10::OperatorHandle> op_handle =
|
||||
c10::Dispatcher::singleton().findSchema({func_name, overload_name});
|
||||
assert(op_handle.has_value());
|
||||
|
@ -232,7 +232,7 @@ struct base {
|
||||
return obj<T>::steal(self);
|
||||
}
|
||||
template<typename ... Args>
|
||||
static obj<T> create(Args&&... args) {
|
||||
static obj<T> create(Args ... args) {
|
||||
auto self = alloc();
|
||||
self->init(std::forward<Args>(args)...);
|
||||
return self;
|
||||
|
@ -657,7 +657,7 @@ struct ThreadLocalResults {
|
||||
}
|
||||
|
||||
template <CallType C, EventType E, typename Ephemeral, typename... Args>
|
||||
TraceKey intern(Ephemeral ephemeral, Args&&... args) {
|
||||
TraceKey intern(Ephemeral ephemeral, Args... args) {
|
||||
static_assert(
|
||||
Config<C>::event_type == E,
|
||||
"ThreadLocalResults.intern called from the wrong typed context.");
|
||||
|
@ -267,7 +267,7 @@ class ExprEval {
|
||||
}
|
||||
|
||||
template <typename T, typename... Ts>
|
||||
T value(Ts&&... ts) {
|
||||
T value(Ts... ts) {
|
||||
call(std::forward<Ts>(ts)...);
|
||||
return ret_value_.as<T>();
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ int filterCloseReturn(int r) {
|
||||
|
||||
// Wrap call to f(args) in loop to retry on EINTR
|
||||
template <class F, class... Args>
|
||||
ssize_t wrapNoInt(F f, Args&&... args) {
|
||||
ssize_t wrapNoInt(F f, Args... args) {
|
||||
ssize_t r = -1;
|
||||
do {
|
||||
r = f(std::forward<Args>(args)...);
|
||||
|
Reference in New Issue
Block a user