mirror of
https://github.com/pytorch/pytorch.git
synced 2025-11-11 22:34:53 +08:00
Remove unneeded std::make_optional (#143575)
Fixes #ISSUE_NUMBER Pull Request resolved: https://github.com/pytorch/pytorch/pull/143575 Approved by: https://github.com/Skylion007
This commit is contained in:
@ -1852,7 +1852,7 @@ static int THPVariable_subclass_clear(THPVariable* self) {
|
||||
if (!self->cdata.unsafeIsBorrowed() &&
|
||||
tensor.unsafeGetTensorImpl()->pyobj_slot()->check_pyobj(
|
||||
getPyInterpreter(), /*ignore_hermetic_tls=*/false) ==
|
||||
std::make_optional((PyObject*)self)) {
|
||||
(PyObject*)self) {
|
||||
// TODO: empirically, on OS X this assert appears to be untrue
|
||||
// In test_py_tensors_multi_async_call - ProcessGroupRpcTestWithSpawn
|
||||
// distributed/rpc/test_process_group_agent.py
|
||||
|
||||
@ -276,7 +276,7 @@ static std::vector<std::optional<c10::SymInt>> wrapIntegersInOptional(
|
||||
intArray.begin(),
|
||||
intArray.end(),
|
||||
optVec.begin(),
|
||||
[](const c10::SymInt& value) { return std::make_optional(value); });
|
||||
[](const c10::SymInt& value) { return value; });
|
||||
return optVec;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user