mirror of
https://github.com/pytorch/pytorch.git
synced 2025-11-05 00:14:54 +08:00
Revert "Change ATEN generator argument type to const std::optional<Generator>& (#120076)"
This reverts commit ecbe82b9cec75324b7efb58e1d9cae6b35b71bdc. Reverted https://github.com/pytorch/pytorch/pull/120076 on behalf of https://github.com/jeanschmidt due to Reverting in order to check if this will fix XLA trunk jobs ([comment](https://github.com/pytorch/pytorch/pull/120076#issuecomment-2015272644))
This commit is contained in:
@ -246,7 +246,7 @@ struct PythonArgs {
|
||||
inline std::vector<int64_t> intlistWithDefault(
|
||||
int i,
|
||||
std::vector<int64_t> default_intlist);
|
||||
inline std::optional<at::Generator> generator(int i);
|
||||
inline c10::optional<at::Generator> generator(int i);
|
||||
inline at::Storage storage(int i);
|
||||
inline at::Storage storage(
|
||||
int i,
|
||||
@ -1069,7 +1069,7 @@ inline bool PythonArgs::isNone(int i) {
|
||||
return args[i] == nullptr;
|
||||
}
|
||||
|
||||
inline std::optional<at::Generator> PythonArgs::generator(int i) {
|
||||
inline c10::optional<at::Generator> PythonArgs::generator(int i) {
|
||||
if (!args[i])
|
||||
return c10::nullopt;
|
||||
return reinterpret_cast<THPGenerator*>(args[i])->cdata;
|
||||
|
||||
Reference in New Issue
Block a user